validate-code
Skill16 starsChanged 7 months agoMITView on GitHub
Validate code quality — auto-fix formatting/lint, verify types, run tests. Use when asked to "validate code", "check code", or validate before committing; also lint-only asks ("run linter", "fix lint errors"). Don't use for committing, pushing, or writing new tests.
In this repository38 other files it gives its agents.
- AGENTS.mdAGENTS.md
- a11y-auditSkill
- architecture-auditSkill
- buildSkill
- codebase-designSkill
- code-reviewSkill
- commitSkill
- create-adrSkill
- create-pull-requestSkill
- create-skillSkill
- deps-auditSkill
- diagnoseSkill
- domain-modelingSkill
- e2eSkill
- explain-codeSkill
- fortifySkill
- frontend-ui-engineeringSkill
- grill-meSkill
- handoffSkill
- hardenSkill
- i18nSkill
- perf-auditSkill
- planSkill
- prose-fixSkill
- prototypeSkill
- researchSkill
- reviewSkill
- reviseSkill
- safe-repoSkill
- shipSkill
- source-drivenSkill
- specSkill
- tddSkill
- teachSkill
- testSkill
- triage-reviewSkill
- visual-reviewSkill
- visual-validateSkill
The file
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 11 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈11
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Run the project's own quality gates — format/lint fix, type check, tests — whatever this project defines.
- Distinctive: line 12
Detect the project's commands: Prefer a task the project already defines over a raw tool call:
- Distinctive: line 26
Always auto-fix before reporting errors — but never modify files silently.
- Distinctive: line 27
Run fix → check → test sequentially
- Distinctive: line 28
If the fix step fails, still run check + tests.
- Distinctive: line 30
Never commit, stage, or push anything
- Distinctive: line 34
If no recognizable manifest/tasks → ask the user for the validate command, or report and stop
- Distinctive: line 35
If a step's command doesn't exist → skip it, note it was skipped
- Distinctive: line 36
If all steps missing → report nothing to run, stop
- Distinctive: line 37
If tests time out → report and suggest raising the runner's timeout
- Distinctive: line 38
If a runner crashes (exit code other than 0 or 1) → report crash output and stop
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Validate Code
Run the project's own quality gates — format/lint fix, type check, tests — whatever this project defines. Detect the toolchain; never assume npm. Lint-only ask → steps 1–3, skip tests; check-only wording ("check lint", "run the linter" without "fix") → also skip the fix step.
Workflow
- Detect the project's commands. Prefer a task the project already defines over a raw tool call:
- Node →
package.jsonscripts (lint:fix/lint-fix,lint,typecheck/tsc,test) - Python →
pyproject.toml/tox.ini/Makefile(ruff --fix/black,ruff/flake8,mypy,pytest) - Go →
gofmt -w,golangci-lint run/go vet,go build ./...,go test ./... - Rust →
cargo fmt,cargo clippy,cargo check,cargo test - else → read the
Makefile/ CI config for the equivalent targets
- Node →
- Format + lint fix (the fix variant). These rewrite files in place and exit 0 silently — capture what changed right after (
git status --short/git diff --stat) and remember it for the report. The user is about to commit; they need to know their tree was modified. - Lint + types (check variants).
- Tests.
- Report: an Auto-fixed section listing files the fix step changed (or "nothing auto-fixed"), then overall PASS or FAIL with
file:lineerror references.
Rules
- Detect the project's commands — never hardcode a package manager
- Always auto-fix before reporting errors — but never modify files silently; always report which files auto-fix changed
- Run fix → check → test sequentially
- If the fix step fails, still run check + tests; report all failures at the end
- Report errors as
file:linereferences - Never commit, stage, or push anything
Error Handling
- If no recognizable manifest/tasks → ask the user for the validate command, or report and stop
- If a step's command doesn't exist → skip it, note it was skipped
- If all steps missing → report nothing to run, stop
- If tests time out → report and suggest raising the runner's timeout
- If a runner crashes (exit code other than 0 or 1) → report crash output and stop
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

