smart-git-commit

A workflow for creating careful Git commits, which are saved checkpoints of code changes. It reviews project rules, the changed files, the full difference, recent commit history, tests, and security before committing.

In plain words
What is it for?
Use it when committing, pushing, creating a pull request, releasing, tagging a version, or saving a checkpoint of code changes.
Why use it?
It helps prevent incomplete, mixed-purpose, undocumented, or unsafe changes from being saved in the code history.

Skill for Claude CodeCodex

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 skills/zarl-prog/smart-git-commit/smart-git-commit
Any agent
npx skills add Zarl-prog/Smart-git-commit --skill smart-git-commit
Clone the repo
git clone --depth 1 https://github.com/Zarl-prog/Smart-git-commit

Made for: Claude Code, Codex.

Per session 148 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,888 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.00148 $0.01888
Opus 5 $0.00074 $0.00944
Sonnet 5 $0.00030 $0.00378
Haiku 4.5 $0.00015 $0.00189

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

Security

Grade A, and why

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

The scan reads SKILL.md. This mod also ships 9 executable files (contributor/scripts/branch-name.sh, contributor/scripts/fork-check.sh, contributor/scripts/pr-readiness.sh, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

skills/smart-git-commit/SKILL.md · 277 lines

How it starts

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

Smart Git Commit Skill

Produces gold-standard Git commits: tested, atomic, secure, documented, and traceable. Follow every phase below in order. Never skip phases unless the user explicitly says so.


Phase 0 — Read Project Rules

Check for CLAUDE.md, .gitmessage, .git/COMMIT_TEMPLATE at repo root. If found, those rules override this skill's defaults.

cat CLAUDE.md 2>/dev/null && echo "→ Found CLAUDE.md"
cat .gitmessage 2>/dev/null && echo "→ Found .gitmessage"

Show what rules were loaded before proceeding.


Phase 1 — Diff Analysis

Run full diff analysis before touching git add:

git status
git diff --stat          # which files, how many lines
git diff                 # full diff for small changesets
git log --oneline -5     # recent commit context

Categorize every changed file:

Path pattern Category
src/ lib/ app/ feature/fix/refactor
tests/ *.test.* test
docs/ *.md docs
package.json deps chore
.github/ Makefile tooling

If files span more than one category → flag for atomic split in Phase 4. Read references/atomic-patterns.md if split is needed.


Phase 2 — Security Scan (Never Skip)

Run the automated security scanner:

bash scripts/scan-secrets.sh
  • Exit 0 → show "✓ Clean" and continue
  • Exit 1HARD STOP. Show findings. Do not proceed until clean.

If secrets found:

  1. git reset HEAD <file> to unstage
  2. Replace with env var or placeholder
  3. Add to .gitignore if needed
  4. Rotate exposed credentials if already pushed

Read references/security-rules.md for the full pattern list.


Phase 3 — Test Gate (Never Skip)

Auto-detect and run the project's test suite:

bash scripts/detect-test-runner.sh
  • status = "pass" → show test count and continue
  • status = "fail"HARD STOP. Fix failures first, then commit fix + feature together.
  • status = "not_found" → warn user, ask if they want to proceed anyway

Read the full file on GitHub · 277 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 · 277 lines · 148 tokens per session scan A c984b24efac1

Subscribe to this mod's changes

smart-git-commit is a skill published in the GitHub repository Zarl-prog/Smart-git-commit (6 stars, last pushed 21d ago), licensed MIT. It adds 148 tokens to every session and 1,888 once invoked, about $0.0007 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.

Related

Other skills, from other repositories

appium-python-expert

Specialist skill for mobile E2E testing with Appium 2.x + Python (pytest) for Android and iOS. Use this skill whenever the user asks about: setting up Appium with Python, writing mobile test cases, configuring Android/iOS drivers (UIAutomator2, XCUITest), implementing Page Object Model for mobile, running tests with…

jmr85/e2e-agent-skills · 158 tokens

selenium-cucumber-expert

Use when writing E2E tests with Selenium WebDriver and Cucumber BDD in Java, setting up BDD test infrastructure with Maven or Gradle, writing Gherkin feature files, implementing step definitions in Java, configuring Page Object Model or Screenplay Pattern, setting up parallel execution, generating ExtentReports or…

jmr85/e2e-agent-skills · 201 tokens

diffler

Generate and deliver a graded comprehension quiz from the current Git branch diff, either in the local terminal or through Google Forms. Use when a user asks to prove, test, or verify understanding of branch changes, a feature branch, or a pull request.

jamestkelly/diffler · 53 tokens

playwright-cucumber-expert

Use when writing E2E tests with Cucumber BDD and Playwright, setting up BDD test infrastructure, writing Gherkin feature files, implementing step definitions, configuring hooks and World, or integrating Cucumber with CI/CD. Invoke for Cucumber, BDD, Gherkin, feature files, step definitions, Given When Then, hooks…

jmr85/e2e-agent-skills · 91 tokens

playwright-automation-expert

Use when writing E2E tests with Playwright, setting up test infrastructure, debugging flaky browser tests, organizing project structure, or testing REST APIs. Invoke for browser automation, E2E tests, Page Object Model, test flakiness, visual testing, project scaffolding, folder layout, API testing, JSON schema…

jmr85/e2e-agent-skills · 73 tokens

karpathy-guidelines

Tool-agnostic behavioral guidelines for AI coding assistants. Use when writing, reviewing, debugging, or refactoring code to reduce overengineering, surface ambiguity, make surgical changes, and define verifiable success criteria.

Vincent-A-Yang/karpathy-skills-anycoding · 47 tokens