start-issue
Start working on a GitHub issue - analyze, explore codebase, and create detailed implementation plan
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Start working on a GitHub issue - analyze, explore codebase, and create detailed implementation plan
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Add a dependency relationship between GitHub issues using the native addBlockedBy mutation
Reusable file sequence numbering with prefix (NNNN-name) and suffix (name-NNNN) modes. Returns the next available zero-padded sequence number for a given directory.
Drop a timestamped note for the current issue - collected by /finish-issue for PR descriptions
Create or update CHANGELOG entries with tone guardrails, thematic grouping, and implementation-detail leak detection.
Delete an issue's working directory (.claude-work/issues/<ID>/) after confirming with the user via interactive prompt
Create a commit message file in .claude-work/commit-msgs/ with auto-numbered filenames. Focuses on WHY not WHAT. The diff already shows what changed. User reviews and commits manually.
| name | start-issue |
| version | 2026.07.27@6dc7d1d |
| description | Start working on a GitHub issue - analyze, explore codebase, and create detailed implementation plan |
| argument-hint | <github-issue-url> [--scratchpad] |
| allowed-tools | Read, Write, Glob, Grep, Bash(git branch --show-current), Bash(git fetch *), Bash(git checkout *), Bash(gh issue view *), Bash(gh issue edit * --add-assignee *), Bash(gh api graphql *), Bash(gh issue comment *), Bash(mkdir -p *), Bash(*/skills/auto-number/auto-number.sh *), Bash(*/skills/ensure-gitignore/ensure-gitignore.sh *), Bash(*/skills/issue-context/target-path.sh *), Bash(*/skills/issue-context/claude-work-root.sh *), Bash(*/skills/start-issue/update-project-status.sh *) |
Analyze a GitHub issue, explore the codebase, and create a detailed implementation plan. This skill is for planning only. It does not implement anything.
Input: $ARGUMENTS (a GitHub issue URL)
Run both commands as parallel tool calls:
git branch --show-current
~/.claude/skills/issue-context/claude-work-root.sh
Use the stdout of claude-work-root.sh as <base> for all .claude-work/ paths in this skill. Detect whether the current branch is issues/<ID>. If so, extract the ID (numeric prefix before the first -/_, or the full segment after issues/) and use Glob(pattern="*", path="<base>/issues/<ID>") to check whether the issue's working directory has contents. If the directory exists and has files, invoke /cleanup-issue to offer cleanup of that specific directory. Other issue directories are left untouched. The user may return to them later.
If no issue context on the current branch, or the directory doesn't exist or is empty: proceed directly to Step 1.
Run both commands as parallel tool calls in the same response. They are independent (one reads, one writes) and both use the input URL directly:
gh issue view $ARGUMENTS --json title,body,number,state,labels,assignees,comments
gh issue edit $ARGUMENTS --add-assignee @me
The assign is additive: existing assignees are preserved, not replaced. The command is idempotent (silently succeeds if you are already assigned).
Read all comments before continuing. If the comments array is non-empty, read every comment in full — treat them as equal-weight context alongside the issue body. Design discussions, CodeRabbit analysis, and follow-up decisions in comments often refine or contradict the original description.
After assignment, detect whether the issue belongs to any GitHub Projects V2 boards and move those project items to "In Progress" status:
~/.claude/skills/start-issue/update-project-status.sh <owner> <repo> <issue_number>
Where <owner> and <repo> are extracted from the issue URL, and <issue_number> is the GitHub issue number.
The script:
project OAuth scope, the issue isn't in any project, the project has no "Status" field, or the field has no "In Progress" optionContinue regardless of the script's exit code. Project status updates are additive and must never block /start-issue.
Create a feature branch from the selected base branch (origin/main by default, or another base branch if instructed):
git fetch origin && git checkout -b issues/<NUMBER> <BASE_BRANCH>
Where <NUMBER> is the GitHub issue number (e.g., issues/223) and <BASE_BRANCH> is typically origin/main. Record the actual base branch used in the scratchpad's Base branch: field. It may differ in stacked-PR workflows.
/start-issue-hook skill (foundation skill at .claude/skills/start-issue-hook/SKILL.md), it is loaded as additional context automatically. Read it and incorporate whatever it specifies into the plan generated in Step 4. If no such skill exists, continue with the vanilla plan. See /skill-hooks for the full extension mechanism.Before drafting the plan, re-read the issue body, any parent issue, and the files surfaced in Step 3. Think through actual file and function names, step ordering, and dependencies before writing. The plan is the highest-leverage artifact this skill produces. Treat it as such. See /pre-write for the think-before-writing rule. If any aspect of the plan is unclear after this review, use /question before writing.
Choose the working-document type based on whether formal step tracking is requested:
/note): use this unless the user explicitly opted in. Produces a lightweight, freeform plan. Relies on you (the LLM) to self-organize execution in-session via TaskCreate/TaskUpdate./scratchpad): triggered when $ARGUMENTS contains --scratchpad, or when the user's invoking message contains a natural-language opt-in phrase ("use a scratchpad", "with step tracking", "formal plan", "track steps"). Produces a scratchpad with a JSON step block so /tackle-scratchpad-block can drive execution./noteUse /note with description start-issue-plan. The note MUST contain these sections (all prose, no JSON step block):
# Issue #NUMBER: Title
Base branch: <branch this was cut from (origin/main, or another branch if instructed)>
Parent: https://github.com/{owner}/{repo}/issues/{XX} (omit if no parent)
## Context
- Brief issue summary (1-2 sentences)
- Parent issue context: how this fits into broader plan (omit if no parent)
## Assumptions Made (omit section if none)
- "Assuming X because Y": non-obvious reasoning only
## Plan
Numbered prose steps (no fenced JSON). Each step should be commit-sized, specific (name files/functions), ordered (dependencies clear), and mention test updates where relevant.
/scratchpadUse /scratchpad with description start-issue-plan. The scratchpad uses the same prose sections as 4a, except the ## Plan section is replaced with ## Implementation Plan containing a fenced JSON step block. See the /scratchpad Step Tracking section for the full schema. For /start-issue specifically: set finish_issue_on_complete: true at the top level, and always set each step's status: "pending" when planning. /tackle-scratchpad-block manages status transitions during execution.
After the working document is created (via either path), write the pointer file so /finish-issue and /tackle-scratchpad-block can resolve the primary plan without guessing:
Path: <base>/issues/<NUMBER>/active-plan (where <base> is from Step 0)
Contents: the project-root-relative path to the working document (a single line, no trailing newline required), for example:
.claude-work/issues/126/notes/20260424-143022-start-issue-plan.txt
Overwrite any existing pointer. Only the most recent working document is "active".
Record the base branch so /rebase-issue can later determine whether to use stacked diff-apply or normal rebase. Like the active-plan pointer in Step 4c, this marker uses an absolute path resolved via claude-work-root.sh.
First, run claude-work-root.sh to get the absolute <base>:
~/.claude/skills/issue-context/claude-work-root.sh
Path: <base>/issues/<NUMBER>/base-branch (absolute path)
Contents: the base branch ref recorded in the plan's Base branch: field (a single line, no trailing newline). Examples:
origin/main
issues/186
Always write this file — even when the base is origin/main. Consistency gives /rebase-issue a single code path: always read the marker, always check remote existence.
Overwrite any existing marker. Only the most recent /start-issue invocation matters.
Formatting: see /prose-style for hard-wrap, code-reference, and GitHub-reference rules.
Deliverable: implementation plan note (or scratchpad, if opted in).
Length: as long as needed to name specific files and functions. Sections are typically 1 to 4 short paragraphs. The Plan list contains however many commit-sized steps the work actually requires. A trivial fix may be one step; a large refactor may be a dozen or more. Match the issue, not a number.
Format: prose sections (Context, Assumptions Made, Plan) per the template above. No fenced JSON in the default /note path.
Scope: planning only. Name files, functions, and test updates. Skip implementation prose.
Tone: direct, concrete, file-and-function-named. No hedging, no generic conclusions.
Only create questions for decisions that would FUNDAMENTALLY change the implementation plan.
Do NOT ask questions about:
DO ask questions about:
If questions are needed, use /question to create a questions file. Add a **Plan impact:** line after the Recommendation: in each question to explain which steps would change based on the answer.
Print the branch name, the absolute working-document path, the absolute active-plan pointer path, and any absolute questions file path. Then print a "Next" line that matches the path taken in Step 4:
Default path (note):
Next: review the plan, then ask me to proceed with the first step (e.g. "start S1" or just "go ahead").
I will self-organize execution using the note as reference.
Commit model: one commit at the end covering all changes. When done, call /finish-issue directly.
do NOT call /commit-msg first. The PR description file doubles as the commit message body.
Opt-in path (scratchpad):
Next: use `/tackle-scratchpad-block` to execute steps one at a time.
Example: /tackle-scratchpad-block <absolute-path-to-scratchpad>
(auto-selects first pending, unblocked step)
If multiple pending, unblocked steps exist, specify which one:
/tackle-scratchpad-block <absolute-path-to-scratchpad>#S002
IMPORTANT: Do NOT proceed with implementation.
This skill is for planning only. After reporting status:
Before finishing, verify:
issues/<NUMBER> was created/note (default) or /scratchpad (opt-in), not both<base>/issues/<NUMBER>/active-plan pointer written with the project-root-relative path to the working document<base>/issues/<NUMBER>/base-branch marker written with the recorded Base branch: ref