commit-validator

A checker for Git commits, which are saved snapshots of code changes. It verifies the commit message, change scope, secrets in the diff, tests, linting, formatting, and self-review requirements.

In plain words
What is it for?
Use it before committing code to enforce the required message format, AI attribution, one-purpose commits, clean checks, and secret scanning.
Why use it?
It helps prevent unclear commits, mixed unrelated changes, leaked credentials, and commits made while the project is failing checks.

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/thearchitectit/agent-guardrails-template/commit-validator
Any agent
npx skills add TheArchitectit/agent-guardrails-template --skill commit-validator
Clone the repo
git clone --depth 1 https://github.com/TheArchitectit/agent-guardrails-template

Made for: Claude Code, Codex.

Per session 23 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 302 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.00023 $0.00302
Opus 5 $0.00012 $0.00151
Sonnet 5 $0.00005 $0.00060
Haiku 4.5 $0.00002 $0.00030

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

Security

Grade A, and why

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.

.opencode/skills/commit-validator/SKILL.md · 55 lines

What it actually says

Commit Validator Agent

Validate all git commits against COMMIT_WORKFLOW.md standards.

Validation Rules

1. AI Attribution (REQUIRED)

Every commit message MUST include AI attribution: Co-Authored-By: Claude <[email protected]>

2. Single Focus Rule

  • One commit = One logical change
  • No unrelated changes in the same commit

3. No Secrets in Diff

Scan for API keys, tokens, passwords, private keys, .env contents, DB connection strings. Block immediately if found.

4. Pre-Commit Requirements

  • All relevant tests MUST pass
  • No linting or formatting errors
  • Code has been self-reviewed

Commit Message Format

<type>: <description>

[optional body]

Co-Authored-By: Claude <[email protected]>

Types: feat, fix, docs, style, refactor, test, chore

Validation Failure Actions

If validation fails:

  1. Block the commit
  2. Explain the violation
  3. Provide specific fix instructions
  4. Require user confirmation before proceeding

References

  • docs/workflows/COMMIT_WORKFLOW.md - Commit standards
  • skills/shared-prompts/error-recovery.md - Recovery procedures
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 · 55 lines · 23 tokens per session scan A 0c51b72a291d

Subscribe to this mod's changes

commit-validator is a skill published in the GitHub repository TheArchitectit/agent-guardrails-template (79 stars, last pushed 4d ago), licensed BSD-3-Clause. It adds 23 tokens to every session and 302 once invoked, about $0.0001 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.

Related

Other skills, from other repositories

prs

Expertise in managing the Git and GitHub Pull Request lifecycle, including staging changes, generating PR descriptions, and branch management.

google-gemini/gemini-cli · 27 tokens

split-commit-into-stack

Split one oversized commit or branch into a stack of independently reviewable Graphite (gt) PRs - deciding what genuinely separates, what is atomic and must stay whole, and proving each lower PR builds and passes without the ones above it. Use when asked to "split this PR", "this commit is too big", "break this into a…

maximhq/bifrost · 96 tokens

split-micro-app

Use when splitting a monorepo surface into a standalone micro app (React Router SSR on Cloudflare Workers), splitting a surface whose rendering code lives in the lobehub-cloud business overlay, fighting SSR bundle bloat from main-src imports, deploying its assets to CDN/R2, adding SEO/OG meta to an SSR page, adding a…

lobehub/lobehub · 109 tokens

agent-tracing

Agent tracing CLI for execution snapshots. Use for agent-tracing, traces, snapshots, LLM call inspection, context engine data, agent step analysis, execution debugging, or pulling remote/production traces ("拉线上 tracing") by operation id. Also the first stop for debugging agent tool calls — wrong or missing toolcalls…

lobehub/lobehub · 91 tokens

data-fetching-architecture

LobeHub data-fetching pipeline guide. Use for service layer, Zustand store, SWR, lambdaClient, useClientDataSWR, useFetchXxx hooks, or migrating useEffect fetches.

lobehub/lobehub · 48 tokens

deep-review

Multi-dimensional code review. Use when the user asks to review, evaluate, or audit a PR, diff, branch, or pasted change — including informal review asks like "look at this change for problems" — via light mode: one independent reviewer against the dimension quick checklists. Not for explain-only questions about what…

lobehub/lobehub · 92 tokens