gh-issue-fix
Skill2 starsChanged 42 days agoMITView on GitHub
Implement a GitHub issue end to end through testing, commits, and a linked pull request without routine approval pauses
- Commits and pushes
In this repository22 other files it gives its agents.
- AGENTS.mdAGENTS.md
- changelog-bump-verSkill
- gh-copilot-review-readSkill
- gh-copilot-review-resolveSkill
- gh-copilot-reviewSkill
- gh-cr-submitSkill
- gh-issueSkill
- gh-pr-mergeSkill
- gh-protect-default-branchSkill
- gh-pr-reviewSkill
- gh-prSkill
- gh-releaseSkill
- git-branchSkill
- git-commitSkill
- git-pushSkill
- make-changelogSkill
- mir-skills-installSkill
- mir-skills-updateSkill
- python-venvSkill
- save-planSkill
- session-noteSkill
- work-reportSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
16 rules. About 0 are common, 13 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈13
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 15
Create or resume a dedicated issue branch
- Very specific: line 17
Use git-commit and gh-pr to commit, push, and open a linked PR
- Distinctive: line 18
Verify the PR targets the default branch and closes the issue when merged
- Distinctive: line 22
Use when the user asks to fix or implement a GitHub issue by number or URL.
- Distinctive: line 28
Use the supplied issue number or URL.
- Very specific: line 29
Check GitHub CLI access and identify the issue repository and its default branch.
- Distinctive: line 37
Keep the issue number, URL, repository, and detected default branch available throughout the workflow.
- Distinctive: line 42
Read the repository instructions and relevant code, tests, entry points, and interfaces.
- Distinctive: line 65
Run checks appropriate to the change and fix failures introduced by the work.
- Distinctive: line 67
If a failure or missing dependency prevents required validation, investigate it and report the unresolved blocker.
- Distinctive: line 74
Check whether the issue branch already has an open PR in the target repository:
- Very specific: line 85
Use the branch name for a same-repository head and <fork-owner>:<issue-branch> for a fork.
- Distinctive: line 86
If a matching open PR already exists, update that PR instead of creating a duplicate, preserve unrelated description content, and ensure …
- Distinctive: line 94
Do not merge the PR or close the issue manually as part of this workflow.
- Distinctive: line 100
If authentication, permissions, a rejected push, or PR creation blocks publication, preserve completed work and report the exact failed …
- Distinctive: line 101
Before retrying PR creation after an ambiguous response, check for an existing PR to avoid duplicates.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
What I do
- Fetch an issue and investigate the relevant code
- Present a concise implementation plan and continue without waiting for approval
- Create or resume a dedicated issue branch
- Implement, test, and review the changes
- Use
git-commitandgh-prto commit, push, and open a linked PR - Verify the PR targets the default branch and closes the issue when merged
When to use me
Use when the user asks to fix or implement a GitHub issue by number or URL. The default outcome is a tested change published as a PR, with merging left as a separate action.
Honor a narrower user request, such as planning only or leaving changes uncommitted. Otherwise, invocation authorizes the issue-to-PR workflow without additional plan, commit, push, or PR confirmation prompts. Continue to respect tool permissions, branch protections, and execution-mode restrictions.
Phase 1: Issue Intake
- Use the supplied issue number or URL; ask for it only if missing.
- Check GitHub CLI access and identify the issue repository and its default branch. Resolve
<owner/repo>from the supplied URL, or from the current checkout for a bare issue number:
For an issue URL, resolve its repository explicitly and usegh auth status git remote -v gh repo view <owner/repo> --json nameWithOwner,defaultBranchRef gh issue view <number-or-url> --repo <owner/repo> --json number,url,title,body,labels,comments,assignees,state--repo <owner/repo>for subsequent GitHub commands. Confirm the working checkout belongs to that repository or its fork; do not apply the issue to an unrelated checkout. - Keep the issue number, URL, repository, and detected default branch available throughout the workflow. Do not assume the default branch is named
mainormaster. - Investigate unclear requirements in the code before asking questions. Ask only for missing information that prevents a correct implementation; choose reasonable defaults for routine decisions.
Phase 2: Exploration and Plan
Read the repository instructions and relevant code, tests, entry points, and interfaces. Identify the root cause or feature requirements and the smallest coherent change that satisfies the issue.
Present a brief plan covering the affected files, implementation steps, and validation. Proceed immediately to branch preparation and implementation; do not ask the user to approve the plan.
Phase 3: Dedicated Issue Branch
- Inspect the current work before changing branches:
git status --short git branch --show-current - Reuse a feature branch only when its commits and issue/PR context establish that it belongs to this issue and its PR has not been merged or closed. A feature branch for unrelated or completed work must not be reused.
- Otherwise, fetch the target repository's default branch and create
<prefix><issue-number>-<short-slug>from that remote branch. Usefix/for bugs,feat/for enhancements, andchore/otherwise; keep the slug short and descriptive.
Select the remote that corresponds to the target repository; for a fork this may differ from the push remote. If the proposed branch name already belongs to other work, choose an unused suffix without resetting it.git fetch <base-remote> git switch --no-track -c <issue-branch> <base-remote>/<default-branch> - Preserve unrelated staged and unstaged changes. Use an isolated worktree when needed to keep the issue work separate; do not discard user changes or silently include them in the issue commit.
Phase 4: Implementation and Validation
- Implement the plan using the repository's existing conventions.
- Run checks appropriate to the change and fix failures introduced by the work.
- Review the final diff against the issue's requirements and confirm it contains only intended changes.
- If a failure or missing dependency prevents required validation, investigate it and report the unresolved blocker; do not claim a tested result or proceed to publication with known unresolved validation failures. Report checks that are not applicable separately.
Phase 5: Commit, Push, and Linked PR
Continue automatically when implementation and validation are complete:
- Invoke
git-committo stage only the issue changes and create an appropriate commit, following repository commit and CI-skip rules. If the helper skill is unavailable, perform those same steps directly using explicit file paths; never include unrelated staged files. - Check whether the issue branch already has an open PR in the target repository:
For forks, identify the head repository as well as the branch so a similarly named branch is not mistaken for this work. Surface API/authentication errors instead of treating them as an empty result.gh pr list --repo <owner/repo> --head <issue-branch> --state open --json number,url,headRefName,headRepository,headRepositoryOwner,baseRefName,body - Prepare the PR body with
Closes #<issue-number>before creation so merging into the default branch closes the issue. For an explicitly requested cross-repository issue reference, useCloses <owner/repo>#<issue-number>. - If no matching PR exists, invoke
gh-prwith the issue context and the detected default branch as the explicit base, overriding that helper'smaster/mainfallback. Let it push the branch, self-assign the PR, and perform its conditional changelog sync. If the helper is unavailable, push the issue branch and create the PR directly:
Use the branch name for a same-repository head andgit push -u <push-remote> <issue-branch> gh pr create --repo <owner/repo> --base <default-branch> --head <head> --assignee @me --title "<title>" --body-file <pr-body-file><fork-owner>:<issue-branch>for a fork. Write a concise summary, key changes, and validation results to the body file. - If a matching open PR already exists, update that PR instead of creating a duplicate, preserve unrelated description content, and ensure its base and closing reference are correct. Push new commits to its existing head branch; follow the helper skills' conditional changelog rules where applicable.
- Verify publication:
Confirm the PR is open, targets the detected default branch, contains the latest committed work, and lists the intended issue ingh pr view <pr-number> --repo <owner/repo> --json url,state,baseRefName,headRefName,headRefOid,body,closingIssuesReferences git rev-parse HEADclosingIssuesReferences. Fix a missing closing reference and verify again; report any unresolved verification failure accurately.
Do not merge the PR or close the issue manually as part of this workflow. GitHub closes the linked issue when the PR is merged into the default branch; see GitHub's issue-linking documentation.
Completion and Blockers
- Return the PR URL, a concise change summary, and validation results without offering commit/PR creation as optional next steps.
- Explain that the linked issue remains open until merge.
- If authentication, permissions, a rejected push, or PR creation blocks publication, preserve completed work and report the exact failed step and remaining work. Respect branch protection and do not force-push to overcome rejection.
- Before retrying PR creation after an ambiguous response, check for an existing PR to avoid duplicates. If no issue change is needed and no existing PR completes it, report that finding rather than creating an empty commit or PR.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

