Work with jj-spr for submitting and updating stacked GitHub Pull Requests. Use when the user explicitly mentions 'jj-spr', 'jj spr', 'stack pull request', 'stacked PR', or 'submit for review'. Integrates with jj commit workflow.
Limited to specific tools
Additional assets for this skill
This skill is limited to using the following tools:
Submit and manage stacked GitHub PRs using jj-spr. Integrates with jj plugin's commit stacking workflow for sharing curated commits as reviewable PRs.
Local curation:
/jj:commit "feat: add login UI"
/jj:split test # Separate concerns
/jj:squash # Clean up WIP commits
Submit to GitHub:
jj spr submit # Create PRs for entire stack
The flow: Curate locally → Submit with jj spr submit → Amend commits → Update with jj spr update
jj spr submit # Submit all commits in stack
jj spr submit -r <change-id> # Submit from specific commit upward
jj spr submit -r <id> --no-deps # Submit specific commit only
jj spr update # Update all PRs with local changes
jj spr update -r <change-id> # Update specific PR
jj spr update --force # Force update (skip checks)
jj spr info # Show PR info for commits
jj spr info -r <change-id> # Show info for specific commit
gh pr list # View PRs
gh pr view <pr-number> --web # Open PR in browser
# 1. Build stack locally
/jj:commit "feat(auth): add login endpoint"
/jj:commit "test(auth): add login tests"
/jj:commit "docs(auth): document auth flow"
# 2. Review and curate
jj log
/jj:split test # Split if needed
/jj:squash # Squash if needed
# 3. Submit
jj spr submit
Result: Each commit becomes a PR, stacked automatically.
# 1. Edit specific commit
jj edit <change-id>
# 2. Make changes
# ... edit files ...
# 3. Update description if needed
jj describe -m "feat(auth): add login endpoint
Addressed review feedback:
- Add input validation
- Improve error messages"
# 4. Return to working copy and update PRs
jj new
jj spr update
Result: PR updated, dependent PRs rebased automatically.
# Add new commits on top
/jj:commit "feat(auth): add password reset"
/jj:commit "test(auth): add reset tests"
# Submit new commits (existing PRs unchanged)
jj spr submit
# Edit earlier commit
jj edit <change-id>
# Fix bug
# ... make changes ...
# Return and update all affected PRs
jj new @+
jj spr update
# Reorder with rebase
jj rebase -r <commit> -d <new-parent>
# Update PRs
jj spr update
# Edit commit with mixed changes
jj edit <change-id>
# Split
/jj:split "*settings*"
# Return and update
jj new @+
jj spr update
Result: Original PR split into two new PRs.
Use when:
Consider alternatives when:
jj git push + gh pr create)/jj:commit, /jj:split, /jj:squash)/jj:split test # Split mixed concerns
/jj:squash # Squash WIP commits
jj log # Verify stack order
nix flake check # Run tests
jj spr update syncs PR descriptionsSubmit entire stack:
jj spr submit
Update after amending:
jj edit <change-id>
# ... make changes ...
jj new
jj spr update
Check stack status:
jj log -T 'concat(change_id.short(), ": ", description)'
jj spr info
Wrong base branch:
gh pr edit <pr-number> --base <correct-base>
Out of order:
jj rebase -r <commit> -d <new-parent>
jj spr update
Conflicts after update:
jj rebase -d main
# ... resolve conflicts ...
jj spr update
WIP commits submitted:
gh pr close <pr-number>
/jj:squash # Clean up
jj spr submit # Resubmit
Use this Skill when: