dogma: Skill for Claude Code

.github/skills/validate-before-commit/SKILL.md

validate-before-commit is a skill for Claude Code from EndogenAI/dogma. It costs 102 tokens per session (1,999 once invoked), scanned A, original, Apache-2.0.

A pre-commit checklist that selects the required linting, formatting, testing, and compliance checks based on the files changed. A pre-commit hook is an automatic check that runs before Git creates a commit.

In plain words
What is it for?
Use it before committing or pushing changes to determine and run the applicable validation commands, and to install the repository's pre-commit hooks.
Why use it?
It reduces the chance of committing files that fail the repository's required checks. It also explains which checks apply to scripts, tests, agent files, skills, and research documents.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: mentions AGENTS.md.

This is EndogenAI/dogma's own configuration. It tells Claude Code how to work on dogma itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything dogma configures →

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is uv run python scripts/validate_agent_files.py --all.

Reuse

Borrowing it

Nothing to install: this file belongs to EndogenAI/dogma. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/EndogenAI/dogma/main/.github/skills/validate-before-commit/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/EndogenAI/dogma

Made for: Claude Code.

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 validate-before-commit

README.md
[![agentmods](https://agentmods.dev/badge/skills/endogenai/dogma/validate-before-commit/github.svg)](https://agentmods.dev/skills/endogenai/dogma/validate-before-commit)
Your own site
<a href="https://agentmods.dev/skills/endogenai/dogma/validate-before-commit"><img src="https://agentmods.dev/badge/skills/endogenai/dogma/validate-before-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 validate-before-commit

Your own site · 80×15
<a href="https://agentmods.dev/skills/endogenai/dogma/validate-before-commit"><img src="https://agentmods.dev/badge/skills/endogenai/dogma/validate-before-commit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 102 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,999 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.00102 $0.01999
Opus 5.5 $0.00041 $0.00800
Sonnet 5.5 $0.00020 $0.00400
Haiku 4.5 $0.00010 $0.00200

Measured 2mo ago against content hash 6d5601abe0a6, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

validate-before-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 2mo 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.

.github/skills/validate-before-commit/SKILL.md · 200 lines

How it starts

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

Validate Before Commit

This skill enacts the Algorithms Before Tokens axiom from MANIFESTO.md: validation is encoded once as a deterministic gate and executed consistently, not re-checked interactively per session. The full guardrail sequence is governed by AGENTS.md § Guardrails. When this skill and those documents conflict, the primary documents take precedence.


1. Decision Table — Which Checks Apply

Run the checks corresponding to which file types were changed:

Files changed Required checks
scripts/ or tests/ Lint, format, fast tests
.github/agents/*.agent.md Lint, format, fast tests, agent compliance, drift check
.github/skills/*/SKILL.md Lint, format, fast tests, skills compliance
docs/research/*.md Research doc compliance
Any of the above All applicable checks in the rows above
None of the above (docs, plans, guides) No code checks required

Pre-commit hook coverage — the hooks in .pre-commit-config.yaml run automatically on git commit (and fast-tests on git push) once installed with uv run pre-commit install. They cover every row in this table. If pre-commit is installed, manual checks are needed only for lychee dead links (network-only, no local equivalent).

When in doubt, run all checks. The full sequence takes under 60 seconds on a warm environment.


2. Full Check Sequence

2.1 Lint and Format

uv run ruff check scripts/ tests/
uv run ruff format --check scripts/ tests/

To auto-fix format violations (safe, no logic changes):

uv run ruff format scripts/ tests/

2.2 Fast Tests

uv run pytest tests/ -x -m "not slow and not integration" -q

The -x flag stops on the first failure. The marker filter skips network and slow tests — fast enough to run before every commit.

2.3 Agent File Compliance

Run this only when .github/agents/*.agent.md files were changed:

Read the full file on GitHub · 200 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. 2mo ago First seen · 200 lines · 102 tokens per session scan A 6d5601abe0a6

Subscribe to this mod's changes

validate-before-commit is a skill published in the GitHub repository EndogenAI/dogma (2 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 102 tokens to every session and 1,999 once invoked, about $0.0004 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

validate-before-commit compared with skills from other repositories

validate-before-commit next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
validate-before-commitEndogenAI/dogmaSkill22mo agoApache-2.0A102Claude Code
open-code-reviewalibaba/open-code-reviewSkill50kyesterdayApache-2.0A98Cursor
baby-sitlangchain-ai/open-sweSkill11kyesterdayMITA30Claude Code, Codex
meta-codereview-current-diffopensquilla/opensquillaSkill7.1k6d agoApache-2.0A73Claude Code, Codex
cyrus-setup-repositorycyrusagents/cyrusSkill883yesterdayApache-2.0A25Claude Code, Codex
approve-mergeme2resh/apexyardSkill542yesterdayMITA33Claude Code
install-skill-from-githubniki914/zafiroSkill3404d agoMITA85Claude Code, Codex