commit

A command for creating a properly formatted Git commit from current changes. A Git commit is a saved set of project changes with a message describing what changed.

In plain words
What is it for?
Reviewing staged changes, running required checks, writing a Conventional Commit message, and committing the work.
Why use it?
It helps ensure the intended files are checked, staged, formatted, and described consistently before the changes are saved in version history.

Command

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/rileyhilliard/agentrc/commit
Clone the repo
git clone --depth 1 https://github.com/rileyhilliard/agentrc
Per session 10 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,081 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.00010 $0.01081
Opus 5 $0.00005 $0.00541
Sonnet 5 $0.00002 $0.00216
Haiku 4.5 $0.00001 $0.00108

Measured yesterday against content hash 0e63e9a70673, 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.

.agentrc/commands/commit.md · 112 lines

How it starts

The opening of the file, as written. The whole thing — 112 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Create a git commit using the appropriate path based on your current knowledge.

Decision: Direct vs Delegate

Commit directly if you have clear context about the changes:

  • You just implemented, fixed, or modified something in this conversation
  • You know exactly what files changed and why
  • The intent of the change is unambiguous

Delegate to haiku agent if ambiguous:

  • User invoked /ce:commit without prior context in this conversation
  • You're unsure what changes exist or their purpose
  • The user is asking about changes you didn't make

Path A: Direct Commit (You Have Context)

Load the preflight-checks skill: Skill(ce:preflight-checks)

  1. Preflight checks: Run preflight checks on staged files before committing. Fix formatting/lint issues, re-stage fixed files.

  2. Quick verification:

    git diff --cached --name-only  # or git diff --name-only for unstaged
    

    Confirm the files match what you expect from your work.

  3. Draft the message following Conventional Commits (schema below).

  4. Execute:

    git commit -m "your_header" -m "your_body"
    
  5. Handle pre-commit failure (max 3 attempts):

    If git commit fails (exit code != 0):

    a. Parse the error output. Identify what failed: formatting, lint, type errors, or tests.

    b. Auto-fix if possible:

    • Formatters: run the formatter directly (prettier --write, black, ruff format, gofmt -w)
    • Linters with auto-fix: eslint --fix, ruff check --fix
    • Type errors / test failures: read the error, fix the code

    c. Re-stage fixed files and retry the commit.

    d. After 3 failed attempts, escalate:

    • Status: FAILED (after 3 attempts)
    • Attempts log: what was tried each round
    • Remaining errors: current error output
    • Drafted message: the commit message for when errors are resolved

Path B: Delegate to Haiku Agent (Ambiguous)

Invoke ce:haiku agent via Task tool with this prompt:

Read the full file on GitHub · 112 lines

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 · 112 lines · 10 tokens per session scan A 0e63e9a70673

Subscribe to this mod's changes

commit is a command published in the GitHub repository rileyhilliard/agentrc (3 stars, last pushed 6mo ago), licensed MIT. It adds 10 tokens to every session and 1,081 once invoked, about $0.0001 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-31.