commit

A command that creates a Git commit while following the repository's existing history and running its checks. Git is a system for tracking code changes, and commit hooks are automatic checks that run before a commit is saved.

In plain words
What is it for?
Use it after code changes to inspect the diff, stage the intended files, write a Conventional Commits message, and commit only after the repository's checks pass.
Why use it?
It reduces accidental secret leaks and keeps commits consistent, while ensuring the project's formatting, tests, and type checks get a chance to catch problems.

Command for Cursor

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/webhook-co/webhook/commit
Clone the repo
git clone --depth 1 https://github.com/webhook-co/webhook

Made for: Cursor.

Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 495 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00495
Opus 5 $0.00000 $0.00247
Sonnet 5 $0.00000 $0.00099
Haiku 4.5 $0.00000 $0.00049

Measured yesterday against content hash 8338bfeff0cd, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

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 yesterday.

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.

.cursor/commands/commit.md · 35 lines

What it actually says

/commit

Create a commit that matches this repo's history, with the hooks doing their job.

How to run

  1. Inspect state in parallel: git status, git diff (unstaged) and git diff --staged, and git log --oneline -15 to match the existing message style.
  2. Refuse to stage likely-secret files. Never add .env/.env.*, credential files, key material (*.pem, *.key, id_rsa, *.p12), *.crt, cloud-credential JSON, or anything carrying tokens or account/zone IDs. If such a file is staged or requested, stop and warn me — don't commit it. (See the no-secrets rule.)
  3. Stage the intended changes and write a Conventional Commits message matching history: type(scope): subject (e.g. feat(engine):, fix(ci):, chore(deps):). Subject in the imperative, concise; add a wrapped body explaining the why when the change isn't trivial. Pass the message via a heredoc so formatting survives.
  4. Commit. Let husky run. The pre-commit hook runs lint-staged (eslint + prettier), the no-skipped-tests check, and typecheck.

If the pre-commit hook fails

Fix the root cause and make a new commit. That's the whole point of the gate.

  • Never git commit --no-verify, never disable or skip the husky hook, never --no-verify in any form.
  • Never add .only/.skip/fdescribe/xit, disable a failing test, or lower a coverage threshold to get green.
  • Local hooks are a convenience and are bypassable — but bypassing them is forbidden here. CI required checks are the real gate and have no bypass for anyone, including admins.

Notes

  • Don't push or open a PR — this command only commits. Use /commit-push-pr for the full flow.
  • If the change includes user-facing UI/copy that a human must eyeball, say so: it still needs human verification regardless of a clean commit.
Changes

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.

  1. yesterday First seen · 35 lines · 0 tokens per session scan A 8338bfeff0cd

Subscribe to this mod's changes

commit is a command published in the GitHub repository webhook-co/webhook (0 stars, last pushed 6d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 495 tokens. 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-31.