| name | validation-enforcer |
| description | Automatically runs project validation commands (linters, type checkers, tests) after file edits and blocks commits on any failure. Reads validation commands from CLAUDE.md or auto-detects from project type. Enforces strict quality gates to catch issues early. (project) |
Validation Enforcer Skill
Purpose
Enforce strict quality gates by automatically running validation after changes. Blocks commits on ANY failure - no exceptions.
When This Skill Activates
- After any file edit (automatic)
- Before suggesting a commit (automatic)
- When user runs validation commands manually
STRICT ENFORCEMENT MODE
This skill operates in strict mode:
- ANY validation failure blocks the commit
- No "warning only" mode
- No skipping validations
- Must fix all issues before proceeding
Validation Detection
Priority 1: Read from CLAUDE.md
Look for a "Validation Commands" section in CLAUDE.md:
## Validation Commands (Must Pass Before Committing)
```bash
uv run ruff check .
uv run ruff format --check .
uv run mypy packages/
uv run pytest
### Priority 2: Auto-Detect from Project Type
| Project Marker | Validators |
|----------------|------------|
| `pyproject.toml` | `ruff check .`, `ruff format --check .`, `mypy .` |
| `package.json` | `npm run lint`, `npm run typecheck`, `npm test` |
| `*.csproj` | `dotnet build`, `dotnet test` |
| `Cargo.toml` | `cargo check`, `cargo clippy`, `cargo test` |
| `go.mod` | `go vet`, `go test` |
### Priority 3: Common Fallbacks
If no specific config found, look for:
- `.ruff.toml` → run ruff
- `eslint.config.*` → run eslint
- `tsconfig.json` → run tsc
- `pytest.ini` / `pyproject.toml[tool.pytest]` → run pytest
## Validation Flow