generate-commit

Installation
SKILL.md

Generate Commit

Write a commit message for the changes the user staged, in this repo's conventional commit style, and commit after they approve it.

The index is the user's decision about what goes into this commit. Treat it as input, not something to rebuild. Everything below follows from that: inspect what is staged, check only that, and leave the rest of the working tree exactly as you found it.

Step 1: Snapshot and inspect the index

git status --short --untracked-files=all
git write-tree              # prints a tree hash: remember it as ORIG_TREE
git diff --cached --stat
git diff --cached

ORIG_TREE records the index exactly as the user left it. On abort, git read-tree <ORIG_TREE> puts it back without touching working-tree files. Shell variables do not survive between tool calls, so keep the hash itself in your notes.

If something is staged, use that and only that. Do not run git add -A, git add ., or git commit -a. Unstaged edits and untracked files stay out of the commit, even when they look related. Mention them in one line ("README.md is modified but not staged; leaving it out") so the user can add them if they meant to.

Installs
18
GitHub Stars
3
First Seen
Oct 11, 2026