
jujutsu-workflow
Use when a coding agent works in a repository where Jujutsu (jj) is available (a .jj/ directory) — running jj commands, making speculative edits, splitting changes, recovering with the operation log (jj undo / jj op restore), handing off a PR to Git/GitHub/GitLab, updating a PR after review, or coordinating parallel agents. Uses jj as the local change-management layer while keeping Git as the canonical remote, PR, CI, and audit interface. Also use to avoid jj's agent footguns (pager/editor hangs, commit absorption, colocated git/jj desync) or to replace fragile git reset/checkout/stash/rebase recovery with reversible jj operations.
- Installs
- 75
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/netresearch/jujutsu-workflow-skill --skill jujutsu-workflow- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads jujutsu-workflow automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Jujutsu Workflow
Prefer jj (Jujutsu) over raw git whenever a .jj/ repo is present. Git stays the canonical remote/PR/CI/audit interface: mutate with jj, verify with read-only Git.
1. Detect & gate first
Run ${CLAUDE_SKILL_DIR}/scripts/detect_jj_state.sh, or check manually:
.jj/present → jj repo: usejj, never mutating rawgit..jj/and.git/→ colocated: mutate withjj, read with git, never touch the git index/staging.- only
.git/→ plain Git repo: do not introducejjunless asked. - in a git worktree,
jj root≠git rev-parse --show-toplevel→ shadowed (exit 3): jj answers for the parent repo. Run nojj; use git, then ask.
See references/git-interop.md.
2. Agent-safety rules (non-negotiable)
- Always
--no-pageron commands that print. Do not writeui.paginateinto the user's config —--useroutlives the session and takes paging away from their interactivejjtoo. - Always
-m. Never run editor/TUI forms — barejj describe|commit|squash,jj split(interactive),jj squash -i,jj resolve,jj diffedit— they hang agents. jjsnapshots the working copy only when a jj command runs, not on every file write.
See references/agent-safety.md.
3. Edit loop
jj --no-pager status
# edit files (snapshotted on the next jj command)
jj --no-pager diff
jj describe -m "<project-conventional message>"
jj new -m "<next unit>" # one change per logical unit
Split non-interactively: jj split <path> -m "<msg>". See references/command-map.md.
4. Recover (reversible)
jj --no-pager op log → jj undo or jj op restore <id>. Conflicts are first-class: jj status flags them; edit markers, then verify. See references/recovery-playbook.md.
5. Hand off via Git
jj git fetch
jj rebase -d <default-branch>
jj bookmark create <branch> -r @- # every pushed commit needs a description
jj git push --bookmark <branch> # new bookmarks push directly
Never push to a protected/default branch; never rewrite public history unless allowed. Open the PR with gh/glab. See references/pr-handoff.md.
6. Parallel agents
One jj workspace per concurrent agent — never share a working copy. See references/parallel-agents.md.
7. Verify before "done"
Run ${CLAUDE_SKILL_DIR}/scripts/verify_handoff.sh, or report jj --no-pager status, jj --no-pager log --limit 10, jj --no-pager diff --stat, git status --short --branch. Never claim "done/tested/ready" without that output; disclose force-pushes, recoveries, conflicts.
When jj helps, and when it doesn't: references/why-jj-for-agents.md.
FAQ
What does the jujutsu-workflow skill do?
Use when a coding agent works in a repository where Jujutsu (jj) is available (a .jj/ directory) — running jj commands, making speculative edits, splitting changes, recovering with the operation log (jj undo / jj op restore), handing off a PR to Git/GitHub/GitLab, updating a PR after review, or coordinating parallel agents. Uses jj as the local change-management layer while keeping Git as the canonical remote, PR, CI, and audit interface. Also use to avoid jj's agent footguns (pager/editor hangs, commit absorption, colocated git/jj desync) or to replace fragile git reset/checkout/stash/rebase recovery with reversible jj operations.
How do I install jujutsu-workflow?
Run npx skills add https://github.com/netresearch/jujutsu-workflow-skill --skill jujutsu-workflow in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/jujutsu-workflow/ (personal) or .claude/skills/jujutsu-workflow/ (project).
Which AI agents can use jujutsu-workflow?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is jujutsu-workflow safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains jujutsu-workflow?
It is published by netresearch in netresearch/jujutsu-workflow-skill. It has 75 recorded installs.
Popular code quality & workflow skills
grill-me
mattpocock/skills
A relentless interview to sharpen a plan or design.
improve-codebase-architecture
mattpocock/skills
Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.
handoff
mattpocock/skills
Compact the current conversation into a handoff document for another agent to pick up.
domain-modeling
mattpocock/skills
Build and sharpen a project's domain model. Use when discussing codebase terminology, writing or editing a GLOSSARY.md, or recording or editing an ADR.
codebase-design
mattpocock/skills
Shared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary.
diagnosing-bugs
mattpocock/skills
Diagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something broken/throwing/failing/slow.