Category: Development Version: 2025-10-12 Author: Jeff Hui (jeff@jeffhui.net)
Jujutsu (jj) version control commands for Claude Code. This plugin provides workflow commands specifically designed for developers using Jujutsu VCS, offering streamlined commit management, rebasing, and pull request creation.
The jj plugin provides 3 slash commands for Jujutsu workflows:
Creates jj commits for changes made during your session.
Features:
- Supports both git and Jujutsu version control systems
- Groups related changes logically into atomic commits
- Follows repository commit message conventions
- Never adds Claude attribution or co-author information
- Presents commit plan before execution
- Uses
jj describefor commit messages - Supports
jj splitfor creating multiple logical commits
Usage:
/commitJujutsu-specific behavior:
- Automatically tracks all changes in the working copy
- Uses
jj describeto set commit messages - Can use
jj splitto separate changes into multiple commits - Updates working copy revision automatically
Rebases the current changeset onto the primary branch.
Features:
- Automatically detects primary branch (main or master)
- Fetches latest changes before rebasing
- Handles the entire changeset chain
- Reports conflicts clearly if they occur
- Shows updated commit tree after completion
Usage:
/rebaseProcess:
- Determines primary branch (main or master)
- Fetches latest changes with
jj git fetch - Identifies current changeset
- Rebases current changeset and descendants onto primary branch
- Displays updated commit tree
Important:
- Does not rebase changesets that are part of bookmarks you plan to delete
- Only rebases the current changeset chain, not other branches
- Stops and reports if conflicts are encountered
Creates pull requests for all changes in the current jj tree, including stack visualization.
Features:
- Creates PRs for entire jj changeset stack
- Supports both draft and published PRs
- Configurable base branch strategy (main-based or parent-based)
- Automatically generates descriptive PR titles and bodies
- Updates all PR descriptions with stack visualization
- Shows which PR corresponds to which bookmark
- Never adds Claude attribution or co-author information
Usage:
/create_prsInteractive prompts:
- Choose between main-branch-based or parent-based PRs
- Choose between draft or published PRs
Stack visualization example:
Stack:
- https://github.com/org/repo/pull/123
- https://github.com/org/repo/pull/124 <-- This PR
- https://github.com/org/repo/pull/125Process:
- Asks about PR configuration preferences
- Pushes all branches to remote
- Creates PRs with descriptive titles and bodies
- Adds stack visualization to all PR descriptions
- Generates summary table of created PRs
This plugin requires Jujutsu to be installed and configured:
# Install jujutsu
brew install jj # macOS
# or see https://github.com/martinvonz/jj for other platformsThe /create_prs command requires the GitHub CLI:
# Install GitHub CLI
brew install gh # macOS
# or see https://cli.github.com/ for other platforms
# Authenticate
gh auth loginFor developers new to Jujutsu:
- Changesets: Jujutsu works with changesets instead of commits. Each change is automatically tracked.
- Bookmarks: Similar to Git branches, but more flexible.
- Working copy: Represented by
@in logs, automatically updated by operations. - Revisions: Can be referenced by ID or expressions like
@(current working copy) or@-(parent).
If you're familiar with Git:
jj describe≈git commitjj split≈git add -p+ multiple commitsjj rebase≈git rebasejj git fetch≈git fetchjj log≈git log --graph