/code:jjfrom code
Provides Jujutsu (jj) VCS support for colocated jj/git repos: auto-activates on .jj directory, jj commands, or teach requests. Handles operations with safety guards against rewriting remote bookmarks or human changes.
Ships in code. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Use Jujutsu well in a colocated jj and git repository, and when teach mode is on, explain each jj action in the final message of the turn so the human learns the flow and the raw commands.
.jj directory at its root, or jj root succeeds..jj directory: use git..git but no .jj, so jj commands fail there.
Use git in that worktree, and tell the user that jj is unavailable in it.commit-message skill when it is available, then apply the message with jj describe -r <rev> --stdin.jj.
Skip the notice when the user asked for the skill by name or slash command; spelling and spacing need not match.
A phrase from this skill's own trigger list is not a name — naming the work is not naming the skill.These admit no exceptions. "This case is different" does not license skipping one.
jj git push is the human's command, and so is any alias or tool that pushes, including its dry run.
The agent prepares the stack and hands it over.squash --into, rebase, describe -r, or abandon on any revision other than @, run the guard: jj log -r '(<targets>) & ::remote_bookmarks()' --no-graph -T 'change_id.short() ++ "\n"'.
Non-empty output means the fix goes on top as a new change instead.<base>..@, where base is the change the preflight reported at Orient.
Every command that selects changes to rewrite (absorb --into, sign -r, the finalize checks) uses that range, never authorship, because the agent and the human share one author.jj undo or jj op restore without first reading jj op log -n 5 and confirming the top operation is the agent's own.
Never run either while another workspace is live.
Prefer jj op revert <op>.jj abandon anything but the agent's own changes from this session.
Abandon drops the content; it does not fold it into the parent.-m to new, describe, commit, split, and squash.
Never run jj squash -i, jj diffedit, bare jj resolve, or jj split without paths.
Run every jj command with --no-pager --color=never and with JJ_EDITOR=false in the environment so a missed -m fails instead of hanging.git commit, checkout, switch, reset, stash, rebase, merge).
Read-only git (git log, git diff, git blame) is fine.--ignore-immutable.
Per-command --config and --config-file are allowed.references/setup.md; do not run its steps..jj or .git.Teach mode is on when either holds:
AGENTS.md, CLAUDE.md, or CLAUDE.local.md at the repo root) contains a line that reads exactly jj: teach.
The preflight script reports this.When teach mode is on, read references/teach.md before the first jj command of the turn and follow it.
It adds a jj section to the final message of every turn and a short plan block at each confirmation stop.
It never adds commentary mid-turn.
When teach mode is off, the final message names each change the turn created or modified, one line each (change ID, description), and nothing more about jj.
The agent stops and waits for the human at these points and no others. In teach mode each stop carries a plan block; teach mode never adds a stop.
@ holds edits with no description.jj rebase.jj abandon of anything other than a spike @ the agent created this turn.references/recovery.md).The loop is Orient, Start, Work, Finalize, Recover. Recover is entered from any phase.
Run at the start of every turn that will use jj.
scripts/jj_preflight.py from the repo.
Read the JSON on stdout.
It reports the jj version, colocation, identity, the agent signing config, the immutability and conflict-marker settings, the teach flag, the state of @, the base of the agent's stack, the nearest bookmarks, the trunk, the workspace, and the current operation ID.op_id, base, and workspace.
The operation ID is the turn's start marker for scripts/jj_turn_log.py; base bounds every revset over the agent's own changes; workspace filters the turn log.jj config list aliases.
When an alias wraps a step you are about to run, use the alias.
The rules in this skill apply to what an alias expands to, not to its name: an alias that wraps jj sign still takes the -r range, one that wraps jj-hooks run still takes the arguments in references/finalize.md, and one that pushes, even as a dry run, is the human's.not-a-jj-repo, stop and tell the user jj does not apply here.setup-required, stop.
Read references/setup.md and walk the user through the failed items.
Do not run them.decision-required, @ holds edits with no description.
Stop and report the file list from the preflight output.
Offer to close the in-flight work in the repo's current native way: jj describe -m then jj new in a jj repo, or the repo's git commit convention if it is mid-conversion.
Wait for the answer.@ is empty and has no description, describe it: jj describe -m "<intent>".jj new -m "<intent>".@ at the next jj command.
Run jj st when a logical step is done, before any destructive filesystem or git command, and before handing control back.jj new -m "<next intent>".
Build history forward; do not pile a turn into one change and carve it later.jj squash --into <rev> -u <paths> (keeps that change's message) or jj absorb --into '<base>..@' (read its output; it names every revision it rewrote).
Never run jj absorb without --into; its default target is every mutable change, including the human's.jj new with no message on top of the described change, try it, then jj squash -u to keep or jj abandon @ to drop.
Name this in the final message as a spike.@ is a confirmation stop.
State the command and the reason, then wait.jj edit on any change.
It moves the files on disk and redirects later edits into an old change.references/recovery.md.
Resolve what the descriptions on both sides and the specs justify; escalate the rest.Read references/finalize.md and follow it.
In short: snapshot, run the rewrite guard over <base>..@, run the repo's hooks explicitly because jj runs none, confirm no conflicts, present the stack with its descriptions and a diff summary, offer to squash it coarser, wait for approval, set the final descriptions, sign <base>..@ with the agent key when one is configured, and hand over.
The human pushes.
Read references/recovery.md when something went wrong: a wrong squash, a lost file, a divergent change, a conflict, a stale workspace.
The op log is the undo history; read it before acting on it.
One agent per working copy.
For several agents on one repo, read references/workspaces.md: one jj workspace per agent, created one at a time, with the hook detour for workspaces that have no .git.
assets/turn-report.md before the normal turn summary.references/commands.md: intent, command, git analogue, verified on jj 0.41; renamed and removed commands.references/teach.md: teach mode, the report, the concept table for git users.references/finalize.md: the finalize gate step by step, and what the human does to push.references/recovery.md: op log, undo, revert, restore, conflicts, divergent changes.references/workspaces.md: parallel agents in jj workspaces.references/setup.md: the human's checklist for a colocated repo and an optional agent signing key.assets/turn-report.md: the jj section template for the final message.scripts/jj_preflight.py: Orient checks.
scripts/jj_turn_log.py: the turn's jj commands from the op log.assets/turn-report.md (opens in a new tab)references/commands.md (opens in a new tab)references/finalize.md (opens in a new tab)references/recovery.md (opens in a new tab)references/setup.md (opens in a new tab)references/teach.md (opens in a new tab)references/workspaces.md (opens in a new tab)scripts/jj_preflight.py (opens in a new tab)scripts/jj_turn_log.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub ahgraber/skills --plugin codeOther plugins' skills for the same job
10 skills in this plugin
/api-designUse when designing, reviewing, or planning REST or GraphQL APIs — endpoint structure, schema design, versioning, error handling, pagination, URI naming, or choosing between REST and GraphQL. Also triggers for OpenAPI spec creation and API contract review./changelogUse when writing, updating, or generating a CHANGELOG.md — for a new release, an unreleased section update, or drafting from git history or diff. Triggers: "update the changelog", "write release notes", "what changed since X", "generate changelog for v1.2.0", "add this to the changelog", "draft unreleased section". Not for commit messages (use commit-message skill) or internal deployment runbooks./code-reviewUse when reviewing code changes before committing or merging — staged diffs, branch diffs, or PR readiness checks. Triggers: 'review my code', 'check these changes', 'review this branch', 'give feedback on my diff', 'is this PR ready?'. Not for implementing features, running test suites, formatting-only passes, or building understanding of a change (use teach-me).