| name | jj-workflow |
| description | Guides Claude on using Jujutsu (jj) version control system. Use when working with jj repositories, making commits, syncing changes, or managing version control workflows. |
Jujutsu (jj) Workflow
Jujutsu is a modern version control system that provides a simpler mental model than Git while remaining Git-compatible. This skill covers the core concepts and workflow commands.
Core Concepts
Changes vs Commits
- Change: A mutable revision identified by a change ID (e.g.,
kkmpptxz). Changes can be modified.
- Commit: An immutable snapshot identified by a commit ID (SHA). Once created, commits are permanent.
- The working copy (
@) is always a change that can be modified freely.
Working Copy
- The working copy is denoted by
@ and represents your current state.
@- refers to the parent of the working copy.
- Unlike Git, there's no staging area—all changes are automatically tracked.
Permission Requirements
CRITICAL: Jujutsu commands require GPG signing and SSH/GitHub authentication. Always request elevated permissions when running jj or gh commands:
required_permissions: ["all"]
Never run jj commands in the default sandbox—they will fail due to authentication requirements.
Essential Commands
Viewing State
jj status
jj log
jj diff
jj show @
Creating and Describing Changes
jj new
jj describe -m "feat: message"
jj new -m "feat: message"
Syncing with Remote
jj tug
jj git fetch
jj git push
Modifying History
jj squash
jj squash --into @-
jj split <file> -m "msg"
jj edit <change-id>
Working with Branches
jj branch create <name>
jj branch set <name>
jj branch list
Commit Message Format
Use Conventional Commits format:
feat: — New feature
fix: — Bug fix
refactor: — Code change that neither fixes a bug nor adds a feature
perf: — Performance improvement
docs: — Documentation changes
chore: — Maintenance tasks
test: — Adding or updating tests
Examples:
jj describe -m "feat: add user authentication"
jj describe -m "fix: resolve null pointer in parser"
jj describe -m "refactor: extract validation logic"
Common Patterns
Starting New Work
jj tug
jj new -m "feat: new feature"
jj new
Amending Current Change
Simply make changes—they're automatically included in @. Use jj describe to update the message if needed.
Rebasing onto Latest
jj tug
Viewing What Will Be Pushed
jj log -r 'remote_branches()..@'
Key Differences from Git
- No staging area: All changes are tracked automatically
- Mutable working copy: The current change can always be modified
- Change IDs: Stable identifiers that persist through rebases
- Anonymous branches: You can work without named branches
- Automatic conflict handling: Conflicts are recorded and can be resolved later