commit-smart

A command that reviews Git changes and creates commits, saved records of changes in a Git project, using grouped files and conventional commit formats.

In plain words
What is it for?
Use it to commit all changes, only staged changes, files related to the conversation, or changes within a functional area such as authentication, an API, or the user interface.
Why use it?
It helps avoid mixing unrelated changes in one commit and reduces the effort of deciding what belongs together.

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/c0ntr0lledcha0s/claude-code-plugin-automations/commit-smart
Clone the repo
git clone --depth 1 https://github.com/C0ntr0lledCha0s/claude-code-plugin-automations
Per session 16 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,542 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.00016 $0.01542
Opus 5 $0.00008 $0.00771
Sonnet 5 $0.00003 $0.00308
Haiku 4.5 $0.00002 $0.00154

Measured 2d ago against content hash 8c7b270594d3, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

commit-smart 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.

github-workflows/commands/commit-smart.md · 190 lines

How it starts

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

Smart Commit

Intelligently analyze and commit changes with automatic file grouping and conventional commit formatting.

Usage

/commit-smart              # Interactive mode (default)
/commit-smart all          # Analyze all changes, suggest grouped commits
/commit-smart staged       # Commit only staged changes
/commit-smart context      # Review conversation and commit relevant files
/commit-smart scope        # Commit by functional scope

Arguments

  • First argument (optional): Commit mode - accessed as first positional parameter
    • all: Analyze all changes and suggest grouped commits
    • staged: Commit only staged changes
    • context: Review conversation history and commit relevant files
    • scope: Commit by scope (auth, api, ui, etc.)
    • interactive: Interactive mode with confirmation prompts (default)

Input validation: Only accepts predefined modes: all, staged, context, scope, interactive. Invalid inputs are rejected to prevent command injection.

Workflow

When this command is invoked:

  1. Validate argument (CRITICAL - prevents command injection):

    • ONLY accept predefined modes from the allowlist
    • Reject any invalid input immediately
    • DO NOT pass user input directly to shell commands
  2. Load issue cache: Read .claude/github-workflows/active-issues.json for tracked issues

  3. Analyze changes: Run git status and diff to identify all modified files

  4. Detect related issues:

    • Load relatedIssues array from env.json (set via /issue-track select)
    • Check branch name for issue numbers (e.g., feature/issue-42)
    • Detect branch scope and match against issue labels
    • Score issues by relevance:
      • +100: Branch-selected issue (in relatedIssues array)
      • +50: Scope match (issue has branch's detected scope label)
      • +10-30: Keyword/file matches
  5. Invoke managing-commits skill: Delegate to skill for intelligent grouping

Read the full file on GitHub · 190 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 · 190 lines · 16 tokens per session scan A 8c7b270594d3

Subscribe to this mod's changes

commit-smart is a command published in the GitHub repository C0ntr0lledCha0s/claude-code-plugin-automations (3 stars, last pushed 6mo ago), licensed MIT. It adds 16 tokens to every session and 1,542 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.