using-jj
Skill1 starsChanged 8 months agoMITView on GitHub
Workspace-first Jujutsu workflow for coding agents. Use when working in a jj repo, coordinating parallel agent work, moving changes between workspaces, landing selected work onto trunk, publishing bookmarks, or recovering from rewrites and stale workspaces.
- Commits and pushes
2 other projects use a version of this.
Adopted by
Most recently taken up by
- zgagnon/skillstheir own version, first seen Oct 9, 2026
- kndoshn/ai-skillstheir own version, first seen Jan 7, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- kndoshn/ai-skills★ 1same name
- zgagnon/skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
The file
Show its rules and text
We split this skill into the rules it gives an agent
34 rules. About 0 are common, 17 are distinctive, and 17 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈17
Distinctive · estimate
This author's own choices. Worth a look.
17
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 9
Use this skill when the repository is using Jujutsu (jj) as the primary mutating VCS interface.
- Very specific: line 15
default remote is origin
- Very specific: line 17
use jj for mutations, not git
- Distinctive: line 20
If the repo clearly uses a different trunk bookmark, use that instead of main.
- Very specific: line 48
Treat jj workspace as the unit of parallel agent work.
- Very specific: line 49
Use jj for mutations. Do not mix mutating git commands into a jj workflow unless the user explicitly asks for that.
- Distinctive: line 50
Never assume there is a current bookmark.
- Very specific: line 51
Use descriptions first. In normal agent work, start by naming the change with jj describe -m ....
- Very specific: line 52
Prefer non-interactive commands.
- Very specific: line 53
After jj commit -m ..., the finished change is usually @-, not @.
- Very specific: line 54
When taking work from another workspace and you want to keep the source intact, use jj duplicate.
- Very specific: line 55
Use jj squash --from ... --into ...
- Very specific: line 56
If a workspace becomes stale, repair it with jj workspace update-stale.
- Very specific: line 57
If a rewrite goes wrong, recover with jj undo.
- Very specific: line 76
after commit, continue from the fresh working-copy commit at @
- Distinctive: line 84
Do not expect bookmarks to move automatically like Git branches.
- Distinctive: line 93
Do not panic when conflicts appear.
- Distinctive: line 99
Run these before mutating anything important:
- Very specific: line 132
After that, the completed change is typically @-.
- Distinctive: line 136
Use the least destructive command that fits the job.
- Distinctive: line 145
Use this when you changed files that logically belong in earlier commits.
- Distinctive: line 153
Use this when you intentionally want the destination to absorb the source.
- Distinctive: line 161
Use this only when the split can be described by filesets and done non-interactively.
- Distinctive: line 170
Use this when your change should be replayed onto current trunk.
- Distinctive: line 176
Use when you want another agent’s work without rewriting their source change.
- Distinctive: line 190
Use when you are intentionally taking ownership of the source change.
- Distinctive: line 215
Use a dedicated integration workspace.
- Distinctive: line 323
Do not default to Git worktrees.
- Distinctive: line 324
Do not assume main moved just because you committed.
- Very specific: line 325
Do not point bookmarks at @ after jj commit unless you really want the fresh empty working-copy commit.
- Distinctive: line 326
Do not mix git commit, git rebase, git branch -f, or git worktree into a normal jj workflow.
- Very specific: line 327
Do not use jj split for a non-file-based split unless the user explicitly wants an interactive/editor flow.
- Very specific: line 328
Do not run jj git push --all as a lazy default.
- Distinctive: line 329
Do not rewrite another agent’s work unless the workflow explicitly allows adopt mode.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Using jj for parallel coding agents
Use this skill when the repository is using Jujutsu (jj) as the primary mutating VCS interface.
This skill is opinionated. It is written for coding agents, not for humans exploring jj casually.
Default assumptions:
- trunk bookmark is
main - default remote is
origin - one agent = one
jj workspace - use
jjfor mutations, notgit - prefer non-interactive commands
If the repo clearly uses a different trunk bookmark, use that instead of main.
Quick start
# 1) Sync remote state
jj git fetch
# 2) Create a dedicated workspace for this agent
jj workspace add ../repo-agent-<name> --name agent-<name> -r main@origin -m "agent-<name>: start from main"
# 3) Enter the workspace and inspect state
cd ../repo-agent-<name>
jj status
jj log -r 'main@origin | main | @ | @- | bookmarks()'
# 4) Start the change by describing it
jj describe -m "feat: implement <task>"
# 5) Edit files, then commit non-interactively
jj commit -m "feat: implement <task>"
# 6) Publish quickly if asked
jj git push --change @-Non-negotiable rules
- Treat
jj workspaceas the unit of parallel agent work. - Use
jjfor mutations. Do not mix mutatinggitcommands into a jj workflow unless the user explicitly asks for that. - Never assume there is a current bookmark. jj does not have one.
- Use descriptions first. In normal agent work, start by naming the change with
jj describe -m .... - Prefer non-interactive commands. Add
-mwhen supported. - After
jj commit -m ..., the finished change is usually@-, not@. - When taking work from another workspace and you want to keep the source intact, use
jj duplicate. - Use
jj squash --from ... --into ...only when you intentionally want to adopt or consume that source change. - If a workspace becomes stale, repair it with
jj workspace update-stale. - If a rewrite goes wrong, recover with
jj undo. If needed, inspectjj op logand usejj op restore.
The mental model you must use
Think in changes, not branches
jj is not centered around “the current branch”. It is centered around changes and a working-copy commit.
@= current workspace’s working-copy commit@-= parent of the current working-copy commit<workspace>@= another workspace’s working-copy commit<workspace>@-= that workspace’s most recently committed change in the common case
Think describe-first
In this skill, treat jj as a describe-first workflow:
- first name the change with
jj describe -m "..." - then edit files
- then seal that state with
jj commit -m "..." - after commit, continue from the fresh working-copy commit at
@
The practical shortcut is that jj commit without path arguments or --interactive is effectively jj describe followed by jj new, so change description comes first in the normal flow.
Bookmarks are explicit public names
Bookmarks are for naming work that needs to be pushed, reviewed, or followed later.
Do not expect bookmarks to move automatically like Git branches. Move them explicitly with:
jj bookmark set ... -r ...jj bookmark move ... --to ...jj bookmark advance ... --to ...
Conflicts are state, not emergencies
jj can record conflicts directly in commits. That means a rebase can succeed while leaving a conflicted commit behind for later resolution.
Do not panic when conflicts appear. Inspect, resolve, continue.
Standard flow for agent work
1) Inspect first
Run these before mutating anything important:
jj status
jj log -r 'main@origin | main | @ | @- | bookmarks()'
jj workspace list2) Start the task in a dedicated workspace
Preferred:
jj git fetch
jj workspace add ../repo-agent-<name> --name agent-<name> -r main@origin -m "agent-<name>: start from main"Then:
cd ../repo-agent-<name>
jj status
jj describe -m "feat: <task>"3) Implement the work
# edit files
jj diff
jj commit -m "feat: <task>"After that, the completed change is typically @-.
4) Reshape the work if needed
Use the least destructive command that fits the job.
Fixups across a stack
# edit files in the current workspace
jj absorbUse this when you changed files that logically belong in earlier commits.
Move one whole change into another
jj squash --from <source> --into <destination> --use-destination-messageUse this when you intentionally want the destination to absorb the source.
Split a mixed change by files
jj split path/to/file1 path/to/file2 -m "extract <part>"Use this only when the split can be described by filesets and done non-interactively.
Rebase onto fresh trunk
jj git fetch
jj rebase -r @- -o main@originUse this when your change should be replayed onto current trunk.
5) Take work from another workspace
Safe copy mode
Use when you want another agent’s work without rewriting their source change.
jj duplicate agent-a@- -A @Or duplicate after trunk:
jj duplicate agent-a@- -A main@originAdopt mode
Use when you are intentionally taking ownership of the source change.
jj squash --from agent-a@- --into @ --use-destination-messageWarning: this can leave the source workspace stale.
6) Publish
Fast route:
jj git push --change @-Named bookmark route:
jj bookmark set agent/<task> -r @-
jj git push --bookmark agent/<task>7) Land selected work onto main
Use a dedicated integration workspace.
jj git fetch
jj workspace add ../repo-integrate --name integrate -r main@origin -m "integrate selected agent work"
cd ../repo-integrate
jj squash --from agent-a@- --into @ --use-destination-message
jj squash --from agent-b@- --into @ --use-destination-message
jj commit -m "integrate selected agent work"
jj bookmark set main -r @-Push main only if explicitly requested:
jj git push --bookmark mainCommands by job
Inspect and understand
jj status
jj log -r 'main@origin | main | @ | @- | bookmarks()'
jj show @-
jj diff
jj evolog -r @-
jj workspace list
jj workspace root --name agent-aStart and name work
jj describe -m "feat: <task>"
jj new -m "next: <task>"
jj commit -m "feat: <task>"Move and reshape work
jj absorb
jj squash --from <source> --into <destination> --use-destination-message
jj split <filesets> -m "extract <part>"
jj duplicate <rev> -A @
jj rebase -r <rev> -o main@originWorkspaces
jj workspace add ../repo-agent-a --name agent-a -r main@origin -m "agent-a: start from main"
jj workspace list
jj workspace root --name agent-a
jj workspace update-stale
jj workspace forget agent-aBookmarks and publishing
jj bookmark set agent/<task> -r @-
jj bookmark move main --to @-
jj bookmark advance main --to @-
jj git push --change @-
jj git push --bookmark agent/<task>Recovery
jj undo
jj redo
jj op log
jj op restore <operation-id>
jj resolveDecision rules
Prefer jj describe when
- you are starting or renaming the current change
- you need to update the description without opening an editor
Prefer jj commit when
- you want to finalize the current working-copy change and continue from a fresh working-copy commit
Prefer jj duplicate when
- another workspace’s change should stay intact
- you want a safe local copy before integration
Prefer jj squash when
- you want one change to be absorbed into another
- you are intentionally consuming the source change into the destination
Prefer jj absorb when
- you made follow-up edits that logically belong to older commits
Prefer jj bookmark set when
- you need to create or point a bookmark by name
Prefer jj bookmark advance when
- a bookmark should follow rewritten work forward to a new target
Hard “do not do this” rules
- Do not default to Git worktrees. Use jj workspaces.
- Do not assume
mainmoved just because you committed. It did not. - Do not point bookmarks at
@afterjj commitunless you really want the fresh empty working-copy commit. - Do not mix
git commit,git rebase,git branch -f, orgit worktreeinto a normal jj workflow. - Do not use
jj splitfor a non-file-based split unless the user explicitly wants an interactive/editor flow. - Do not run
jj git push --allas a lazy default. Push the intended bookmark or change. - Do not rewrite another agent’s work unless the workflow explicitly allows adopt mode.
Specific tasks
- Mental model and describe-first:
references/mental-model.md - Workspace setup and agent coordination:
references/workspaces.md - Landing work onto trunk:
references/landing-on-main.md - Recovery, stale workspaces and conflicts:
references/recovery.md - Compatibility and mixed Git/JJ warnings:
references/compatibility-notes.md - Copy-paste recipes:
references/recipes.md
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

