commit

A set of safe Git commit practices for the MindRoom project. Git is the version-control system used to track code changes, branches, and commits.

In plain words
What is it for?
Use it when preparing a commit: inspect the status and diff, stage only selected files, run pre-commit checks, and write a short conventional commit message.
Why use it?
It helps prevent unrelated files, temporary scripts, or credentials from being included in a commit. It also requires checks and a consistent message format before saving changes.

Command for Claude Code

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/mindroom-ai/mindroom/commit
Clone the repo
git clone --depth 1 https://github.com/mindroom-ai/mindroom

Made for: Claude Code.

Per session 7 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 559 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.00007 $0.00559
Opus 5 $0.00003 $0.00280
Sonnet 5 $0.00001 $0.00112
Haiku 4.5 $0.00001 $0.00056

Measured 2d ago against content hash 0718cd897795, 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 2d 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.

.claude/commands/commit.md · 61 lines

How it starts

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

Safe Git Commit Practices

Current Status

  • Git status: !git status
  • Staged changes: !git diff --staged
  • Unstaged changes: !git diff

CRITICAL Reminders

  1. Selective Staging

    • NEVER use git add . or git add -A
    • Add files individually: git add <filename> or use git commit -a
    • Review with git status before staging
  2. Why This Matters

    • Project has unstaged debugging scripts
    • Temporary test files must not be committed
    • Configuration files with credentials need protection
    • Only commit relevant changes from current work
  3. Pre-commit Validation

    • ALWAYS run: pre-commit run --all-files
    • Ensures code style compliance
    • Fixes linting issues automatically
    • Validates Python formatting with ruff
  4. Commit Message Style Guide

    • Format: type(scope): description (conventional commits)
    • Types: feat, fix, docs, style, refactor, test, chore, perf, ci, build, revert
    • Scope: Include in parentheses when clear module/area affected
    • Description rules:
      • Use lowercase after colon (unless proper nouns: Docker, Matrix, AI)
      • Keep first line under 72 characters
      • Use imperative mood ("Add" not "Added", "Fix" not "Fixed")
      • Be specific about what changed
      • For bugs: describe what was broken
      • For features: describe capability added
      • For refactors: explain what was restructured

    Good examples:

    • feat: Add Direct Message (DM) support for private agent conversations
    • fix(profile): Handle null user data in profile loading
    • refactor: Extract team formation logic into private function
    • test: Add comprehensive tests for extra_kwargs functionality
    • docs: Add comprehensive deployment guide for instance manager

    For incomplete work: WIP: [description] is acceptable

  5. Final Checks

    • Run pytest to ensure tests pass
    • Review git diff --staged
    • Verify no unrelated files included
    • Check for sensitive information

Read the full file on GitHub · 61 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. 2d ago First seen · 61 lines · 7 tokens per session scan A 0718cd897795

Subscribe to this mod's changes

commit is a command published in the GitHub repository mindroom-ai/mindroom (254 stars, last pushed 2d ago), licensed Apache-2.0. It adds 7 tokens to every session and 559 once invoked, about $0.0000 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.