git-commit-validator

A guided process for making Git commits, including checking changes, validating them, and writing a conventional commit message. Git is the version-control system commonly used to track code changes.

In plain words
What is it for?
It helps stage changes, inspect the current diff and recent commit style, validate the commit, and create the commit when there is work to save.
Why use it?
It reduces accidental commits and keeps commit messages consistent with the project's expected format.

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/techdufus/oh-my-claude/git-commit-validator
Any agent
npx skills add TechDufus/oh-my-claude --skill git-commit-validator
Clone the repo
git clone --depth 1 https://github.com/TechDufus/oh-my-claude

Made for: Claude Code, Codex.

Per session 57 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,913 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.00057 $0.01913
Opus 5 $0.00028 $0.00957
Sonnet 5 $0.00011 $0.00383
Haiku 4.5 $0.00006 $0.00191

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

Security

Grade A, and why

git-commit-validator 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.

plugins/oh-my-claude/skills/git-commit-validator/SKILL.md · 261 lines

How it starts

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

Git Commit Validator

This skill MUST be invoked whenever you are about to create a git commit. It handles the complete workflow and enforces commit message standards.

When This Skill Activates

Auto-invoke this skill when the user implies code should be committed:

Category Trigger Phrases
Explicit commit "commit", "make a commit", "commit this"
Ship intent "ship it", "send it"
Finalization "wrap it up", "finalize this", "we're done", "that's it"
After implementation When you complete work and there are uncommitted changes

Key insight: If the user's intent results in git commit being run, this skill MUST be used first.

Do NOT run git commit without this skill.

Complete Commit Workflow

Step 1: Gather Context

git status                    # See what's changed
git diff HEAD                 # See all changes (staged + unstaged)
git log --oneline -5          # Recent commit style reference

Step 1.5: Handle No Changes

If git status --porcelain returns empty AND nothing is staged:

  • Do not attempt to commit - there's nothing to commit
  • Inform the user: "No changes to commit"
  • Exit the workflow

This prevents errors from running git commit with nothing staged.

Step 2: Stage Changes

Default behavior - stage all changes:

git add -A

If user specifies --staged - skip staging, use only what's already staged.

If user gives instructions - follow them:

  • "ignore the docs" → don't stage doc files
  • "only the src folder" → stage selectively

Step 3: Analyze and Generate Message

Based on the diff, determine:

  1. Type: feat, fix, docs, refactor, test, chore, perf, ci, build, style, revert
  2. Scope (optional): module or area affected
  3. Description: concise, imperative mood, lowercase
  4. Body: see decision matrix below

Message Format:

<type>[optional scope]: <description>

[body - required for non-trivial changes]

[optional footer - breaking changes, issue refs]

Read the full file on GitHub · 261 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 · 261 lines · 57 tokens per session scan A eddc366ec1dd

Subscribe to this mod's changes

git-commit-validator is a skill published in the GitHub repository TechDufus/oh-my-claude (176 stars, last pushed 1mo ago), licensed MIT. It adds 57 tokens to every session and 1,913 once invoked, about $0.0003 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.