From jj-claude-plugin
Use when setting up SPR in a Jujutsu repository for the first time. Triggers on "set up spr", "configure jj spr", "init spr", or when a repo needs SPR configuration.
How this skill is triggered — by the user, by Claude, or both
Slash command
/jj-claude-plugin:jj-spr-initThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Set up a Jujutsu repository to use SPR for GitHub pull request management. This skill guides the full initialization: prerequisites, token setup, config verification, and connectivity test.
Set up a Jujutsu repository to use SPR for GitHub pull request management. This skill guides the full initialization: prerequisites, token setup, config verification, and connectivity test.
Before running ANY SPR command, check if you're in a jj workspace.
A jj workspace has .jj/ but NO .git/. SPR requires .git/ and will
fail silently or with confusing errors in a workspace.
# Check: is .jj/repo a FILE (workspace) or a DIRECTORY (main repo)?
if [ -f .jj/repo ]; then
echo "IN WORKSPACE — read .jj/repo for main repo path"
cat .jj/repo
else
echo "IN MAIN REPO"
fi
If .jj/repo is a file: You're in a workspace. The file contains the
path to the main repo's .jj/repo. Derive the main repo root:
# .jj/repo contains e.g. /Users/you/code/myproject/.jj/repo
# The main repo root is two directories up from that path
MAIN_REPO=$(dirname "$(dirname "$(cat .jj/repo)")")
cd "$MAIN_REPO"
All SPR commands must run from the main colocated repo, not a workspace.
Before running jj spr init, verify all prerequisites:
# 1. jj is installed
jj version
# 2. git is installed
git version
# 3. Repo is colocated (BOTH must exist)
ls -d .jj .git
If .git/ is missing: The repo is not colocated. SPR requires a colocated repo because it pushes Git branches to GitHub.
# Convert to colocated (from inside the jj repo)
jj git init --colocate
If .jj/ is missing: This is a plain Git repo. Initialize jj first:
jj git init --colocate
jj spr init
This interactive command will prompt for:
repo scope for private repos, public_repo for publicowner/repo format (auto-detected from git remote if possible)The config is stored in .git/config under the spr.* namespace.
After init, verify everything is set:
# Check required config values
git config spr.githubRepository # should print owner/repo
git config spr.githubToken # should print the token
# Optional config
git config spr.branchPrefix # default: spr/
git config spr.requireApproval # default: not set
jj spr list
If this succeeds (even with "No pull requests found"), the setup is complete.
Common failures:
401 Unauthorized — token is invalid or expired404 Not Found — wrong spr.githubRepository value, or token lacks repo scope for private reposCould not find .git directory — not a colocated repojj version worksgit version works.jj/ and .git/ both existjj spr init completedgit config spr.githubRepository returns owner/repogit config spr.githubToken is setjj spr list succeedsnpx claudepluginhub edmondop/jj-claude-plugin --plugin jj-claude-pluginGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.