Analyze jj status and create well-structured, logical commits with descriptive messages. Use when the user wants to commit changes in a jujutsu repository, create atomic commits, or organize working copy changes into meaningful commit groups.
Install
npx skillscat add bromanko/llm-agents/jj-commit Install via the SkillsCat registry.
SKILL.md
jj commit
Analyze jj status and create logical commits with good messages.
Preferred: /jj-commit command
When available, prefer the /jj-commit extension command which provides:
- AI-powered commit message generation with model fallback
- Automatic split commit detection for unrelated changes
- Optional
jj absorbpre-pass - Changelog detection and updates (existing files only)
- Push workflow with bookmark management
Usage:
/jj-commit— analyze and commit/jj-commit --dry-run— preview without committing/jj-commit --push --bookmark main— commit and push/jj-commit --no-changelog— skip changelog updates/jj-commit --no-absorb— skip absorb pre-pass/jj-commit --context "fixing auth bug"— provide context
If /jj-commit is not available, fall back to the manual workflow below.
Description
This skill helps create well-structured commits in a jujutsu repository by:
- Analyzing the current
jj statusand changes - Examining diffs to understand modifications
- Intelligently absorbing changes into existing mutable commits when appropriate
- Grouping remaining changes into logical commits
- Creating commits with descriptive messages following conventional commit format
- Using a linear commit workflow with
jj commit -m "message"
Important: avoid ANSI color output
Always pass --color=never when running jj commands via Bash.
Without it, jj may emit ANSI escape codes that waste 2-3x the tokens.
jj diff --color=neverorjj diff --git(plain text format)jj log --color=never ...jj show --color=never ...
Implementation
When invoked:
- Run
jj statusto see all changes - Run
jj diff --gitto understand the nature of modifications (plain diff, no color) - Check
jj log --color=never -r 'mutable() & ancestors(@) & ~@'to see if there are mutable commits in the stack - If mutable commits exist in the stack:
- Analyze whether changes look like fixes/updates to existing commits (typos, refinements, addressing feedback)
- If appropriate, run
jj absorbto automatically move changes into ancestor commits - Run
jj op show -pto show what was absorbed - Check
jj statusagain to see if any changes remain
- For any remaining changes (or all changes if absorb wasn't used):
- Analyze changes and group by:
- File types and purposes (config, modules, docs, etc.)
- Functional relationships
- Scope (single feature, bug fix, refactoring, etc.)
- Create commits using non-interactive commands:
- CRITICAL: When creating multiple commits from a working copy, you MUST specify files explicitly
- Use
jj commit -m "message" path/to/file1 path/to/file2for each logical group - NEVER run
jj commit -m "message"without file paths when you intend to create multiple commits - Running
jj commitwithout file arguments commits ALL working copy changes, leaving nothing for subsequent commits - Follow conventional commit format
- Use imperative mood in messages
- Create commits linearly, one after another
- Analyze changes and group by:
- Never use interactive commands (
jj commitwithout-m,jj splitwithout paths) - Do NOT merge unrelated branches or workspaces. This skill only commits working copy changes. Ignore other heads, bookmarks, or workspaces—they are intentionally separate.
- After creating commits, show the result using:
jj log --color=never -r 'ancestors(@, 5)' -T 'concat(change_id.short(), ": ", description)'
Notes
- Requires a jujutsu repository (
.jjdirectory present) - Uses non-interactive workflow only
- Creates descriptive, atomic commits
- Follows the user's commit style preferences
- Important jujutsu behavior:
jj commit -m "message"without file arguments commits ALL working copy changes at once. This is fundamentally different from git's incremental staging model. To create multiple commits from a single working copy, always specify file paths:jj commit -m "message" file1 file2