commit · mitsuhiko — Claude Code skill: what it does, how to install
A skill that keeps the agent on Conventional Commits for git commit, with staging limited to the files you name.
Apache-2.0 1 installs ★ 3,224 updated 2026-09-27
npx skills add mitsuhiko/agent-stuff --skill commit -a claude-codeWhat commit does
The skill is read before a commit and fixes the subject line to <type>(<scope>): <summary>. A type is mandatory: feat for new features, fix for bug fixes, plus docs, refactor, chore, test, perf. The scope in parentheses is optional. Summaries stay imperative, under 72 characters, no full stop.
It ships as a markdown file with a procedure, not as a script. Arguments come first: paths or globs narrow which files get committed, while free-form text steers the scope, summary and body. Then the agent looks at git status and git diff, optionally runs git log -n 50 --pretty=format:%s to see which scopes the project already uses, stages what belongs and calls git commit -m.
Pushing is out of scope. Sign-offs and breaking-change footers are forbidden too, so on a repo that requires Signed-off-by for DCO you will be appending it yourself after every run. A stray file that could go either way gets a question instead of a guess.
What it helps with
- write a Conventional Commits subject without reminding the agent
- stage only the files under a given path
- review the diff before the commit, not after
- stop the agent from pushing to the remote
- check which scopes the project already uses
Example prompts for the agent
- Commit the changes in
src/parser.rsas afix. - Make a commit with just the files in
docs/, leave the rest alone. - Commit everything in the working tree and add a body explaining why.
How to install commit
1Skills CLI (Vercel)
npx skills add mitsuhiko/agent-stuff --skill commit -a claude-code2Manually: put the files in place
~/.claude/skills/commit/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/commit/
1Skills CLI (Vercel)
npx skills add mitsuhiko/agent-stuff --skill commit -a codex2Manually: put the files in place
.agents/skills/commit/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add mitsuhiko/agent-stuff --skill commit -a cursor2Manually: put the files in place
.cursor/skills/commit/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install mitsuhiko/agent-stuff skills/commit2Manually: put the files in place
.github/skills/commit/SKILL.md1Skills CLI (Vercel)
npx skills add mitsuhiko/agent-stuff --skill commit -a gemini-cli2Platform CLI
gemini skills install https://github.com/mitsuhiko/agent-stuff --path skills/commitManually: put the files in place
.devin/skills/commit/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add mitsuhiko/agent-stuff --skill commit -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about commit
How do I install commit in Claude Code?
Run npx skills add mitsuhiko/agent-stuff --skill commit -a claude-code. The skill file ends up at ~/.claude/skills/commit/SKILL.md.
What does the commit skill do?
It tells the agent how to phrase a commit as <type>(<scope>): <summary> and in which order to work: read the arguments, inspect the diff, stage the intended files, commit.
Does it add a Signed-off-by line?
No. Sign-offs and breaking-change markers are left out, so a DCO repo means adding the line by hand.
Source text
SKILL.md · Apache-2.0
--- name: commit description: "Read this skill before making git commits" --- Create a git commit for the current changes using a concise Conventional Commits-style subject. ## Format `<type>(<scope>): <summary>` - `type` REQUIRED. Use `feat` for new features, `fix` for bug fixes. Other common types: `docs`, `refactor`, `chore`, `test`, `perf`. - `scope` OPTIONAL. Short noun in parentheses for the affected area (e.g., `api`, `parser`, `ui`). - `summary` REQUIRED. Short, imperative, <= 72 chars, no trailing period. ## Notes - Body is OPTIONAL. If needed, add a blank line after the subject and write short paragraphs. - Do NOT include breaking-change markers or footers. - Do NOT add sign-offs (no `Signed-off-by`). - Only commit; do NOT push. - If it is unclear whether a file should be included, ask the user which files to commit. - Treat any caller-provided arguments as additional commit guidance. Common patterns: - Freeform instructions should influence scope, summary, and body. - File paths or globs should limit which files to commit. If files are specified, only stage/commit those unless the user explicitly asks otherwise. - If arguments combine files and instructions, honor both. ## Steps 1. Infer from the prompt if the user provided specific file paths/globs and/or additional instructions. 2. Review `git status` and `git diff` to understand the current changes (limit to argument-specified files if provided). 3. (Optional) Run `git log -n 50 --pretty=format:%s` to see commonly used scopes. 4. If there are ambiguous extra files, ask the user for clarification before committing. 5. Stage only the intended files (all changes if no files specified). 6. Run `git commit -m "<subject>"` (and `-m "<body>"` if needed).
© mitsuhiko · Apache-2.0 · mitsuhiko/agent-stuff
Similar skills
All skills for Git and GitHub →commit by other authors comes first.