Agent skill
fetch-issue
Fetch Linear issue and create branch
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/fetch-issue
SKILL.md
Fetch Linear Issue and Create Branch
Input
Linear issue identifier: $ARGUMENTS
Examples: ALG-27, 27, alg-27
Steps
-
Parse issue identifier from
$ARGUMENTS:- Accept formats:
ALG-27,27,alg-27 - Normalize to
ALG-{NUM}for Linear API call - Extract number for folder naming
- Accept formats:
-
Fetch issue details using Linear MCP:
mcp__linear-server__get_issue with: - id: ALG-{NUM} - includeRelations: true -
Extract from issue response:
identifier: e.g., "ALG-27"title: Issue titledescription: Full descriptionlabels: Array of label namesstatus: Current statusrelations.blocks: Issues this blocksrelations.blockedBy: Issues blocking thisrelations.relatedTo: Related issues
-
Parse description for mentioned issues:
- Search for patterns:
ALG-\d+(case-insensitive) - Extract unique issue identifiers mentioned in description
- These are treated as "linked" issues alongside formal relations
- Example:
[ALG-13](https://linear.app/...)-> extractALG-13
- Search for patterns:
-
For each linked issue (from relations AND description mentions):
- Use Glob to find
specs/alg-{related-num}-*/spec.md(Glob matches files, not directories) - If spec.md exists, read the summary section
- Collect related specs for context
- Use Glob to find
-
Derive kebab-slug from title:
- Lowercase the title
- Replace spaces and special chars with hyphens
- Remove consecutive hyphens
- Truncate to reasonable length (40 chars max)
-
Create branch and spec directory:
bashNUM={extracted number} SLUG={kebab-slug} git checkout -b alg-${NUM}-${SLUG} mkdir -p specs/alg-${NUM}-${SLUG} -
Output context summary:
- Issue identifier and title
- Description preview
- Labels and status
- Related specs found (with summaries)
- Created branch name
- Created spec directory path
- Prompt: "Run /plan-spec to create the specification"
Notes
- Do NOT create spec.md yet - that's handled by /plan-spec
- Do NOT commit anything - branch creation is uncommitted
- If branch already exists, ask user whether to switch to it or create fresh
- If spec directory already exists, warn user and ask to proceed
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?