validate-your-validator
Skill2 starsChanged 3 months agoApache-2.0View on GitHub
Use when writing or trusting anything that decides pass/fail — a test, a linter, a scanner, a health check, a monitor. Makes the checker prove it can fail before you believe a green result.
In this repository53 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- block-dangerous-git-commandsSkill
- break-work-into-ticketsSkill
- build-a-domain-modelSkill
- build-a-throwaway-prototypeSkill
- check-if-data-is-safe-to-deleteSkill
- check-the-licence-before-you-copySkill
- choose-the-right-code-reviewSkill
- debug-a-silent-failureSkill
- deploy-to-production-safelySkill
- design-deep-modulesSkill
- detect-stale-documentationSkill
- diagnose-a-hard-bugSkill
- document-with-evidenceSkill
- edit-a-live-config-safelySkill
- find-architecture-improvementsSkill
- generate-a-setup-wizardSkill
- get-a-second-model-opinionSkill
- implement-from-a-specSkill
- investigate-an-unfamiliar-systemSkill
- keep-agent-memory-accurateSkill
- keep-secrets-out-of-the-repositorySkill
- know-what-a-change-costsSkill
- look-at-the-rendered-pageSkill
- make-the-next-failure-loudSkill
- map-an-undocumented-systemSkill
- map-the-attack-surfaceSkill
- pick-the-right-skillSkill
- plan-work-too-big-for-one-sessionSkill
- research-with-primary-sourcesSkill
- resolve-merge-conflictsSkill
- review-a-plan-before-you-buildSkill
- review-changes-against-spec-and-standardsSkill
- review-code-you-did-not-writeSkill
- root-cause-analysis-firstSkill
- route-work-to-the-right-modelSkill
- set-up-pre-commit-hooksSkill
- set-up-the-issue-trackerSkill
- set-up-verified-documentationSkill
- stress-test-a-decisionSkill
- stress-test-a-plan-with-docsSkill
- supersede-outdated-docsSkill
- survive-someone-elses-breaking-changeSkill
- tddSkill
- teach-a-conceptSkill
- triage-issues-and-prsSkill
- turn-a-decision-into-a-questionnaireSkill
- verify-before-saying-doneSkill
- write-a-handover-that-worksSkill
- write-a-spec-from-a-conversationSkill
- write-docs-for-agentsSkill
- write-docs-people-can-findSkill
- write-the-rollback-plan-firstSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 6 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
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 31
3. Run it. It must go red: If it does not, the checker is the bug — fix it before you fix anything else.
- Distinctive: line 34
4. Plant a control: something you know is fine: Run it. It must go green. A checker that flags everything is as useless as one that flags …
- Distinctive: line 44
6. Write down what it cannot catch: Every checker has a blind spot.
- Distinctive: line 92
Not only to automated checkers — to any method you are using to reach a conclusion.
- Distinctive: line 107
If your method flags the healthy control, throw the method away.
- Distinctive: line 130
When you record that a checker is in place, record what proved it:
≈ “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 your validator
A checker that cannot fail is not checking anything. It is a green light wired to nothing, and it is worse than no checker at all, because now everyone has stopped looking.
The test is simple and non-negotiable: plant the failure it exists to catch, and confirm it catches it. Until you have watched it go red on purpose, a green result carries no information.
When to use this
- You are writing a test, a lint rule, a scanner, a validator, a probe
- You are adding a health check or an alert
- You are about to trust a green CI run on something important
- A checker has been green for a suspiciously long time
- Someone says "the scan found nothing"
The procedure
1. Write the checker.
2. Plant a failure. Introduce, in a fixture or a scratch copy, exactly the thing the checker exists to detect. A real one, not a simplified one.
3. Run it. It must go red. If it does not, the checker is the bug — fix it before you fix anything else.
4. Plant a control: something you know is fine. Run it. It must go green. A checker that flags everything is as useless as one that flags nothing, and it is more expensive, because people learn to ignore it and then ignore the true positive too.
5. Keep both as permanent fixtures inside the checker. This is the part everyone skips. The planted failure and the control become cases the checker runs against itself, every time. The day someone refactors the pattern and it stops detecting anything, the suite goes red instead of going quiet.
6. Write down what it cannot catch. Every checker has a blind spot. An unwritten blind spot gets read as full coverage by the next person.
The case that earns this skill its place
A secret-detection step was added to a CI pipeline. It incriminated itself three times before it was fit to run.
First, it searched for bare credential prefixes. Those prefixes were written in its own rule list, in its own source file, which the scan walked. It reported itself as a leak. Excluding its own file made it green — and would have made it green forever, because there was no case proving it could still detect a real one.
Second, the sentinel string used as its own control appeared verbatim in the file. So the "proof it works" and the "thing it found" were the same bytes. It was detecting its own test data and reporting a pass.
Third, and worst, it flagged
TOKEN = os.environ.get("X")as a hardcoded secret. That line is the correct pattern — it is a secret being read from the environment, the exact thing you want people to write. The checker was punishing the good behaviour and, by symmetry, had never been shown a real hardcoded value to see whether it would fire on one.What fixed it was not a better pattern. It was two fixtures: a file containing a genuine-shaped credential that the suite asserts is flagged, and a file containing environment reads and placeholders that the suite asserts is not. Both live next to the scanner. Break the scanner now and the suite tells you.
Three separate ways to be green while proving nothing, in one small tool. Assume yours has at least one.
The two ways a checker dies
| Failure | What it looks like | How you catch it |
| Cannot fail | Always green. Nobody remembers it ever going red. | Plant a real failure. If still green, it is dead. |
| Always fails | Noisy, so everyone adds exclusions until it is silent again | Plant a known-good control. If it flags that, the rule is wrong, not the code. |
🔴 The exclusion is where checkers go to die. Every # noqa, every ignore
path, every skipped file is a place the checker was switched off to make the
build pass. Adding one is fine. Adding one without a case proving the checker
still fires elsewhere is how you end up with a scanner that only scans an empty
directory.
Apply it to diagnostic methods too
Not only to automated checkers — to any method you are using to reach a conclusion.
Run your method against something you already know the answer for.
The question was whether a database table was still in use. The method proposed was searching the codebase for references to its name. Applied as a control to tables that were demonstrably live — being written to right then — the search found nothing for those either. Names get built dynamically, come from config, live in a migration.
The method could not distinguish "unused" from "not referenced by a literal string". It would have authorised dropping live tables, and the search would have looked like diligence.
If your method flags the healthy control, throw the method away. Do not adjust it until the control passes — that is fitting the method to the answer you wanted.
Traps
⚠️ A checker that scans files must handle its own file honestly. Excluding itself is often correct. Excluding itself as the fix for it reporting itself, with no other case, means you have never seen it detect anything.
⚠️ A test that passes the first time you run it deserves suspicion. Break the code it covers and watch it fail, once. Especially for anything asserting an absence.
⚠️ An alert nobody has ever received is not an alert. Fire it deliberately. Confirm it arrives, at the destination, in a form someone would act on.
⚠️ Do not measure the checker by how much it finds. A scanner reporting 400 issues is usually a scanner about to be muted. Precision is what keeps it alive long enough to catch the one that counts.
The record
When you record that a checker is in place, record what proved it:
**Checker:** credential scan in CI
**Proved it can fail:** fixture with a real-shaped credential → flagged (exit 1)
**Proved it is not noisy:** fixture with environment reads → clean (exit 0)
**Both fixtures live in:** the scanner's own test suite
**Known blind spot:** credentials assembled at runtime from partsWithout the two middle lines, "we have a secret scanner" is a claim about a file existing, not about anything being scanned.
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.

