Agent skill

Git Commit Validator

by TechDufus in TechDufus/oh-my-claude

MUST be used for ANY git workflow that involves committing code.

MITAuto-check passedDevelopment

Install Git Commit Validator

skills CLI
$ npx skills add TechDufus/oh-my-claude --skill git-commit-validator -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install TechDufus/oh-my-claude git-commit-validator --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/TechDufus/oh-my-claude.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/oh-my-claude/skills/git-commit-validator .claude/skills/git-commit-validator && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
git-commit-validator
GitHub stars
174
Token cost
~2k tokens
SKILL.md length
720 words
Files
1
Skills in repo
12
Repo updated
First seen
Licence
MIT

At a glance

MUST be used for ANY git workflow that involves committing code.

  • Works in 6 steps: Gather Context → 5: Handle No Changes → Stage Changes → …
  • Tasks that involve Commit messages
  • SKILL.md covers When This Skill Activates, Complete Commit Workflow, Commit Body Decision Matrix and Validation Rules, plus 3 more sections
  • Calls git

What it does

Git Commit Validator is an agent skill from TechDufus/oh-my-claude. MUST be used for ANY git workflow that involves committing code. This includes explicit commit requests AND implicit ones like 'ship it', 'wrap it up', or finishing implementation work. Handles staging, message generation, validation, and commit execution with conventional commit format.

Its SKILL.md is about 2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Commit messages. The repository describes itself as: Add ultrawork to any prompt for maximum parallel execution. The licence is MIT.

When your agent uses it

  • Tasks that involve Commit messages

Example prompts

  • “ship it”
  • “wrap it up”
  • “/git-commit-validator”

Requirements

  • Pre-approved tools (allowed-tools): Bash(git status:*), Bash(git diff:*), Bash(git add:*), Bash(git log:*), Read, Grep

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Gather Context
  2. 5: Handle No Changes
  3. Stage Changes
  4. Analyze and Generate Message
  5. Validation (Automatic)
  6. Commit

What it can do on your machine

Read from SKILL.md and the folder at commit ede75db. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Bash(git status:*)
    • Bash(git diff:*)
    • Bash(git add:*)
    • Bash(git log:*)
    • Read
    • Grep

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Git Commit Validator loads about 2k tokens when it runs. Until then it costs about 77 tokens; SKILL.md has 720 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~77
When it runs · the whole SKILL.md, loaded when a task matches
~2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from TechDufus/oh-my-claude at commit ede75db, republished under its MIT licence (© TechDufus). 720 words, ~2,026 tokens.

Download SKILL.mdSave it as .claude/skills/git-commit-validator/SKILL.md (or your agent's skills folder).
name
git-commit-validator
description
MUST be used for ANY git workflow that involves committing code. This includes explicit commit requests AND implicit ones like 'ship it', 'wrap it up', or finishing implementation work. Handles staging, message generation, validation, and commit execution with conventional commit format.
allowed-tools
Bash(git status:*), Bash(git diff:*), Bash(git add:*), Bash(git log:*), Read, Grep

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:

CategoryTrigger 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 implementationWhen 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
bash
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:

bash
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]

Commit Body Decision Matrix

The body is NOT optional for most real work. Use this matrix:

Change TypeBody Required?Body Content
Typo fix, single-line changeNoSubject is sufficient
Config tweak, version bumpNoSubject is sufficient
Bug fixYESWhat caused it, how you fixed it
New featureYESWhat it does, why it's needed, key design choices
RefactorYESWhat changed structurally, why this approach
Multiple files changedYESWhat each area of change accomplishes
Breaking changeYESWhat breaks, migration path
Performance improvementYESWhat was slow, what's faster, by how much
Body Quality Standards

Good body content includes:

  • Context: Why this change is needed (the problem)
  • Approach: How you solved it (key decisions)
  • Impact: What this enables or fixes
  • Caveats: Limitations, follow-up work, edge cases

Use bullet points when listing multiple changes:

- Add validation for email format
- Refactor user service to async
- Update tests for new behavior

Wrap at 72 characters - hard requirement for git tooling compatibility.

Sizing Your Commit Message
Diff SizeExpected Message
1-10 linesSubject only (if truly trivial)
10-50 linesSubject + 1-2 sentence body
50-200 linesSubject + paragraph or bullets
200+ linesSubject + detailed body with sections

When in doubt, write more. A detailed commit message is a gift to future developers (including yourself).

Show full SKILL.md (281 more words)Show less
Step 4: Validation (Automatic)

Validation runs automatically when you execute git commit. The commit_quality_enforcer hook intercepts the command and validates:

  1. Subject line <= 50 chars
  2. Body lines <= 72 chars (if body present)
  3. Format check - Must match conventional commit format: <type>[scope]: <description>
  4. No AI attribution - Rejects "generated with", "co-authored-by.*claude", "ai-generated"
  5. Body quality - Requires appropriate detail based on diff size

If validation fails, the commit is blocked with a clear error message. Fix the issues and retry.

Step 5: Commit

Use HEREDOC for proper formatting:

bash
git commit -m "$(cat <<'EOF'
type: description here
EOF
)"

Validation Rules

Subject Line (Required)
  • Max 50 characters
  • Format: <type>[scope]: <description>
  • Type: lowercase (feat, fix, docs, style, refactor, test, chore, perf, ci, build, revert)
  • Description: lowercase start, no period at end, imperative mood
Body Lines (Required for non-trivial changes)
  • Max 72 characters per line
  • Blank line between subject and body
  • Explain "why" not just "what"
  • See decision matrix above for when body is required
Forbidden Content
  • NO AI attribution ("Generated with Claude", "Created by AI")
  • NO AI co-authors ("Co-authored-by: Claude")
  • NO branding phrases

Type Reference

TypeUse For
featNew feature or capability
fixBug fix
docsDocumentation only
refactorCode restructuring (no behavior change)
perfPerformance improvement
testTest additions/fixes
choreMaintenance, deps
ciCI/CD changes
buildBuild system changes
styleFormatting (no logic change)
revertReverting previous commit

Examples

Minimal (only for truly trivial changes)
docs: fix typo in readme
chore: bump lodash to 4.17.21
Standard (most commits should look like this)
fix(api): resolve timeout on large file uploads

Requests over 10MB were hitting the default 30s timeout.
Increased timeout to 5 minutes for upload endpoints and added
progress tracking to prevent connection drops.
feat(auth): add password reset via email

Users can now request a password reset link sent to their
registered email. Link expires after 1 hour.

- Add /auth/forgot-password endpoint
- Add /auth/reset-password endpoint with token validation
- Integrate SendGrid for transactional emails
- Add rate limiting (3 requests per hour per email)
Detailed (for large or complex changes)
refactor(database): migrate from callbacks to async/await

The callback-based database layer was causing pyramid-of-doom
issues and making error handling inconsistent across services.

Changes:
- Convert all db methods to return Promises
- Update 47 call sites across 12 service files
- Add connection pool management with proper cleanup
- Standardize error types (DbConnectionError, DbQueryError)

This unblocks the upcoming transaction support work.
feat(hooks): add pre-delegation context injection

Problem: Agents were receiving prompts without project context,
leading to inconsistent code style and missed conventions.

Solution: SessionStart hook now injects a delegation template
into Claude's context that gets included with every Agent() call.

Template includes:
- 7 sections covering task, context, expected output
- MUST DO / MUST NOT constraints
- Verification checklist

This standardizes agent output quality across all delegations.

Why No AI Attribution?

Commit messages reflect intent and ownership of the change. AI attribution:

  • Clutters git history
  • Dilutes accountability
  • Adds no useful information

The human owns the commit. The tool is irrelevant.


Note: This skill handles COMMIT only. Push must be requested separately.

© TechDufus, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in plugins/oh-my-claude/skills/git-commit-validator of TechDufus/oh-my-claude.

Open the folder on GitHubat commit ede75db

Compare with similar skills

Git Commit Validator next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Git Commit Validator compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Git Commit Validator this skillTechDufus/oh-my-claude174—~2kAutomated safety check: PassMIT
Contextual Commit Messagesyamadashy/repomix29k1 repos~2.7kAutomated safety check: PassMIT
React Router Release Notes Prepremix-run/react-router57k—~1.1kAutomated safety check: PassMIT
Caveman Commitvishiri/fantasia-archive40913 repos~642Automated safety check: PassGPL-3.0
PR Finalize Reviewmicrosoft/garnet12k—~3.1kAutomated safety check: PassMIT
ToolJet Multi-Repo CommitToolJet/ToolJet41k—~1.3kAutomated safety check: PassAGPL-3.0

Similar skills

  • Writes Conventional Commits whose bodies carry action lines recording the intent, decisions and constraints behind a change, not only what changed.

    29k GitHub starsUsed in 1 repo~2.7k tokens
    DevelopmentAuto-check passed
  • React Router Release Notes Prep

    remix-run/react-router

    Polishes pending React Router change files before the versioning scripts run, and decides whether a long-form What's Changed section is warranted.

    57k GitHub stars~1.1k tokensUpdated 2 days ago
    DevelopmentAuto-check passed
  • Caveman Commit

    vishiri/fantasia-archive

    Ultra-compressed commit message generator. An agent skill from vishiri/fantasia-archive.

    409 GitHub starsUsed in 13 repos~642 tokens
    DevelopmentAuto-check passed
  • PR Finalize Review

    microsoft/garnet

    Official

    Checks that a pull request's title and description match its implementation and reviews the code for Garnet best practices, reporting findings without posting them.

    12k GitHub stars~3.1k tokensUpdated today
    DevelopmentAuto-check passed
  • Commits changes across ToolJet's root repo and its server/ee and frontend/ee submodules, writing messages from the diffs and updating submodule pointers in order.

    41k GitHub stars~1.3k tokensUpdated today
    DevelopmentAuto-check passed
  • Git Workflow and Versioning

    addyosmani/agent-skills

    Sets git habits for every change: short-lived branches, atomic commits with descriptive messages, clean pull requests, plus versioning, tagging and changelogs for releases.

    103k GitHub starsUsed in 2 repos~3.5k tokens
    DevelopmentAuto-check: notes

More from TechDufus/oh-my-claude

All 12 skills in this repo
  • Debugger

    TechDufus/oh-my-claude

    Systematic debugging methodology for diagnosing failures and root cause analysis.

    174 GitHub stars~1k tokensUpdated 2 mo ago
    Auto-check passed
  • Oh My Claude Runtime

    TechDufus/oh-my-claude

    A skill your agent uses when applying oh-my-claude workflow guidance, ultrawork modes, agent orchestration, plan execution, or plugin configuration.

    174 GitHub stars~4.3k tokensUpdated 2 mo ago
    Auto-check passed
  • PR Creation

    TechDufus/oh-my-claude

    MUST be used when creating pull requests. An agent skill from TechDufus/oh-my-claude.

    174 GitHub stars~1.8k tokensUpdated 2 mo ago
    Auto-check passed
  • Ralph Loop Init

    TechDufus/oh-my-claude

    Transform approved plans into ralph loop infrastructure. An agent skill from TechDufus/oh-my-claude.

    174 GitHub stars~4.6k tokensUpdated 2 mo ago
    Auto-check: notes
  • Ralph Plan

    TechDufus/oh-my-claude

    Structured PRD generation with interview, research, and approval workflow.

    174 GitHub stars~2.4k tokensUpdated 2 mo ago
    Auto-check: notes
  • Writing Skills

    TechDufus/oh-my-claude

    Methodology for creating effective skills using TDD principles.

    174 GitHub stars~1.3k tokensUpdated 2 mo ago
    Auto-check passed

Categories

Questions about Git Commit Validator

What does Git Commit Validator do?

MUST be used for ANY git workflow that involves committing code. Git Commit Validator is an agent skill from TechDufus/oh-my-claude. MUST be used for ANY git workflow that involves committing code.

When should I use Git Commit Validator?

Git Commit Validator fits situations like: tasks that involve Commit messages.

How do I install Git Commit Validator in Claude Code?

Run `npx skills add TechDufus/oh-my-claude --skill git-commit-validator -a claude-code`. Or copy the skill folder (plugins/oh-my-claude/skills/git-commit-validator in TechDufus/oh-my-claude) into .claude/skills/git-commit-validator in your project. Claude Code loads it when a task matches its description.

How do I install Git Commit Validator in Codex?

Run `npx skills add TechDufus/oh-my-claude --skill git-commit-validator -a codex`. Or copy the skill folder (plugins/oh-my-claude/skills/git-commit-validator in TechDufus/oh-my-claude) into .agents/skills/git-commit-validator in your project. Codex loads it when a task matches its description.

Can I use Git Commit Validator in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add TechDufus/oh-my-claude --skill git-commit-validator -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/git-commit-validator, .gemini/skills/git-commit-validator, .github/skills/git-commit-validator and .opencode/skills/git-commit-validator in your project.

What does Git Commit Validator need to run?

Going by SKILL.md and its folder, Git Commit Validator needs the command-line tools its instructions call (git). Its frontmatter pre-approves these tools: Bash(git status:*), Bash(git diff:*), Bash(git add:*), Bash(git log:*), Read, Grep.

Does Git Commit Validator access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Git Commit Validator safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Git Commit Validator use?

Git Commit Validator is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Git Commit Validator use?

About 2k tokens (SKILL.md is roughly 8.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Git Commit Validator?

Skills that share tags, products or a category with Git Commit Validator: Contextual Commit Messages (yamadashy/repomix, 29k stars), React Router Release Notes Prep (remix-run/react-router, 57k stars), Caveman Commit (vishiri/fantasia-archive, 409 stars) and PR Finalize Review (microsoft/garnet, 12k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Git Commit Validator?

TechDufus (a GitHub user) maintains it in TechDufus/oh-my-claude, which has 174 GitHub stars. The repository holds 12 skills in this directory. The repository was last updated on July 13, 2026.

Source: TechDufus/oh-my-claude on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.