fix-issue-github-auto
Skill0 starsChanged 9 months agoMITView on GitHub
Fully automate resolving a GitHub issue: create a linked branch, apply code changes, commit, open a PR, and resolve any conflicts.
- Deletes or force-pushes
- Commits and pushes
In this repository32 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- action-itemsSkill
- add-spikeSkill
- changelogSkill
- commitSkill
- create-branchSkill
- create-issue-branch-githubSkill
- create-issue-githubSkill
- create-mr-gitlab-gitSkill
- create-pr-github-gitSkill
- create-pr-githubSkill
- decisionSkill
- emailSkill
- fix-issue-githubSkill
- hldSkill
- implement-lldSkill
- jira-ticket-gitSkill
- jira-ticketSkill
- lldSkill
- prSkill
- reconcileSkill
- resolve-conflictsSkill
- resolve-open-questionsSkill
- reviewSkill
- spikeSkill
- standup-gitSkill
- standupSkill
- syncSkill
- tag-release-ansibleSkill
- tag-release-npmSkill
- tag-releaseSkill
- tldrSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 1 is distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 13
Check that gh is installed and authenticated by running gh auth status.
- Very specific: line 15
Check if gh issue develop is available by running gh issue develop --help 2>/dev/null.
- Very specific: line 16
If available: run gh issue develop $ARGUMENTS --checkout.
- Very specific: line 17
If not available (older gh): derive the branch name from the issue number and title — lowercase, spaces and special characters replaced …
- Very specific: line 25
Run gh pr view --json mergeable --jq '.mergeable'.
- Very specific: line 26
Run git fetch origin then git rebase origin/<base>.
- Distinctive: line 28
If a conflict is too ambiguous to resolve safely, run git rebase --abort, explain what was ambiguous, and ask the user to resolve it …
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 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
Fully automate resolving a GitHub issue: create a linked branch, apply code changes, commit, open a PR, and resolve any conflicts.
$ARGUMENTS is the issue number. If $ARGUMENTS is empty, ask the user to provide an issue number and stop.
Steps:
- Check that
ghis installed and authenticated by runninggh auth status. If not, tell the user and stop. Rungh issue view $ARGUMENTS --json title,stateto confirm the issue exists and is open. If it doesn't exist or is already closed, tell the user and stop. - Check if
gh issue developis available by runninggh issue develop --help 2>/dev/null. Then:- If available: run
gh issue develop $ARGUMENTS --checkout. GitHub names the branch<number>-<issue-title-slug>automatically and links it to the issue. - If not available (older gh): derive the branch name from the issue number and title — lowercase, spaces and special characters replaced with hyphens, truncated to ~5 words, prefixed with the issue number (e.g.
12-add-decision-command). Rungit checkout -b <branch-name>.
- If available: run
- Run
gh issue view $ARGUMENTS --json title,body,comments,labelsto fetch the full issue context. Analyse the title, body, and comments to understand what is being requested. Explore the codebase to find the relevant files, reading them to understand the current implementation before making any changes. Apply the minimum code changes needed to resolve the issue — fix bugs by correcting the root cause, add features by following existing patterns, and do not refactor or change unrelated code. - Run
git diff --staged --statto check for staged changes. If nothing is staged, rungit add -Ato stage everything. Rungit diff --stagedto review what will be committed. Runls CHANGELOG.md 2>/dev/null— if a changelog exists, regenerate the## Unreleasedsection treating the new changes as already included, write it back toCHANGELOG.md, and rungit add CHANGELOG.md. Write a commit message in Conventional Commits format (type(scope): short description, imperative tense, under 72 characters). Commit immediately withgit commit -m "...". - Get the default branch with
gh repo view --json defaultBranchRef --jq '.defaultBranchRef.name'. Check if an upstream is set withgit rev-parse --abbrev-ref --symbolic-full-name @{upstream} 2>/dev/null. If not set, rungit push -u origin HEAD. If set, rungit push. Rungit log --oneline <base>..HEADandgit diff <base>...HEAD --statto understand the branch changes. Derive a PR title (imperative tense, under 72 chars) and description from the commits and issue context. IncludeCloses #$ARGUMENTSin the PR body to link the issue. Check if a PR already exists withgh pr view --json url,number 2>/dev/null. If no PR exists, rungh pr create --title "<title>" --body "<description>". If one exists, rungh pr edit --title "<title>" --body "<description>". - Run
gh pr view --json mergeable --jq '.mergeable'. If the result isCONFLICTING:- Run
git fetch originthengit rebase origin/<base>. - If the rebase stops with conflicts, run
git diff --name-only --diff-filter=Uto list conflicting files. For each file, read it, resolve conflicts by merging both sides if both changes are needed, preferring incoming (theirs) if it supersedes the current change, or keeping current (ours) if the incoming change is unrelated. Rungit add <file>after resolving each file. Rungit rebase --continuewhen all conflicts are resolved. - If a conflict is too ambiguous to resolve safely, run
git rebase --abort, explain what was ambiguous, and ask the user to resolve it manually. - On success, run
git push --force-with-lease.
- Run
- Print the PR URL, confirm the issue is linked, and summarise what code was changed and why.
$ARGUMENTS
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.

