SuperAPI AI Directory

jj-use

General & other

View repository

Updated 10-16 05:01

About this skill

Use Jujutsu

When a .jj/ directory is present, all version control operations default to jj. Do not use git add, git commit, git checkout, git switch, git branch, git reset, git rebase, or git push. Replace them with jj equivalents automatically — no confirmation needed, no explanation needed. Just use jj.

Activation

Check once at the start of a session:

test -d .jj && command -v jj
  • .jj/ exists and jj is on PATH → this skill is active. Use jj for everything.
  • .jj/ exists but jj is not on PATH → tell the user jj is not installed, then fall back to git.
  • .jj/ does not exist → this skill does not apply.

Do not re-check on every command. One check per session is enough.

Automatic replacements

These replacements happen silently. Do not ask the user or explain the substitution.

Instead of Use
git status jj status
git diff jj diff
git log jj log
git show jj show
git add Nothing — jj snapshots automatically
git commit jj commit or jj describe
git commit --amend jj describe, jj squash, or jj absorb
git checkout / git switch jj new or jj edit
git branch jj bookmark
git reset jj restore or jj undo
git rebase jj rebase
git revert jj revert
git reflog jj op log
git fetch jj git fetch
git push jj git push

When the user says "commit this", "push this", "check the log", etc. — use the jj column directly. The user does not need to say "jj" for you to use jj.

Working rules

  • Jujutsu snapshots the working copy automatically. Never run a staging step before commit.
  • Use jj commit -m "msg" to finish the current change and open a new empty one.
  • Use jj describe -m "msg" to update the description of the current change without finishing it.
  • Use jj new to start a fresh change. Use jj new -m "msg" to start with a description.
  • Use jj git fetch and jj git push for remote operations. Prefer --remote and --bookmark flags for precision.
  • Prefer jj new + jj squash over jj edit for resuming work. Use jj edit <rev> only when you intentionally want the working copy to become that revision.
  • After a mistaken rewrite, check jj op log and prefer jj undo before reaching for anything else.

When raw git is acceptable

Use raw git only for operations jj does not provide:

  • External tooling that requires .git directly
  • Git-specific features jj has not implemented

When this happens, tell the user why you are using git instead of jj. This is the exception — it needs justification. jj usage does not.

Communicating with the user

  • Do not explain that you are using jj instead of git. This is the default behavior in a .jj/ repo, not a substitution that needs commentary.
  • Do explain if a jj concept might confuse the user. For example, if the user says "checkout that branch" and you run jj new, briefly note that jj uses new to start work from a revision. Keep it to one sentence.
  • Do explain if a jj command fails. Show the error and what you will try next.
  • Do explain when falling back to raw git — that is the unusual case.

Recommended patterns

jj status
jj diff --summary
jj log -r ::
jj describe -m "explain the current change"
jj commit -m "finish this change and open the next one"
jj new -m "start a fresh change"
jj bookmark set my-feature -r @
jj git fetch --remote origin
jj git push --remote origin --bookmark my-feature

References

Open references/git-to-jj.md for the full translation table, safety notes, and examples.

For initializing a git repo as Jujutsu or reviewing/updating jj configuration, use the companion skill $jj-init.