Agent skill
jj
Jujutsu (jj) skill for the ikigai project
Install this agent skill to your Project
npx add-skill https://github.com/mgreenly/ikigai/tree/main/.claude/library/jj
SKILL.md
Jujutsu (jj)
Workflow
Float on main. The working copy sits directly on main@origin. Manual changes are committed and pushed to main. Most work goes through goals, so you periodically pull from main to pick up completed goal work.
- Start fresh:
jj git fetchthenjj new main@origin - Do work: Make changes, commit as needed
- Push to main: Push directly to main (no bookmarks, no PRs)
- Pull updates:
jj git fetchthenjj rebase -d main@originto pick up goal work
CRITICAL Rules
- "All files" means ALL files - When told to commit, restore, or rebase "all files", include every modified file in the working copy. Never selectively exclude files. The working copy is the source of truth.
- No bookmarks - Push directly to main, no feature branches
- No PRs - All work lands on main directly
Starting Work
jj git fetch
jj new main@origin
This puts you on a fresh commit with main as parent. All your work builds from here.
Committing
When user says "commit", use jj commit -m "msg":
jj commit -m "Add feature X"
Commits stack automatically. After 3 commits you have: main → A → B → C (@)
Pushing to Main
Move the main bookmark forward to your latest commit, then push:
jj bookmark set main -r @-
jj git push --bookmark main
@- is the parent of the working copy — your most recent jj commit. If you have uncommitted work in @, commit first.
Pulling Updates
When goals complete and land on main, pull their work:
jj git fetch
jj rebase -d main@origin
Squashing (Permission Required)
NEVER squash without explicit user permission.
jj edit <revision>
jj squash -m "Combined message"
Recovery
All operations are logged:
jj op log
jj op restore <operation-id>
Common Commands
| Task | Command |
|---|---|
| Fetch remote | jj git fetch |
| Start fresh on main | jj new main@origin |
| Check status | jj status |
| View changes | jj diff |
| View log | jj log |
| Commit | jj commit -m "msg" |
| Push to main | jj bookmark set main -r @- && jj git push --bookmark main |
| Rebase onto main | jj rebase -d main@origin |
Key Concepts
- Working copy (
@): Always a commit being edited - main@origin: The remote main branch — your base and push target
- Float on main: Work sits on top of main, pushes go directly to main
Didn't find tool you were looking for?