commit

A Git command that groups related file changes and creates a commit using the Conventional Commits format. Git is the version-control system used to track code changes.

In plain words
What is it for?
Use it to inspect staged and unstaged changes, stage one logical group, and reference Linear tasks or Sentry errors found in the conversation.
Why use it?
It reduces the effort of deciding which changed files belong together and writing a consistent commit message.

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/javiermrcom/awesome-claude-code/commit
Clone the repo
git clone --depth 1 https://github.com/javiermrcom/awesome-claude-code
Per session 19 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,284 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.00019 $0.01284
Opus 5 $0.00010 $0.00642
Sonnet 5 $0.00004 $0.00257
Haiku 4.5 $0.00002 $0.00128

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

plugins/git-guardian/commands/commit.md · 165 lines

How it starts

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

Smart Commit Command

This command enhances Claude Code's native commit abilities by:

  1. Analyzing ALL changes (staged + unstaged) to find logical groupings
  2. Intelligently staging/unstaging files to create atomic commits
  3. Generating Conventional Commits format messages WITHOUT attribution
  4. Auto-detecting and referencing Linear issues and Sentry errors from context

Core Logic

The command will:

  1. Assess what's currently staged vs unstaged
  2. Use conversation context OR change analysis to group related files
  3. Detect Linear issues and Sentry errors from session context
  4. Stage the right files for a single logical commit
  5. Generate a proper Conventional Commits message with issue references

Task

Analyze the current git state and conversation context. Based on this:

  1. Analyze Git State:

    • Run git status --porcelain to see all changes
    • Determine what forms a logical unit based on:
      • Conversation context (if available)
      • File relationships (source + tests, docs together, etc.)
  2. Detect Issue References:

    • Linear Issues: Scan conversation for Linear issue IDs (e.g., IA-123, ENG-456)
    • Sentry Issues: Detect Sentry error references (e.g., ABCD-7S, issue IDs, URLs)
    • Priority: Use the most relevant issue mentioned in current conversation context
  3. Stage Changes:

    • Unstage files that don't belong in this commit
    • Stage files that complete the logical change
  4. Generate Commit Message:

    • Follow Conventional Commits format
    • Include issue references in footer when detected
    • Format: Refs: IA-123 (Linear) or Fixes: ABCD-7S (Sentry) or both
  5. Execute Commit

Commit Message Format (Conventional Commits v1.0.0):

<type>[optional scope][!]: <description>

[optional body]

[optional footer(s)]

Body Guidelines:

  • Include a body for non-trivial changes (most commits should have one)
  • Use bullet points with - prefix (3-5 lines typical)
  • Each bullet should describe a specific aspect of the change
  • Keep each bullet concise and focused

Read the full file on GitHub · 165 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 · 165 lines · 19 tokens per session scan A 9bab3c244349

Subscribe to this mod's changes

commit is a command published in the GitHub repository javiermrcom/awesome-claude-code (3 stars, last pushed 10mo ago), licensed MIT. It adds 19 tokens to every session and 1,284 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.