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.
npx agentmods add commands/friedbotstudio/baseline/grant-commitgit clone --depth 1 https://github.com/friedbotstudio/baselineWhat 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 | $0.00032 | $0.01117 |
| Opus 5 | $0.00016 | $0.00558 |
| Sonnet 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 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.
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.
- yesterday First seen · 26 lines · 32 tokens per session scan A 766c57a5f97c
grant-commit is a command published in the GitHub repository friedbotstudio/baseline (11 stars, last pushed 5d ago), licensed Apache-2.0. It adds 32 tokens to every session and 1,117 once invoked, about $0.0002 per session on Opus 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
audit-agents-skills
Audit quality of agents, skills, and commands in a Claude Code project.
security-audit
Comprehensive security audit of your project AND Claude Code configuration. Analyzes secrets exposure, injection surfaces, dependencies, hook security, and produces a scored security posture assessment.
audit-quiz-coverage
Find quiz coverage gaps from recent guide/CHANGELOG/CC-releases changes and propose new questions.
worktree
Create a git worktree for isolated feature/fix work.
sync
Check guide/landing synchronization status.
init-docs
Fetch official Anthropic Claude Code docs and store as local baseline snapshot.