GitHub Issue Implementer
Implement a GitHub issue by reading the implementation plan from the issue (description, comments, and replies), writing the code, creating a pull request, and updating the issue status.
Workflow Overview
- •Fetch issue details and implementation plan from GitHub
- •Create a feature branch
- •Implement the changes based on the plan
- •Create a pull request
- •Comment on the issue with PR link
- •Add label to indicate implementation is in progress
Step 1: Fetch Issue Details
Retrieve comprehensive issue information:
gh issue view $ARGUMENTS --json number,title,body,comments,labels
Parse the response to extract:
- •Issue number and title
- •Implementation plan from the body
- •Additional requirements or clarifications from comments
- •Existing labels for context
If the issue has comments, read all comments to find implementation plans or additional requirements:
gh issue view $ARGUMENTS --comments
Look for implementation plan sections typically marked with headers like "Implementation Plan", "Approach", or "Steps".
Step 2: Create Feature Branch
Create and checkout a new branch for the implementation:
git checkout -b issue-$ARGUMENTS
If the branch already exists, confirm with the user before proceeding.
Step 3: Implement Changes
Based on the implementation plan extracted from the issue:
- •Analyze the plan: Identify all files to create or modify
- •Follow the steps: Implement each step in the plan sequentially
- •Write tests: Include unit tests as specified in the plan
- •Follow codebase patterns: Match existing code style and conventions
During implementation:
- •Read relevant existing files to understand patterns
- •Use Grep and Glob to find related code
- •Make incremental changes, verifying each step works
If the plan is unclear or incomplete:
- •Ask the user for clarification before proceeding
- •Document assumptions made during implementation
Step 4: Create Pull Request
After implementation is complete, create a pull request:
gh pr create --title "Implement #$ARGUMENTS: <issue-title>" --body "$(cat <<EOF ## Summary Implements #$ARGUMENTS <Brief description of changes> ## Changes Made - <List of key changes> ## Testing - <How the changes were tested> ## Related Issue Closes #$ARGUMENTS --- *Generated by Claude Code* EOF )"
Link the PR to the issue using "Closes #N" or "Fixes #N" syntax.
Step 5: Comment on Issue
Add a comment to the original issue linking to the PR:
gh issue comment $ARGUMENTS --body "Implementation PR created: <pr-url> The implementation follows the plan outlined in this issue. Please review the PR for details."
Step 6: Add Label
Add the implementation-started label to indicate work is in progress:
gh issue edit $ARGUMENTS --add-label "implementation-started"
If the label doesn't exist, create it first:
gh label create "implementation-started" --description "Implementation work has started" --color "FFA500"
Error Handling
Authentication Issues
If gh CLI is not authenticated:
Error: gh CLI requires authentication. Run 'gh auth login' first.
Missing Implementation Plan
If no clear implementation plan is found in the issue:
- •Inform the user that no implementation plan was found
- •Suggest using the
github-issue-plannerplugin first to create a plan - •Ask if the user wants to proceed with their own implementation approach
Merge Conflicts
If there are conflicts with the base branch:
- •Report the conflicts to the user
- •Offer to help resolve them or wait for user decision
Label Creation Fails
If unable to create the label (permissions issue):
- •Continue without labeling
- •Inform the user that the label could not be added
Important Guidelines
Code Quality
- •Follow existing code patterns and conventions
- •Write clean, readable code
- •Include appropriate comments where logic is non-obvious
- •Handle edge cases mentioned in the plan
Commits
- •Make atomic commits for logical changes
- •Write clear commit messages that reference the issue number
- •Do not commit generated files or secrets
Testing
- •Run existing tests to ensure no regressions
- •Add tests as specified in the implementation plan
- •If no tests are specified, add reasonable test coverage
Communication
- •Report progress at each major step
- •Ask for clarification when requirements are ambiguous
- •Summarize what was implemented when complete
Completion Summary
After successful completion, provide a summary:
- •PR URL and number
- •List of files changed
- •Tests added or modified
- •Any deviations from the original plan
- •Next steps (code review, CI checks, etc.)