SKILL.md
Analyze and fix GitHub issue $ARGUMENTS
Prerequisites
- $ARGUMENTS: issue number (123) or URL
- Run from repository root
Process
- Create TodoWrite plan: issue review, analysis, find files, implement, test, commit, create PR
- Fetch issue and create branch in parallel (independent):
- Fetch issue: gh issue view $ARGUMENTS - Create branch: git checkout -b fix/issue-$ISSUE_NUMBER
- Analyze problem, confirm understanding with user via AskUserQuestion, propose fix approach
- Find related files using Task tool (subagent_type=Explore)
- Implement fix with Edit tool following "File Edit Guidelines" section below, avoid security issues (XSS, SQL injection), mark todos complete
- Run tests (unit, integration, e2e). Add new tests when: adding new functions/endpoints, fixing bugs without existing test coverage, or changing behavior
- Commit changes sequentially (do not commit until all fixes complete):
git add <changed-files>
git commit -m "$(cat <<'EOF'
fix: <brief> (#$ISSUE_NUMBER)
- details
- scope
Fixes #$ISSUE_NUMBER
EOF
)"
- Create PR using pr-creator skill:
- Title: fix: <brief> (#$ISSUENUMBER) - Body must include: Fixes #$ISSUENUMBER
- Output PR URL:
https://github.com/user/repo/pull/123
Error Handling
- No gh CLI: guide installation
- No issue: verify number
- Test failure: analyze and continue fixing
- PR creation failure: guide manual creation
File Edit Guidelines
Before editing any file:
- Read target file (or 2-3 similar files for new files) to understand: language, comment style, formatting, structure
- Match existing style: language, comments, formatting, structure
- Only deviate from existing style if issue explicitly requires it
Example: If existing code has English comments, use English. If Japanese, use Japanese.
Notes
- Large changes: suggest split into smaller PRs
- Breaking changes: explicitly confirm with user
- Never push directly to main/master