From jj-claude-plugin
Use when amending a jj change and updating its associated PR. Triggers on "update PR", "address review feedback", "amend and push", "fix review comments", or when modifying code that already has an open PR.
How this skill is triggered — by the user, by Claude, or both
Slash command
/jj-claude-plugin:jj-spr-amend-updateThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
**Before running ANY SPR command, check if you're in a jj workspace.**
Before running ANY SPR command, check if you're in a jj workspace.
if [ -f .jj/repo ]; then
MAIN_REPO=$(dirname "$(dirname "$(cat .jj/repo)")")
cd "$MAIN_REPO"
fi
SPR requires .git/ which only exists in the main colocated repo, not in
workspaces. All jj spr commands must run from the main repo.
The core day-to-day cycle: modify a jj change locally, then update its PR on GitHub. This covers addressing review feedback, fixing bugs in open PRs, and any post-creation modification.
Pull Request: URLjj describe -m "..." replaces the ENTIRE commit message. If the change
already has a PR (created by jj spr diff), a blind jj describe wipes
the Pull Request: tracking URL and causes SPR to create a duplicate PR.
Before ANY jj describe on a change that has a PR:
# 1. Read current description to check for Pull Request: line
jj log -r <change-id> --no-graph -T 'description'
# 2. Include the Pull Request: line at the bottom of the new message
jj describe -r <change-id> -m 'Updated summary
Pull Request: https://github.com/org/repo/pull/12345'
This applies every time you touch a commit message — whether adding a description, fixing a typo, or appending a section. Read first, preserve the URL, always.
jj log # find the change-id for the PR to modify
Look for the Pull Request: URL in the commit message to confirm which PR
this change corresponds to.
jj edit <change-id> # @ now points at the PR change
This makes the PR change the current working copy. All file modifications will be recorded in this change.
Edit files as needed. jj automatically tracks all changes — no git add
required.
@MANDATORY after every edit session:
jj new <change-id> # @ is now empty, @- is the modified change
This lets the user review what changed with jj diff -r @- before pushing.
Never skip this step. Never leave @ pointing at a PR change after edits.
jj spr diff -m "addressed feedback" -r <change-id>
Always pass -m when updating an existing PR. Without it, SPR prompts
interactively for an update message, blocking automation. The -m value
is used as the update comment, not the PR description.
SPR pushes a new synthetic commit to the PR branch. GitHub shows it as an incremental update — reviewers see only the new changes in the diff.
# Quick check that the PR updated correctly
jj spr list
Or verify on GitHub that the diff looks right.
When modifying a change in the middle of a stack:
jj spr diff -m "updated mid-stack change" -r <modified-change>::<top-of-stack>
Why the full range? Because the rebase changes the tree of every descendant, and SPR needs to push updated synthetic commits for each one.
When addressing review comments on a PR:
Read review comments
gh pr view <number> --comments
Identify which change to modify — match the PR number to a change
via Pull Request: URL in jj log
Follow the amend-update loop (Steps 1-6 above)
Reply to review comments after pushing updates:
gh pr comment <number> --body "Addressed — updated in latest push"
If multiple PRs in a stack have review feedback:
@jj spr diff -m "addressed review feedback" -r <first-modified>::<top-of-stack>
Working bottom-up prevents redundant rebases.
@ — leaves user unable to review changes
before pushingjj squash instead of jj edit — jj edit modifies in place,
jj squash merges changes from a child into a parent. For the
amend-update loop, jj edit is what you want.jj describe -m "..." without preserving the Pull Request:
URL — wipes SPR's tracking URL and causes duplicate PRs on next
jj spr diff. Always read the current description first.npx claudepluginhub edmondop/jj-claude-plugin --plugin jj-claude-pluginCollects, triages, and fixes PR review comments in a unified workflow using isolated worktrees for safe implementation. Invoke via /address-pr-feedback for batch-resolving feedback.
Guides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.