Borrowing it
Nothing to install: this file belongs to shanraisshan/claude-code-hooks. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/shanraisshan/claude-code-hooks/main/.claude/commands/commit.mdgit clone --depth 1 https://github.com/shanraisshan/claude-code-hooksWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/shanraisshan/claude-code-hooks/commit)<a href="https://agentmods.dev/commands/shanraisshan/claude-code-hooks/commit"><img src="https://agentmods.dev/badge/commands/shanraisshan/claude-code-hooks/commit/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/commands/shanraisshan/claude-code-hooks/commit"><img src="https://agentmods.dev/badge/commands/shanraisshan/claude-code-hooks/commit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00015 | $0.00846 |
| Opus 5.5 | $0.00006 | $0.00338 |
| Sonnet 5.5 | $0.00003 | $0.00169 |
| Haiku 4.5 | $0.00002 | $0.00085 |
Grade A, and why
commit scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 85 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Commit
Create a git commit with an auto-generated message. The first line is a summary, followed by a numbered list of the actions/changes that were executed.
Format
[/command-name][DD-Mon-YY HH:MM AM/PM] N changes
1. First change description
2. Second change description
...
"N changes" refers to the number of actions/changes that were executed during the session — NOT the number of git file changes. Look back through the conversation to find the actions that were taken (e.g., from a workflows:workflow-changelog report's action items, or from a workflows:workflow-add-hook workflow's steps).
Steps
-
Get the command name from
$ARGUMENTS. If empty, ask the user what command or task produced these changes. -
Get the current timestamp by running:
date "+%d-%b-%y %I:%M %p" -
Read
changelog/changelog.mdto get the latest entry's priority actions table. Use the items in that table as the list of changes. If the command name is notworkflows:workflow-changelog, fall back to reviewing the conversation to identify actions. -
Run
git status --shortto see which files were changed. -
Show the user the proposed commit message (title + numbered list) and the files to stage. Ask for confirmation before committing.
-
Stage and commit — one commit per file:
- Create a separate commit for each changed file (per CLAUDE.md Git Commit Rules)
- Each commit message uses the same title line but includes only the change descriptions relevant to that file
- Stage one file at a time with
git add <file>, then commit using a HEREDOC - Format for each per-file commit:
[/command-name][DD-Mon-YY HH:MM AM/PM] N changes 1. Change description relevant to this file 2. Another change relevant to this file - If a single change touches multiple files, include that change description in each relevant file's commit
Example
If /commit workflows:workflow-changelog is run after a session that changed 3 files with 4 total actions:
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 1mo ago First seen · 85 lines · 15 tokens per session scan A 9a0697885785
commit is a command published in the GitHub repository shanraisshan/claude-code-hooks (563 stars, last pushed 4mo ago), licensed MIT. It adds 15 tokens to every session and 846 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other commands, from other repositories
github
(dev-only) github maintainer harness — GitHub issue-fix and PR-review via gh CLI. NOT distributed to user projects.
release-update
(dev-only) release-update maintainer harness — Claude Code upstream change tracker (release-notes version-delta sweep + docs sync). NOT distributed to user projects.
release
(dev-only) release maintainer harness — MoAI-ADK production release (git-flow: rc build on develop, release/vX.Y.Z cut from develop, PR to main, scripts/release.sh + GoReleaser, back-merge into develop). NOT distributed to user projects.
gate
Dispatch the moai workflow gate with: $ARGUMENTS.
sync
Synchronize documentation, codemaps, and create pull request.
commit
Stage and commit changes with a well-written message.