What I do
- Fetch a GitHub issue by number or URL using the
gh CLI
- Ask clarifying questions if the issue description is too vague to act on
- Explore the codebase to identify affected files and root causes
- Generate a structured implementation plan and present it to the user
- Wait for explicit user approval before making any code changes
- Create a new branch (if on
main/master) after plan approval
- Implement the fix or feature following the approved plan
- Run relevant tests and summarize changes
- Optionally hand off to
git-commit and git-pr skills
When to use me
- A GitHub issue number or URL is provided by the user
- The user says "fix issue #123", "implement issue #456", or similar
- The user wants a structured, plan-first approach before touching code
Phase 1: Issue Intake
If the user provided an issue number or URL, use it directly.
If not, ask:
"Which GitHub issue should I work on? Please provide the issue number or URL."
Fetch the issue details:
gh issue view <number> --json number,title,body,labels,comments,assignees,state
Evaluate the issue description:
- If the title and body clearly describe the problem or feature, proceed to Phase 2.
- If the description is thin (e.g. one-liners, missing reproduction steps, no acceptance criteria), ask targeted clarifying questions before continuing. Examples:
- "Can you describe the expected vs actual behavior?"
- "Is there a specific file or area of the codebase involved?"
- "What does 'done' look like for this feature?"
- Collect answers and incorporate them into the plan.
Phase 2: Codebase Exploration
Use Read, Glob, and Grep tools to explore the codebase relevant to the issue:
Search for keywords from the issue title and body:
rg "<keyword>" -l
Identify:
- Files most likely to need changes
- Related tests
- Entry points, interfaces, or API contracts involved
- Any existing error handling or edge cases nearby
Read the relevant files to understand the current implementation before forming the plan.
Phase 3: Plan & Approval
Present a structured plan to the user. Do NOT make any code changes yet.
Format the plan as follows:
## Plan for Issue #<number>: <title>
### Root Cause / Requirements
<For bugs: explain the root cause found during exploration.>
<For features: list the requirements and acceptance criteria.>
### Files to Change
- `path/to/file.ts` — reason
- `path/to/test.ts` — reason
### Implementation Steps
1. <Step one>
2. <Step two>
3. ...
### Test Strategy
- <How the fix/feature will be verified>
- <Existing tests to run, new tests to add>
Then ask:
"Does this plan look good? Reply 'yes' to proceed, or let me know what to change."
Do not proceed until the user explicitly approves.
Phase 3b: Branch Creation
After the user approves the plan:
Check the current branch:
git branch --show-current
If the current branch is main or master:
If already on a feature branch (not main/master), skip branch creation silently and continue.
Phase 4: Implementation
Execute the approved plan step by step:
- Make code changes using Edit and Write tools, following the existing code style and conventions of the project.
- After completing changes, run the relevant tests:
# Adapt to the project's test runner (npm test, pytest, go test, etc.)
- If tests fail, diagnose and fix before proceeding.
- Do a final review of all changes to ensure correctness and completeness.
Phase 5: Wrap-up
Summarize the changes made:
- Which files were modified and why
- How the fix addresses the issue or the feature meets requirements
- Test results
Offer next steps:
"Changes are ready. Would you like me to:
- Commit using the
git-commit skill?
- Open a pull request using the
git-pr skill?
- Both?"
Invoke the appropriate skills based on the user's response.
1---2name: gh-issue-fix3description: Pick up a GitHub issue and implement a fix or feature with a user-approved plan4license: MIT5---67## What I do89- Fetch a GitHub issue by number or URL using the `gh` CLI10- Ask clarifying questions if the issue description is too vague to act on11- Explore the codebase to identify affected files and root causes12- Generate a structured implementation plan and present it to the user13- Wait for explicit user approval before making any code changes14- Create a new branch (if on `main`/`master`) after plan approval15- Implement the fix or feature following the approved plan16- Run relevant tests and summarize changes17- Optionally hand off to `git-commit` and `git-pr` skills1819## When to use me2021- A GitHub issue number or URL is provided by the user22- The user says "fix issue #123", "implement issue #456", or similar23- The user wants a structured, plan-first approach before touching code2425---2627## Phase 1: Issue Intake28291. If the user provided an issue number or URL, use it directly.30 If not, ask:31 > "Which GitHub issue should I work on? Please provide the issue number or URL."32332. Fetch the issue details:34 ```bash35 gh issue view <number> --json number,title,body,labels,comments,assignees,state36 ```37383. Evaluate the issue description:39 - If the title and body clearly describe the problem or feature, proceed to Phase 2.40 - If the description is thin (e.g. one-liners, missing reproduction steps, no acceptance criteria), ask targeted clarifying questions before continuing. Examples:41 - "Can you describe the expected vs actual behavior?"42 - "Is there a specific file or area of the codebase involved?"43 - "What does 'done' look like for this feature?"44 - Collect answers and incorporate them into the plan.4546---4748## Phase 2: Codebase Exploration4950Use Read, Glob, and Grep tools to explore the codebase relevant to the issue:51521. Search for keywords from the issue title and body:53 ```bash54 rg "<keyword>" -l55 ```56572. Identify:58 - Files most likely to need changes59 - Related tests60 - Entry points, interfaces, or API contracts involved61 - Any existing error handling or edge cases nearby62633. Read the relevant files to understand the current implementation before forming the plan.6465---6667## Phase 3: Plan & Approval6869Present a structured plan to the user. Do NOT make any code changes yet.7071Format the plan as follows:7273```74## Plan for Issue #<number>: <title>7576### Root Cause / Requirements77<For bugs: explain the root cause found during exploration.>78<For features: list the requirements and acceptance criteria.>7980### Files to Change81- `path/to/file.ts` — reason82- `path/to/test.ts` — reason8384### Implementation Steps851. <Step one>862. <Step two>873. ...8889### Test Strategy90- <How the fix/feature will be verified>91- <Existing tests to run, new tests to add>92```9394Then ask:95> "Does this plan look good? Reply 'yes' to proceed, or let me know what to change."9697**Do not proceed until the user explicitly approves.**9899---100101## Phase 3b: Branch Creation102103After the user approves the plan:1041051. Check the current branch:106 ```bash107 git branch --show-current108 ```1091102. If the current branch is `main` or `master`:111 - Determine the branch prefix from the issue labels:112 - `bug` label → `fix/`113 - `enhancement` or `feature` label → `feat/`114 - anything else → `chore/`115 - Derive a short slug from the issue title (lowercase, hyphenated, max 5 words).116 - Proposed branch name format: `<prefix><issue-number>-<slug>`117 - Example: `fix/123-null-pointer-on-login`118 - Example: `feat/456-add-dark-mode`119 - Inform the user of the branch name and create it:120 ```bash121 git checkout -b <branch-name>122 ```1231243. If already on a feature branch (not `main`/`master`), skip branch creation silently and continue.125126---127128## Phase 4: Implementation129130Execute the approved plan step by step:1311321. Make code changes using Edit and Write tools, following the existing code style and conventions of the project.1332. After completing changes, run the relevant tests:134 ```bash135 # Adapt to the project's test runner (npm test, pytest, go test, etc.)136 ```1373. If tests fail, diagnose and fix before proceeding.1384. Do a final review of all changes to ensure correctness and completeness.139140---141142## Phase 5: Wrap-up1431441. Summarize the changes made:145 - Which files were modified and why146 - How the fix addresses the issue or the feature meets requirements147 - Test results1481492. Offer next steps:150 > "Changes are ready. Would you like me to:151 > - Commit using the `git-commit` skill?152 > - Open a pull request using the `git-pr` skill?153 > - Both?"1541553. Invoke the appropriate skills based on the user's response.