smart-commit-examples

A coding agent that checks whether a project is ready for a Git commit. Git is a tool for tracking code changes, and pre-commit checks run automated quality rules before committing them.

In plain words
What is it for?
Use it to run pre-commit checks across files, report failures and warnings, apply automatic fixes, and confirm whether the project is ready to commit.
Why use it?
It finds style and validation problems before changes are recorded. It can also handle issues that the configured checks are able to fix automatically.

Agent 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 agents/okeefeco/pyeye-mcp/smart-commit-examples
Clone the repo
git clone --depth 1 https://github.com/okeefeco/pyeye-mcp

Made for: Claude Code.

Per session 0 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,251 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.00000 $0.01251
Opus 5 $0.00000 $0.00626
Sonnet 5 $0.00000 $0.00250
Haiku 4.5 $0.00000 $0.00125

Measured yesterday against content hash a54c1d6427bf, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

smart-commit-examples 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/agents/smart-commit-examples.md · 194 lines

How it starts

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

Smart Commit Agent - Usage Examples

This document shows how the smart-commit agent handles the complete git commit workflow efficiently.

Example 1: Clean Validation (Success Case)

User: "Run pre-commit validation"

Agent Response:

echo "🔍 Running pre-commit validation..." && \
pre-commit run --all-files --show-diff-on-failure 2>&1 | \
grep -E "(FAILED|ERROR|WARNING|✓|✗)" || echo "All hooks passed"

Output:

✅ **Pre-commit Validation Complete**
- All hooks passed
- 0 files modified by hooks
- Tests passing
- Ready to commit

Example 2: Auto-fixable Issues

User: "Check if ready to commit"

Agent discovers auto-fixable issues and handles them:

# Initial check reveals fixable issues
echo "🔧 Auto-fixing issues..." && \
pre-commit run --all-files 2>&1 >/dev/null && \
echo "✅ All hooks now passing" || \
echo "❌ Manual intervention required"

Agent Response:

🔧 **Auto-fixed Issues**
- black: Reformatted 3 files
- ruff: Fixed 5 import/style issues
- end-of-file-fixer: Added newlines to 2 files

✅ **Validation Complete** - Ready to commit

Example 3: Manual Intervention Required

User: "Validate all hooks and tests"

Agent finds issues requiring human fix:

# Check what needs manual fixing
pre-commit run --all-files 2>&1 | \
awk '/FAILED|ERROR/ {print "❌ " $0} /Passed|Skipped/ {count++} END {if(count>0) print "✅ " count " hooks passed"}'

Agent Response:

❌ **Manual Intervention Required**

**Type Checking (mypy)**:
- `src/server.py:45` - Missing return type annotation
- `src/cache.py:120` - Incompatible types in assignment

**Security (bandit)**:
- `src/config.py:33` - Hardcoded password found

**Action Required**: Fix these 3 issues, then run `pre-commit run --all-files`

Example 4: Complete Workflow

User: "Fix and commit changes"

Agent runs complete validation workflow:

# Multi-step efficient workflow
echo "📊 Current Status:" && \
echo "Pre-commit: $(pre-commit run --all-files >/dev/null 2>&1 && echo '✅' || echo '❌')" && \
echo "Tests: $(pytest -q >/dev/null 2>&1 && echo '✅' || echo '❌')" && \
echo "Uncommitted: $(git status --porcelain | wc -l) files"

Read the full file on GitHub · 194 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 · 194 lines · 0 tokens per session scan A a54c1d6427bf

Subscribe to this mod's changes

smart-commit-examples is an agent published in the GitHub repository okeefeco/pyeye-mcp (0 stars, last pushed 23d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,251 tokens. 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.

Related

Other agents, from other repositories

task-plan-architect

Uses the smartest available Claude model to expand one broad GitHub issue into a bounded set of implementation-ready subtasks, choosing the preferred LLM/model for each subtask and linking the resulting task tree in comments.

MercurieVV/ScalaSemantic · 47 tokens

triage

Cheap sequential classifier. Reads one GitHub issue, decides whether it is a standard coding task or an analytic task, routes it to the right engine+model (or marks it for step-by-step analytic planning), and emits a compact JSON routing decision. Use before dispatching work to the parallel pool.

MercurieVV/ScalaSemantic · 63 tokens

task-prioritizer

Fetches all open GitHub issues/tasks for this repo, prioritizes them by project need and dependency order, and comments priority/dependency notes back onto each task. Use before detailed task planning.

MercurieVV/ScalaSemantic · 45 tokens

sanity-check

Cheap self-check run BY a task agent on its own worktree before committing. Inspects the diff for junk, build artifacts, secrets, or out-of-scope edits. NOT called by the conductor — the task agent calls this on itself. Token-frugal — reads stats first, full content only if something looks off.

MercurieVV/ScalaSemantic · 69 tokens

bench-win-confirm

WIN-confirmation vertex for the vertical bench. Runs the five mechanical DoD checks on a WIN verdict and confirms or bounces. Never diagnoses a sub-floor verdict; never fault-finds a clean win.

luuuc/sense · 45 tokens

chore

Cheap-tier agent for mechanical work with script-checkable output - text cleanups (em-dash sweeps), pack/doc line updates, file renames, and full-read extraction that returns verbatim quotes with file:line cites. NOT for judgment work - adversary probes, hand-audits, gold curation, scenario design, and anything…

luuuc/sense · 84 tokens