gh-issue-fix
Analyze and resolve a GitHub issue from intake through fix, validation, and push using gh, local edits, and git. Use this skill when you need to analyze and fix a GitHub issue end-to-end using gh and local changes.
安装与使用
请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。
查看来源 ↗使用指南技能说明
GH Issue Fix Flow
Compliance
- Check against GOLD Industry Standards guide in ~/.codex/AGENTS.override.md
Overview
Resolve a GitHub issue from intake through fix, validation, and push using gh, local edits, and git.
See references/contract.yaml and references/evals.yaml for contract and eval expectations.
When to use
- Fixing a GitHub issue end-to-end using gh and local changes.
- When a user provides an issue number to resolve.
Inputs
- Issue number and repo (owner/name).
- Any reproduction steps or constraints.
Outputs
- Code changes, tests, and a closing commit pushed to the repo.
- Summary with evidence and follow-ups.
Required response headings
Every response must include these headings:
-
## When to use -
## Inputs -
## Outputs
Edge-case template (missing info)
Use this exact structure when key inputs are missing:
## When to use
- This skill applies to GitHub issue fixes using gh and local edits.
## Inputs
- Missing: <issue number and repo>.
## Outputs
- None until inputs are provided.
Failure-mode template (out of scope)
Use this exact structure when the request is out of scope:
## When to use
- This skill applies to GitHub issue fixes using gh and local edits. The current request is out of scope.
## Outputs
- None (out of scope).
## Inputs
- None (out of scope).
Philosophy
- Fix the smallest surface area that resolves the issue.
- Prefer evidence-backed reproduction and verification.
- Preserve repo conventions and reviewer expectations.
Guiding questions
- What is the minimal reproduction and expected behavior?
- Why is this the correct fix vs a workaround?
- What is the least risky change that solves the issue?
- How will the fix be verified (tests, builds, repro)?
Workflow
1) Intake and issue context
- Use
gh issue view <id> --repo <owner/repo> --commentsto get the full issue context. - If the repo is unclear, run
gh repo view --json nameWithOwnerto confirm. - Capture reproduction steps, expected behavior, and any maintainer notes.
2) Locate the code path
- Use
rg -nto locate likely files and entry points. - Read the relevant code paths with
sed -norrg -ncontext. - Follow repo-specific conventions (AGENTS/CLAUDE instructions).
3) Implement the fix
- Edit the minimal set of files.
- Keep changes aligned with existing architecture and style.
- Add tests when behavior changes and test coverage is practical.
4) Build and test
- Use repo-provided build/test scripts when available.
- Prefer targeted test suites to reduce risk and runtime.
- Report warnings or failures; do not hide them.
5) Commit and push
- Check for unrelated changes with
git status --short. - Stage only the fix (exclude unrelated files).
- Commit with a closing message:
Fix … (closes #<issue>). - Push with
git push.
6) Report back
- Summarize what changed and where.
- Provide test results (including failures).
- Note any follow-ups or blocked items.
Variation rules
- Vary depth by issue severity (typo vs crash vs data loss).
- Vary validation based on impact (unit tests vs full build).
- Use a different investigative path when the initial hypothesis fails.
Empowerment principles
- Empower the user to approve the plan before code changes.
- Empower maintainers with clear trade-offs and rollback notes.
- Empower reviewers with evidence-linked summaries.
Anti-patterns to avoid
- Fixing without a reproducible understanding of the issue.
- Broad refactors that are not required to close the issue.
- Hiding test failures or skipping validation without consent.
Example prompts
- “Fix issue #123 in this repo and push the commit.”
- “Use gh to inspect issue #45, implement the fix, and run tests.”
Remember
The agent is capable of extraordinary work in this domain. These guidelines unlock that potential—they don't constrain it. Use judgment, adapt to context, and push boundaries when appropriate.
Constraints
- Redact secrets/PII by default.
- Avoid destructive operations without explicit user direction.
Validation
- Run any relevant checks or scripts when available.
- Fail fast and report errors before proceeding.
Procedure
- Clarify scope and inputs.
- Execute the core workflow.
- Summarize outputs and next steps.
Antipatterns
- Do not add features outside the agreed scope.
使用示例
查看来源仓库中的使用示例与配置说明。
查看来源 ↗来源历史
- 收录时间
- 2026-01-20
- 索引更新时间
- 2026-01-31
- Branch
- main
收录与同步日期属于本站记录。源码修改历史请查看来源仓库。
GitHub ↗chat Comments (0)
Sign in to join the discussion and leave a comment.
No comments yet. Be the first to share your thoughts!