commit

A Git workflow for reviewing, committing, and pushing repository changes. Git is a tool for tracking code history and sharing changes.

In plain words
What is it for?
Use it to inspect a diff, stage changes, make a conventional commit, handle hook failures, and push the result.
Why use it?
It helps create consistent commit messages and catches checks that fail before changes are committed.

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/roocodeinc/roo-code/commit
Clone the repo
git clone --depth 1 https://github.com/RooCodeInc/Roo-Code
Per session 8 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 629 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.00008 $0.00629
Opus 5 $0.00004 $0.00315
Sonnet 5 $0.00002 $0.00126
Haiku 4.5 $0.00001 $0.00063

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

Origin

Copies of this mod

2 near-identical copies found in the catalogue:

  • commit — 100% identical, 0 lines differ
  • commit — 100% identical, 4 lines differ
.roo/commands/commit.md · 81 lines

What it actually says

  1. Analyze the current changes to understand what needs to be committed:

    # Check for staged and unstaged changes
    git status --short
    
    # View the diff of all changes (staged and unstaged)
    git diff HEAD
    
  2. Based on the diff output, formulate a commit message following conventional commit format:

    • feat: New feature or functionality
    • fix: Bug fix
    • refactor: Code restructuring without behavior change
    • docs: Documentation changes
    • test: Adding or updating tests
    • chore: Maintenance tasks, dependencies, configs
    • style: Formatting, whitespace, no logic changes

    Format: type(scope): brief description

    Examples:

    • feat(api): add user authentication endpoint
    • fix(ui): resolve button alignment on mobile
    • refactor(core): simplify error handling logic
    • docs(readme): update installation instructions
  3. Stage all unstaged changes:

    git add -A
    
  4. Commit with the generated message:

    git commit -m "type(scope): brief description"
    

    If pre-commit hooks fail:

    • Review the error output (linter errors, type checking errors, etc.)
    • Fix the identified issues in the affected files
    • Re-stage the fixes: git add -A
    • Retry the commit: git commit -m "type(scope): brief description"
  5. Push to the remote repository:

    git push
    

    If pre-push hooks fail:

    • Review the error output (test failures, linter errors, etc.)
    • Fix the identified issues in the affected files
    • Stage and commit the fixes using steps 3-4
    • Retry the push: git push

Tips for good commit messages:

  • Keep the first line under 72 characters
  • Use imperative mood ("add", "fix", "update", not "added", "fixes", "updated")
  • Be specific but concise
  • If multiple unrelated changes exist, consider splitting into separate commits

Common hook failures and fixes:

  • Linter errors: Run the project's linter (e.g., npm run lint or pnpm lint) to see all issues, then fix them
  • Type checking errors: Run type checker (e.g., npx tsc --noEmit) to identify type issues
  • Test failures: Run tests (e.g., npm test or pnpm test) to identify failing tests and fix them
  • Format issues: Run formatter (e.g., npm run format or pnpm format) to auto-fix formatting
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 · 81 lines · 8 tokens per session scan A efc081261190

Subscribe to this mod's changes

commit is a command published in the GitHub repository RooCodeInc/Roo-Code (24,320 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 8 tokens to every session and 629 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.