agent-guardrails
Skill2 starsChanged 2 months agoMITView on GitHub
Turn recurring agent mistakes in a project into enforceable constraints. Use when the user keeps correcting the same mistake or asks to prevent a repeated class of errors. Do NOT use for a single bug fix, general code review, or skill-library cleanup.
7 other projects use a version of this.
Adopted by
Most recently taken up by
- milad-ahmd/agent-skillstheir own version, first seen Nov 8, 2026
- vindreshsingh/engineering-skillstheir own version, first seen Oct 20, 2026
- guerrilla2799/ops-and-scale-ostheir own version, first seen Oct 13, 2026
- Sathvikar01/Agent-engineering-skillstheir own version, first seen Oct 5, 2026
- produckyou-design/agent-guardrailstheir own version, first seen Aug 18, 2026
- antonioneto11/agent-dev-frameworktheir own version, first seen Jul 11, 2026
Other versions7 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 7
- jzOcb/agent-guardrails★ 15same name
- milad-ahmd/agent-skills★ 5same name
- Sathvikar01/Agent-engineering-skills★ 3same name
- guerrilla2799/ops-and-scale-os★ 1same name
- produckyou-design/agent-guardrails★ 1same name
- antonioneto11/agent-dev-framework★ 0same name
- vindreshsingh/engineering-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository27 other files it gives its agents.
- benchmark-checklistSkill
- blast-radiusSkill
- blog-reviewSkill
- code-reviewSkill
- create-verification-skillSkill
- datavizSkill
- grill-meSkill
- grok-repoSkill
- hammerspoonSkill
- html-lessonSkill
- karpathy-planningSkill
- mechanism-vizSkill
- obsidian-captureSkill
- obsidian-searchSkill
- paper-searchSkill
- readbackSkill
- repo-evalSkill
- route-skillSkill
- sherlockSkill
- show-meSkill
- sketch-conceptSkill
- skill-curatorSkill
- test-writingSkill
- tla-modelSkill
- web-recapSkill
- write-docsSkill
- write-skillSkill
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 5 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 6 edited versions we read keep these.
5
Distinctive
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 12
Read relevant project commits, reverts, review comments, instruction files, and examples supplied by the user.
- Distinctive: line 24
Project guidance: Keep judgment calls that cannot be enforced as concise instructions, with their limit stated.
- Distinctive: line 32
Test a nearby valid case too, especially for syntax or text-based rules.
- Distinctive: line 38
Keep any rule-to-enforcement mapping beside the project's existing guidance only when it helps maintainers find the check.
- Distinctive: line 39
Leave judgment-only rules visible.
“Common” is measured: kept by at least 6 in 10 of the 6 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
agent-guardrails
Replace a repeated correction with a constraint that catches the next occurrence.
Find the class
Read relevant project commits, reverts, review comments, instruction files, and examples supplied by the user. Stay within the current project and explicitly supplied history; do not search unrelated conversations or host memory.
Group mistakes by their cause rather than their wording. Require two distinct occurrences before calling a class recurring; multiple comments about one occurrence count once. A request to prevent a specific mistake can justify a guard without a history claim. Record the evidence and the behavior that should have happened instead.
Choose the strongest practical constraint
Work down this order, stopping at the smallest change that prevents the demonstrated error:
- Ownership and architecture. One owner for shared state, one authoritative list, an internal boundary, or removal of an obsolete example can make the mistaken path unavailable. Reject a broad redesign whose cost exceeds the recurring failure.
- Types and schemas. Encode the invalid state or unsupported operation so existing validation rejects it.
- Lint, build, or CI. Catch the bad pattern with an actionable error naming the supported alternative. Follow the project's existing check path. If legacy violations make adoption impractical, reject newly introduced violations without hiding the old ones.
- Behavioral regression. Protect the external contract with an independent expected result. An internal-shape assertion is not a substitute for a behavior check.
- Project guidance. Keep judgment calls that cannot be enforced as concise instructions, with their limit stated. Another reminder does not count as an enforced guard.
For each chosen level, say why a cheaper or stronger option did not fit. Do not add every layer for the same error.
Prove the constraint
Recreate a representative past mistake in an isolated fixture, scratch checkout, or narrowly controlled reversible edit. Show that the normal project check rejects it for the intended reason, then that the corrected form passes. Use the same command CI will use when CI enforcement is claimed.
Test a nearby valid case too, especially for syntax or text-based rules. A check that bans legitimate code or fails for an unrelated reason is unfinished. When a real-case replay is unavailable, label the guard unverified and name what remains to run.
Keep the change scoped
- A diagnosis-only request ends with evidence and proposed constraints. An authorized implementation fixes the selected classes within the project; it does not expand into host configuration, global agent rules, deployment, or publication.
- Preserve existing tests and project policy. Changing their contracts requires the authority applicable to that project.
- Keep any rule-to-enforcement mapping beside the project's existing guidance only when it helps maintainers find the check. Do not create another policy file or append unenforced rules by default.
- Leave judgment-only rules visible. Drop an obsolete reminder only after proving its constraint covers the original cases.
Output
Report each class with its occurrence evidence, selected constraint and cost, failing replay, passing correction and valid case, and enforcement command. Identify any remaining judgment call or verification gap. Report only classes the evidence supports.
Adapted from pstack/correct, under the MIT license.
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.

