| name | issue-pr |
| description | Create a GitHub issue describing the root problem behind current changes, then open a PR that references it |
| allowed-tools | Bash(git diff:*) Bash(git status:*) Bash(git log:*) Bash(git branch:*) Bash(git stash:*) Bash(git checkout:*) Bash(git push:*) Bash(gh issue list:*) Bash(gh issue create:*) Bash(gh pr create:*) |
Create Issue and PR from Current Changes
Context
- Current branch: !
git branch --show-current
- Git status: !
git status --short
- Changes vs main: !
git diff main...HEAD
- Staged changes (if on main): !
git diff --cached
Your task
-
Analyze the changes to identify the root problem that motivated them. Focus on what was broken or missing, not what was done to fix it.
-
Find or create a GitHub issue:
- First, search existing open issues with
gh issue list --search "<keywords>" using a few relevant keywords from the root problem
- If a matching issue exists, use it and note its number
- If no relevant issue exists, create one with
gh issue create:
- A concise title describing the root problem
- A body explaining the problem, its impact, and any relevant context. Do NOT describe the solution.
-
Create a branch (if on main) using git checkout -b with a short descriptive name.
-
Commit all changes using git add and git commit with a conventional commit message.
-
Push the branch to origin with git push -u origin <branch>.
-
Create a PR using gh pr create that:
- Has a title in conventional-commit format summarizing what was done
- Sets the body to only the functional issue link
Closes #<issue-number>
(e.g. gh pr create --title "<title>" --body "Closes #<issue-number>").
Do NOT write a description, summary, or approach; the human fills in the body.
Do steps 3-6 in a single message after creating the issue.