|
| 1 | +--- |
| 2 | +name: jj-commit |
| 3 | +description: Stages and commits changes in jj (Jujutsu VCS) with a clear, concise commit message. Use when committing changes with jj, setting a revision description, or when the user asks to commit with jj. |
| 4 | +--- |
| 5 | + |
| 6 | +# jj commit (describe) |
| 7 | + |
| 8 | +Create a commit for the current changes by setting the revision description. In jj there is no staging area; the working copy is the current revision. |
| 9 | + |
| 10 | +## Steps |
| 11 | + |
| 12 | +1. Run `jj status` to see working-copy state and which files changed. |
| 13 | +2. Run `jj diff` to see changes in the current revision (working copy vs parent). Use `-r @` to restrict to the current rev if needed. |
| 14 | +3. Run `jj log -n 5` to see recent commit style. |
| 15 | +4. Write a commit message and run `jj describe -m "message"`. |
| 16 | + |
| 17 | +If the user provides a message hint (e.g. in the request), use it when writing the message. |
| 18 | + |
| 19 | +To start a new change before describing, run `jj new`; then set the description on that revision. |
| 20 | + |
| 21 | +## Commit message rules |
| 22 | + |
| 23 | +- Use the imperative mood ("Add", "Fix", "Remove", not "Added", "Fixes", "Removed"). |
| 24 | +- Be concise: one short sentence, ideally under 50 characters. |
| 25 | +- Do NOT use conventional commit prefixes (no `feat:`, `fix:`, `chore:`, etc.). |
| 26 | +- Do NOT add any `Co-Authored-By` or similar trailers. |
| 27 | +- Focus on **what** changed and **why**, not how. |
| 28 | +- If a second line is needed for context, keep it brief. |
| 29 | + |
| 30 | +## Examples of good messages |
| 31 | + |
| 32 | +- `Prevent discount code from being cleared on edit` |
| 33 | +- `Add integration test for offer code persistence` |
| 34 | +- `Remove unused legacy export helper` |
| 35 | +- `Fix thumbnail missing in upsell insert` |
| 36 | + |
| 37 | +When pushing, use [jj-bookmark-push](.cursor/skills/jj-bookmark-push/SKILL.md); never push without a description. |
0 commit comments