commit-smart

A command workflow for creating a Git commit after checking staged changes and running selected quality checks. It also formats the message using Conventional Commits, a standard such as `fix(scope): description`.

In plain words
What is it for?
Use it when preparing commits that change Python or shell files and when you want checks for staged content, secrets, and commit-message format.
Why use it?
It catches selected syntax issues and possible secrets before a commit is created. It also produces a consistent commit message that is easier to understand from project history.

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/alirezarezvani/claudeforge/commit-smart
Clone the repo
git clone --depth 1 https://github.com/alirezarezvani/ClaudeForge

Made for: Claude Code.

Per session 9 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 704 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.00009 $0.00704
Opus 5 $0.00005 $0.00352
Sonnet 5 $0.00002 $0.00141
Haiku 4.5 $0.00001 $0.00070

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

.claude/commands/github/commit-smart.md · 124 lines

How it starts

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

Smart Commit with Quality Gates

You are helping the user create a well-formatted commit with pre-commit validation.

Workflow

  1. Check Staged Changes

    git status
    git diff --cached --stat
    
    • Show what files are staged
    • If nothing staged, ask user what to add
  2. Pre-Commit Quality Checks

    Run local quality gates before committing:

    Python syntax (if .py files changed):

    flake8 skill/ --count --select=E9,F63,F7,F82 --show-source
    

    Bash syntax (if .sh files changed):

    bash -n install.sh
    bash -n hooks/pre-commit.sh
    

    Secret scan:

    git diff --cached | grep -iE "(api_key|api_secret|password|token|AWS_ACCESS)" || echo "No secrets detected"
    
  3. Generate Conventional Commit Message

    Ask user about the change:

    • Type: feat, fix, docs, style, refactor, perf, test, build, ci, chore
    • Scope: installer, skill, command, agent, docs, ci, workflows
    • Description: what changed (imperative mood)
    • Why: reason for change (optional body)
    • Issue: related issue number

    Format:

    <type>(<scope>): <description>
    
    [optional body explaining why]
    
    [optional footer: Closes #123]
    
  4. Validate Message Format

    • Check format matches Conventional Commits
    • Ensure subject is imperative mood ("add" not "added")
    • Verify no period at end
    • Check length < 50 characters for subject
  5. Create Commit

    git commit -m "<generated message>"
    
  6. Post-Commit Actions

    • Show commit hash
    • Show commit in log
    • Ask if user wants to push

Examples

Feature commit:

git commit -m "feat(installer): add Windows PowerShell support

Adds install.ps1 script with equivalent functionality to
install.sh for Windows users.

Closes #42"

Fix commit:

git commit -m "fix(skill): correct Python syntax validation

Fix flake8 configuration to properly detect syntax errors.
Previous config was too permissive.

Fixes #156"

Read the full file on GitHub · 124 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 · 124 lines · 9 tokens per session scan A 792ffa0e9aca

Subscribe to this mod's changes

commit-smart is a command published in the GitHub repository alirezarezvani/ClaudeForge (419 stars, last pushed 3mo ago), licensed MIT. It adds 9 tokens to every session and 704 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.