From kix
Commit the current intent — everything if the index is clean, only what's
How this command is triggered — by the user, by Claude, or both
Slash command
/kix:commitThe summary Claude sees in its command listing — used to decide when to auto-load this command
Commit the current intent — everything if the index is clean, only what's staged otherwise — and generate the commit message. ## Argument parsing `$ARGUMENTS` may start with `!` (e.g. `! fixed the bug`). Strip the leading `!` and whitespace to obtain the **context text**. If `!` is present, the skill runs in **auto-fix mode** (see Step 6). If `$ARGUMENTS` does not start with `!`, the entire string is the context text and the skill runs in **interactive mode**. If the context text is non-empty, treat it as the reason/motivation behind the changes and use it to write the commit body. ## ...
Commit the current intent — everything if the index is clean, only what's staged otherwise — and generate the commit message.
$ARGUMENTS may start with ! (e.g. ! fixed the bug). Strip the leading !
and whitespace to obtain the context text. If ! is present, the skill
runs in auto-fix mode (see Step 6).
If $ARGUMENTS does not start with !, the entire string is the context text
and the skill runs in interactive mode.
If the context text is non-empty, treat it as the reason/motivation behind the changes and use it to write the commit body.
Before running the steps below, check for .git/kix-commit-state.json. If it
exists, a previous /commit run was paused via Step 6 Continue — this is a
resume, not a fresh run.
orig_index_tree, had_stash, arguments, commit_message,
last_staged_diff, and claude_session_id from the file.claude_session_id differs from the current session, the original
conversation may have additional context (e.g. why a particular fix was
chosen). Treat it as available-on-demand background; don't auto-fetch unless
the resume hits an ambiguity that the saved state alone can't resolve.$ARGUMENTS is empty, reuse the saved arguments (so !
mode persists across resumes). If non-empty, the new value wins.git add . to pick up any manual fixes the user made before resuming, and
reuse the saved ORIG_INDEX_TREE.last_staged_diff and a saved
commit_message is present — reuse the message. Otherwise regenerate the
message in Step 3 against the new diff.If the file does not exist, run the steps below normally.
The state file is consumed (deleted) on a successful commit (Step 5) and on the Rollback path (Step 6). It is (re)written on the Continue path (Step 6).
Decide the staging strategy from the current index:
git diff --staged --quiet to check whether anything is already
staged.git add . to stage all changes
(unstaged + untracked). The user wants to commit everything.git stash push --keep-index --include-untracked -m "kix-commit-autostash"
to set aside unstaged + untracked changes so they don't leak into the
commit. Remember that a stash was created.git write-tree and
remember the SHA as ORIG_INDEX_TREE. You may need it in Step 6 to roll
back fix attempts to the exact pre-/commit state.Run git diff --no-ext-diff --staged to get the diff to be committed.
Write a commit message following Commit message instructions in
AGENTS.md/CLAUDE.md. If none, base yourself from
git log -1 --pretty=%B.
Co-Authored-By footer note, as you're actually helping me
generate the commit message, not writing the code yourself.Display the generated commit message inside a fenced code block (open and
close with three backticks on their own lines) so it renders as a distinct
block and preserves literal formatting (commit messages often contain #,
*, or backticks that would otherwise be reflowed as markdown).
Run git commit -m "..." using a heredoc to preserve formatting.
.git/kix-commit-state.json if it exists — any
resume state has been consumed.On error:
Interactive mode (no !): display the error and abort. Do not
attempt to fix it yourself. Still run Step 7 to restore any stashed
changes.
Auto-fix mode (!): diagnose the failure (e.g. pre-commit hook
lint/format errors), fix the issue, re-stage with git add ., and retry
the commit. (If a stash was created in Step 1, the excluded files are not
in the working tree, so git add . is safe.) Keep retrying as long as you
see progress between attempts. Progress means at least one of:
git diff --staged differs from the
previous attempt).Stop retrying if neither holds — that means you're about to repeat the same fix and get the same failure.
When you stop, the working tree + index contain your fix attempts and no commit was created. Do not continue to Step 7 yet. Instead:
.git/kix-commit-state.json before
prompting the user. Do this first, so the state survives a session
kill while waiting for the user's reply. Required fields:
orig_index_tree (the SHA from Step 1), had_stash (true if a stash
was created in Step 1), arguments (the original $ARGUMENTS),
commit_message (the draft from Step 3), last_staged_diff (the
staged diff from the most recent attempt), and claude_session_id (the
current Claude session id, so a future resume in a fresh session can
pull context from the original session if needed)..git/kix-commit-state.json. If a stash was
created in Step 1, add a note that the kix-commit-autostash stash is
also still in place./commit was called. Use
ORIG_INDEX_TREE (saved in Step 1) to restore the post-staging
snapshot. Delete .git/kix-commit-state.json — the rollback restored
a clean pre-/commit state, so there's nothing to resume. If a stash
was created in Step 1, then run Step 7 to pop it; otherwise skip
Step 7./commit invocation
will resume from the saved state, or they can delete
.git/kix-commit-state.json to discard.Do not fabricate or report a commit SHA, and do not claim success for commit-dependent workflows.
If a stash was created in Step 1, run git stash pop to restore the
user's working tree. Run this on success, on interactive-mode abort, and
when the user picks Rollback in Step 6. Do not run it when the user
picks Continue — that path intentionally leaves the stash in place.
git stash pop reports merge conflicts (likely when an auto-fix
touched the same files the user had unstaged), resolve them: inspect the
conflict markers and pick the correct content (typically the auto-fixed
version is already what the user would want). After resolving, run
git reset to clear the index back to the post-commit state, and verify
with git status that the working tree matches the user's pre-commit
state plus any auto-fixes. If the stash was kept due to conflicts, drop it
explicitly with git stash drop once resolved.npx claudepluginhub 0k-software/kix-agents --plugin kix/commitStages unstaged changes based on git status and diff analysis, then creates a commit with a generated message. Uses current branch and recent commit history for context.
/commitStages changes and commits locally using Conventional Commits format. Analyzes git status/diffs, drafts typed message with scope, confirms with user before git add and commit.
/commitCreates well-formatted git commits with conventional messages and emojis. Runs pre-commit checks (lint/format/build/docs), auto-stages files if needed, analyzes diffs, and suggests splitting multi-change commits unless --no-verify.
/commitCreates well-formatted git commits with conventional messages and emojis. Runs pre-commit checks (lint/format/build/docs), auto-stages files if needed, analyzes diffs, and suggests splitting multi-change commits unless --no-verify.
/commitRuns pre-commit git checks, quality gates (lint, typecheck, tests), code review for issues; drafts conventional commit message; stages specific files and commits. Supports --no-verify, --amend, --push options.
/commitAnalyzes current git diff, generates 3 conventional commit message options (concise, detailed, comprehensive), presents for user selection, and executes git commit.