Create/update GitHub issue, branch, commit, PR, then continue implementing
Argument $ARGUMENTS is either:
42) — update it and wire up the branch/PRadd retry logic for HTTP calls) — create a new issue firstIf $ARGUMENTS is a number — view the existing issue:
gh issue view $ARGUMENTS
If $ARGUMENTS is a description — create a new issue:
gh issue create \
--title "$ARGUMENTS" \
--body "## Context
<fill in context from current conversation / recent commits>
## Acceptance criteria
- [ ] <criterion 1>
- [ ] <criterion 2>"
Capture the new issue number from the output (e.g. #59).
If the only changed files are under .claude/skills/ (skill updates, no source code changes):
git diff --stat
If all changed files are .claude/skills/** files:
main:
git add .claude/skills/<changed-file>
git commit -m "$(cat <<'EOF'
<imperative summary under 72 chars>
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
EOF
)"
git push
Otherwise continue with the full workflow below.
git checkout main && git pull
git checkout -b feature/<issue-number>-<short-slug>
Where <short-slug> is 2–4 words from the issue title, kebab-cased (e.g. feature/59-retry-http-calls).
If a matching branch already exists, check it out instead:
git checkout feature/<issue-number>-<short-slug>
Check for uncommitted work first:
git status
git diff --stat
If there are changes to commit:
git add <changed-files>
git commit -m "$(cat <<'EOF'
<imperative summary under 72 chars>
Closes #<issue-number>
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
EOF
)"
If there are no changes yet, skip this step — implementation comes after the PR is open.
git push -u origin HEAD
gh pr create \
--title "<concise title matching issue>" \
--body "$(cat <<'EOF'
## Summary
- <bullet 1>
- <bullet 2>
## Test plan
- [ ] Run `./mvnw test -pl <module>`
- [ ] Verify <key behavior>
Closes #<issue-number>
🤖 Generated with [Claude Code](https://claude.com/claude-code)
EOF
)" \
--draft
Remove --draft if there are already commits with real code on the branch.
Report the PR URL to the user.
Now implement the work described in the issue:
./mvnw test -pl <module> after each meaningful changegh pr ready