agentleFS
jaetaskjaetask/skills/skills/guardrails/SKILL.md

guardrails

Skill1 starsChanged 11 days agoMITView on GitHub

Check a repo has the guardrails agents need, filed by layer from codebase to prose, wire up the ones the user picks, then report only what changes. Use for /guardrails, or to check a repo's guardrails.

  • Installs packages

19 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use evaluation, statechart and 8 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • NVIDIASkill

    evaluation

    Compatibility name for modelopt-evaluation. Evaluate model accuracy with NeMo Evaluator Launcher.

    Also in 3 projects that use this

  • shiwenbin1617Skill

    statechart

    Check a TLA+ model of a system that moves between states, such as a product flow, a protocol, or a service, and draw it as a Mermaid statechart. The report gives the shortest path to each state that breaks a rule. Use for /statechart, or to show a bug as a path through states.

    Also in 3 projects that use this

  • AWSSkill

    planning

    Discovers user intent and generates a structured, step-by-step plan for model customization workflows. This skill must always be activated alongside any other skill when the user's request relates to model customization — including fine-tuning, training, building, customizing, reviewing data, or getting advice on approach, regardless of domain. Do not skip this skill even if the immediate ask is narrow (e.g., reviewing data format or a single workflow step), because planning discovers the full scope of work needed. Also activate when the user wants to resume, continue, or modify an existing plan.

    Also in 3 projects that use this

  • GoogleSkill

    wayfinder

    Plan a huge chunk of work — more than one agent session can hold — as a shared map of decision tickets on your issue tracker, and resolve them one at a time until the way to the destination is clear.

    Also in 3 projects that use this

  • GoogleSkill

    prototype

    Build a throwaway prototype to answer a design question. Use when the user wants to sanity-check whether a state model or logic feels right, or explore what a UI should look like.

    Also in 4 projects that use this

  • NVIDIASkill

    research

    Before designing a feature, research how comparable libraries solve the problem, check best practices, known pitfalls, and upstream changes. Use when starting a new feature, investigating an unfamiliar area, or the user asks to research something.

    Also in 3 projects that use this

  • +3 more from google

The file

We split this skill into the rules it gives an agent

2 rules. 0 are common, 0 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 18 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Write checks.yml, and add the AGENTS.md line it prints.

    line 16
  2. Very specific:

    Run uv run <this skill>/guardrails.py check until every check that is on passes.

    line 25

“Common” is measured: kept by at least 6 in 10 of the 18 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Guardrails

Image: Install once and pick checks per repo; a weekly run compares each repo with its last run and reports only what changed, suggesting a new check once.

Checks that run themselves, so agents bounce off them instead of the user.

Everything lives in .agents/guardrails/.

  1. In the repo, run uv run <this skill>/guardrails.py init. It proposes checks.yml: the repo's typecheck, lint, format, test and verify commands, and every check with pass or fail.
  2. Show it. The user turns each check on or off. Nothing is on until they say.
  3. Write checks.yml, and add the AGENTS.md line it prints.
  4. Wire up each check that is on and failing, smallest fix first:
    • pre-commit: hooks/pre-commit runs typecheck and lint; git config core.hooksPath .agents/guardrails/hooks, also set by the repo's install script.
    • format: hooks/pre-commit also runs the format command in check mode. Reformat the repo in its own commit first; where the linter fights the formatter, turn off the linter's style rules.
    • tests-before-merge: CI runs the test command, or hooks/pre-push does.
    • verify: a command that checks real output, such as approved-output or end-to-end tests, runs in CI or hooks/pre-push.
    • ast-grep: sgconfig.yml, one ast-grep YAML rule per ban in rules/ with a quoted message, and a test for each in rule-tests/. Run ast-grep with -c .agents/guardrails/sgconfig.yml. Install @ast-grep/cli as a dev dependency, or brew install ast-grep.
    • no-comments: the delete-comment skill sorts the comments, deletes them and sets the ratchet.
    • A fix bigger than small: turn the check off and say why.
  5. Run uv run <this skill>/guardrails.py check until every check that is on passes. Report each layer's count, and name any empty layer.

Re-running the skill only checks. To keep watch, schedule uv run <this skill>/guardrails.py diff --repos <file> weekly: it prints only what changed since the last run, and nothing when nothing did. Its friction section ranks the trail tags logged since, by count times minutes lost; guardrails.py friction ranks them all, for pave.

Layers

Image: Five layers, widest first: codebase, static analysis, verification, prose, and human review last.

Layers from Lauren Tan. Invest from the top down: the more deterministic, the better. A rule agents keep breaking moves up a layer: from AGENTS.md to an ast-grep ban, a type or a test.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.