smart-git-commit

smart-git-commit is a skill for Claude Code, Codex from Zarl-prog/Smart-git-commit. It costs 148 tokens per session (1,888 once invoked), scanned A, original, MIT.

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

Written for no agent in particular: nothing here depends on one. Also seen: mentions CLAUDE.md.

Good fit Use it when committing, pushing, creating a pull request, releasing, tagging a version, or saving a checkpoint of code changes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/zarl-prog/smart-git-commit/smart-git-commit
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.

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.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for smart-git-commit

README.md
[![agentmods](https://agentmods.dev/badge/skills/zarl-prog/smart-git-commit/smart-git-commit/github.svg)](https://agentmods.dev/skills/zarl-prog/smart-git-commit/smart-git-commit)
Your own site
<a href="https://agentmods.dev/skills/zarl-prog/smart-git-commit/smart-git-commit"><img src="https://agentmods.dev/badge/skills/zarl-prog/smart-git-commit/smart-git-commit/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for smart-git-commit

Your own site · 80×15
<a href="https://agentmods.dev/skills/zarl-prog/smart-git-commit/smart-git-commit"><img src="https://agentmods.dev/badge/skills/zarl-prog/smart-git-commit/smart-git-commit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
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. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00148 $0.01888
Opus 5.5 $0.00059 $0.00755
Sonnet 5.5 $0.00030 $0.00378
Haiku 4.5 $0.00015 $0.00189

Measured 1mo ago against content hash c984b24efac1, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo ago.

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 1 → HARD 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. 1mo ago 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 2mo ago), licensed MIT. It adds 148 tokens to every session and 1,888 once invoked, about $0.0006 per session on Opus 5.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

review-gate

Fresh-context review of a change against its stated intent, before the change is acted on. Use before a commit (not the per-iteration commits of an autonomous loop the operator started, such as /ar:resume), before a release, or before launching a run whose result will be acted on — whenever the change is more than a…

emaballarin/ccplugins · 137 tokens

git-for-research-code

When the user wants to version-control optimization research code - small commits per experiment change, tags for paper result snapshots, .gitignore for solver logs, linking result tables to commit hashes, and branch strategy for risky refactors. Also use when the user mentions "git workflow," "version control…

hajibabaie/combinatorial-optimization-skills · 117 tokens

commit-pr

A command for the workflow of committing code, sending it to a remote Git repository, and opening or updating a pull request. A pull request is a proposed change for review and merging.

gitgitWi/council-flow · 139 tokens

git-workflow

Guided git workflows: prepare PRs, clean up branches, resolve merge conflicts, handle monorepo tags, squash-and-merge patterns. Use when asked to prepare a PR, clean branches, resolve conflicts, or tag a release.

jezweb/claude-skills · 52 tokens

publish

Publish oh-my-opencode to npm by triggering the GitHub Actions publish workflow and verifying its artifacts. Ship-only: never runs pre-publish-review or re-reviews merged code unless the user explicitly asks. Argument: . Triggers: publish, release, deploy, npm publish.

code-yeongyu/oh-my-openagent · 68 tokens

pre-publish-review

Nuclear-grade 12-agent pre-publish release gate. Runs /get-unpublished-changes to detect all changes since last npm release, spawns up to 10 ultrabrain agents for deep per-change analysis, invokes /review-work (orchestrator manual QA plus one gate reviewer) for holistic review, and 1 oracle for overall release…

code-yeongyu/oh-my-openagent · 161 tokens