Borrowing it
Nothing to install: this file belongs to friedbotstudio/baseline. 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/friedbotstudio/baseline/main/.claude/commands/grant-commit.mdgit clone --depth 1 https://github.com/friedbotstudio/baselineWrote 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/friedbotstudio/baseline/grant-commit)<a href="https://agentmods.dev/commands/friedbotstudio/baseline/grant-commit"><img src="https://agentmods.dev/badge/commands/friedbotstudio/baseline/grant-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/friedbotstudio/baseline/grant-commit"><img src="https://agentmods.dev/badge/commands/friedbotstudio/baseline/grant-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.00032 | $0.01117 |
| Opus 5.5 | $0.00013 | $0.00447 |
| Sonnet 5.5 | $0.00006 | $0.00223 |
| Haiku 4.5 | $0.00003 | $0.00112 |
Grade A, and why
grant-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 — 26 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Write a consent token to .claude/state/commit_consent so the Git Commit Guard hook allows the next git commit. The token has three lines: line 1 the active workflow slug (empty when no workflow is active), line 2 the current UNIX epoch, line 3 any optional note.
Workflow-scoped consent, with a time-window fallback. When a workflow is active (.claude/state/workflow.json present), the token is bound to that workflow's slug: the guard allows commits only while the live workflow slug matches, so one grant authorizes every commit in that workflow's landing and only that workflow. When no workflow is active, the token carries an empty slug and the guard falls back to the classic 900s time window — an ad-hoc commit still requires this fresh, human-granted consent. A workflow.json that is present but unreadable fails closed.
How this works structurally: when the user typed /grant-commit, the consent_gate_grant UserPromptSubmit hook ran before this body was passed to Claude and wrote a short-lived consent marker at .claude/state/.commit_consent_grant (carrying the workflow slug it read from workflow.json). The git_commit_guard PreToolUse hook (Write matcher) reads that marker and allows Claude to write the consent file only while the marker is fresh and its slug matches the live workflow. Claude cannot forge the marker — that's what makes the gate structural. The Bash-matcher leg of the same guard then enforces the consent token on the actual git commit invocation.
State-write discipline (binding — see .claude/CONSTITUTION.md §2 "State-write discipline"). The consent token at .claude/state/commit_consent is a Tier 1 consent artifact: it SHALL be written with the Write tool only. You SHALL NOT write it via Bash (no >/>> redirect, heredoc, tee, cp, or sed -i) — destructive_cmd_guard blocks Bash writes to consent paths, and the git_commit_guard Write matcher validates the marker only on the Write tool. Use Bash solely for the prechecks below (git rev-parse) and to compute the epoch (date +%s).
Steps:
- Git-repo precheck. Run
git rev-parse --is-inside-work-tree 2>/dev/null. If the exit status is non-zero, this project is not a git repository: refuse to write the consent token and tell the user "Not a git repository —/grant-commitis inapplicable. Per CLAUDE.md Article IV, gate C andcommitare auto-excepted on non-git projects; the workflow ends after/archive. Persistence outside git is your responsibility." Stop here. - Pending memory advisory (non-blocking). Count
## CANDIDATE:blocks in.claude/memory/_pending.md. If the count is > 0, surface a one-line advisory to the user before writing the consent token: "Pending memory: candidate(s) in.claude/memory/_pending.md— run/memory-syncif relevant, or proceed withgit commit(memory is harness-local; this never blocks)." If 0, no advisory. The token is written regardless. - Resolve the workflow slug. Read
.claude/state/workflow.jsonif it exists and take itsslugfield. If the file is absent, use an empty slug (ad-hoc commit → time-window fallback). Do not invent a slug and do not accept one from$ARGUMENTS— the slug comes only fromworkflow.json. - Run
date +%sto get the current epoch. - Write the consent token with the Write tool, overwriting any prior token: line 1 the workflow slug from step 3 (an empty line when there is no active workflow), line 2 the epoch, line 3 the optional note
$ARGUMENTS(omit if empty), to.claude/state/commit_consent. Do not use a Bash redirect ortee— that path is guard-blocked. - Confirm to the user: when a workflow was active, "Commit consent granted for workflow
<slug>at . One grant covers every commit in this workflow's landing (900s TTL)."; when none was active, "Commit consent granted at , valid for 900s (until <HH:MM:SS local>) — no active workflow, so this is a time-window grant." In both cases add: "Forbidden flags (push, --amend, --no-verify, reset --hard, etc.) remain blocked regardless." (/grant-pushis a separate 300s window for pushes.)
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 · 26 lines · 32 tokens per session scan A 766c57a5f97c
grant-commit is a command published in the GitHub repository friedbotstudio/baseline (14 stars, last pushed 13d ago), licensed Apache-2.0. It adds 32 tokens to every session and 1,117 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
sprint
Run an autonomous sprint from maintained specs and plans, with truthful verification and no duplicate artifact approval ceremonies.
commit-message
Generate a conventional commit message from staged changes.
commit
Open-source governance and hard gates for AI coding agents across Claude Code, Codex CLI, and Pi.
cg-oss-git-hygiene
Set up an open source repository for healthy long-term maintenance — branch protection, commit signing, tag immutability, issue and PR templates, CODEOWNERS, CONTRIBUTING.md, SECURITY.md, Dependabot, stale bot, and triage workflow. Use when the user is publishing an open source project, mentions branch protection…
commit
Create well-formatted commits with conventional commit format and emoji.
commit
When you receive this command, do the following.