Finds which rules in AGENTS.md, CLAUDE.md, or GEMINI.md a coding agent keeps breaking, counts violations across sessions, and converts broken rules into blocking hooks with replay tests.
Ships in harness-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
A rule in AGENTS.md is advice: the agent can read it and still break it, most often after a long session or a compaction. This skill finds the rules the agent actually breaks, counts every break in the user's recent sessions, and turns each broken rule into a hook (a small program the agent's harness, such as Claude Code or Codex, runs before every tool call, which can block the call) with a replay test against the real breaks. It reads context files and session transcripts on this machine, masks secrets in every excerpt and in the diff of each settings file it would change, and sends nothing anywhere.
agents-md-checker.guardrail-tester.runaway-guard.claim-check.references/checkable-rules.md says what to use instead.Tell the user this before the first run:
extract reads context files. count and test read session transcripts. Nothing is sent
anywhere.test runs only the hook, through the same command the settings entry would use, feeding it each
recorded tool call as JSON. It never runs the recorded commands themselves.generate changes nothing without --write. It shows the hook file and a diff of each settings
file it would change, with secrets masked. With --write it writes that one hook file and merges
one entry into each chosen harness's settings, keeping every existing hook and the file's own
formatting.generate refuses to write through a symlink that leads outside the project (or, with --scope user, outside the harness folder) unless --follow-symlinks is given, and refuses to replace a
hook file it did not write.<skill-dir> means the folder that holds this SKILL.md (Claude Code shows it as the skill's base
directory). Run every command from the user's project folder, with the script path in double quotes
as shown, because skill folders can sit under paths with spaces.
Extract the candidate rules.
python3 "<skill-dir>/scripts/rules.py" extract --repo .
Add --user to include personal files such as ~/.claude/CLAUDE.md, and --file <path> for a
file the agents load by name. Each line gets a hint: command, path, or tool rules can
become hooks; advice rules stay as text. If the user names a rule that is not in the table,
search the context files for it and draft it from that line, with its file:line as the source.
Done when you have the candidate table, or you have told the user no context files were found.
Draft rules.json with the user. Write one entry per checkable rule in the schema of
references/checkable-rules.md, starting from its tested patterns where one fits:
forbid_command (a regex on shell commands, anchored with ^), protect_path (a glob such as
.env or dist/**), or forbid_tool (a regex on tool names). Give each a message that says
what to do instead. Record the rest as "kind": "advice". Show the user every pattern in plain
words ("blocks any command that starts with npm"). Save the file in the project or anywhere else
the user prefers, such as a notes folder; every command takes its path with --rules. Done when
the user has seen each pattern and step 3 runs without an input error.
Count the breaks.
python3 "<skill-dir>/scripts/rules.py" count --rules rules.json --project .
Keep --project . for rules from this project's files, so only this project's sessions count;
drop it for personal rules. Default window: 30 days (--since 14d, --since 2026-09-01). Read
the examples with the user and tighten any pattern that caught the wrong calls, then run again.
Exit code 2 means rules.json has a problem; the message names the rule. If every count is zero
but the user reports breaks, rerun without --project or with a longer --since; if the user
still wants a guard, continue to step 4. Done when every example is a real break, or every count
is zero (then tell the user the text rules are holding, and offer to check again later).
Test a hook on the recorded calls.
python3 "<skill-dir>/scripts/rules.py" test --rules rules.json --only <ids> --project .
<ids> is the comma-separated ids of the broken rules. Use the same --project and --since as
step 3, so the replay covers the same sessions. This builds a fresh hook in a temporary folder,
replays up to 200 of the newest breaks per rule (each must be blocked) and up to 400 other recent
calls (each must be allowed), and runs the hook the way the harness would. Done when misses and
false positives are both zero, or each remaining one is explained to the user and accepted.
Preview the install.
python3 "<skill-dir>/scripts/rules.py" generate --rules rules.json --only <ids> --harness claude-code --project .
Pick harnesses from claude-code, codex, gemini-cli, and cursor (comma-separated);
--scope user installs for every project. When the hook already exists, generate keeps the rules
it holds and replaces any with the same id, so a second run with other --only ids adds to the
hook; --replace writes only these rules, and the headline names every rule that stops being
enforced. Show the user the hook path, the settings diff, and the notes. If a note says a symlink
leads outside the project, show the user the real target. Done when the user has said yes or no
to the shown change.
Install only after a clear yes. Run the same command with --write, adding
--follow-symlinks only if the user approved writing to the real target of a symlink. Then pass
on the notes the report prints, such as trusting the hook in Codex's /hooks. Done when the
report's headline starts with "Installed".
file:line, the hint,
and the rule text. Hints are guesses; you and the user decide.Breaks (tool calls that broke it), Ran (the harness let them run),
Stopped (the user, a permission rule, a hook, or an auto reviewer refused them), Sessions, and
the last date. The three newest examples per rule show what matched; for a long command they show
the part that matched. A warning says a pattern matches more than half the calls it checks: that
pattern is too broad. A forked session starts with a copy of the earlier one; those calls count
once.generate again.sh -c '...'), and notes, including any symlink that leads outside the project.
references/hook-formats.md explains each harness's format.--json gives every field; --out <path> writes the report to a file.--write): the hook path and each settings file.count in two weeks to confirm the breaks stopped.python3 "<skill-dir>/scripts/rules.py" generate --uninstall --harness <harnesses> --project .
shows the removal (add --scope user if you installed with it); add --write after a yes. It
removes only rules-to-guards entries and leaves the hook file in place for the user to delete.
scripts/rules.py: extract, count, generate, and test. Python 3.9+, standard library
only.scripts/rules_guard.py: the hook template; generate writes a copy with the rules embedded.scripts/transcripts.py: the shared session reader for Claude Code, Codex, Gemini CLI, and
OpenCode.scripts/safe.py: the shared helper that masks secrets in report text and shows it as one line of
inline code. A synced copy; do not edit it here.references/checkable-rules.md: the rules.json schema, how commands and paths are matched, tested
patterns, and regex pitfalls.references/hook-formats.md: each harness's hook files, events, inputs, and blocking rules, with
sources.LICENSE.txt (opens in a new tab)README.md (opens in a new tab)references/checkable-rules.md (opens in a new tab)references/hook-formats.md (opens in a new tab)scripts/rules.py (opens in a new tab)scripts/rules_guard.py (opens in a new tab)scripts/safe.py (opens in a new tab)scripts/transcripts.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
/harness-skills:rules-to-guardsfrom harness-skills
npx claudepluginhub opensourceassist/agent-harnesses-ranklist --plugin harness-skills2 plugins ship this exact skill · first indexed Oct 9, 2026
10 skills in this plugin
/agents-md-checkerChecks which instruction files (AGENTS.md, CLAUDE.md, GEMINI.md, Cursor rules, Copilot instructions) each coding agent loads from a repo, what gets cut or skipped, and whether the commands those files document still work. Use when the user asks whether Claude Code, Codex, Gemini CLI, Cursor, OpenCode, Copilot, or Aider reads their AGENTS.md or CLAUDE.md; why an agent ignores or truncates part of a context file; whether the build, test, or lint commands and paths in AGENTS.md are stale; or wants to audit context files across agents. Reads local files and makes no network calls; runs documented test, lint, and build commands only with --run after the user agrees./claim-checkClaim checker that audits a coding agent's statements that tests pass or a build is clean against its own session transcripts: whether a matching run happened before the claim, whether it passed, and whether code changed after it. Use when the user asks whether the agent really ran the tests, how often it said tests passed without proof, or whether "all tests pass" was true; wants to catch false or stale success claims; asks whether the agent deleted, skipped, or xfailed failing tests or loosened assertions in the current diff; or wants a Stop hook that sends the agent back to rerun tests before finishing. Runs locally: reads Claude Code, Codex, Gemini CLI, and OpenCode transcripts and the git diff; sends nothing./guardrail-testerGuardrail tester that checks whether the permission rules and PreToolUse hooks already set up in Claude Code, Codex, Gemini CLI, OpenCode, or Cursor stop a battery of dangerous commands, including wrapped, reordered, and full-path forms that slip past prefix rules, and measures prompt friction on the latest tool calls. Use when the user asks whether deny rules or hooks block force pushes, rm -rf, secret reads, or downloads piped into a shell; wants to test or audit guardrails, or find a bypass in permission settings or exec policy; asks how many prompts or blocks the rules cause; or just installed a guard hook and wants proof it holds. Local only, no network; executes the user's own hook commands only with their yes./harness-test-driveTest-drives coding agents (Claude Code, Codex, Gemini CLI) on tasks mined from the user's own git history: each agent gets a past commit message in a fresh copy of the repo, and the repo's own tests score how many tasks it completes, dollars per task, minutes, and change size. Use when the user asks which coding agent or harness works best on their codebase; wants to compare or benchmark agents on their own repository instead of trusting leaderboards such as SWE-bench; wants to trial one agent against another before switching; or asks what each agent costs per fixed bug. Spends money: the harness CLIs call their model providers, so a dollar cap is required. The scripts make no network calls./regression-finderRegression check for coding agents: shows how the agent behaved before and after each harness update, model switch, or week in the user's own Claude Code or Codex history, and finds the point where it changed. Use when the user says the agent's quality dropped or it got worse, dumber, lazier, or degraded since an update or since they upgraded; asks whether a new Claude Code or Codex version or model made it worse than the old one; wants to know which release, version, or week it regressed in; or wants numbers to report a regression, such as reads before edits, interruptions, and corrections per version. Runs locally and reads transcripts only; nothing goes over the network./runaway-guardRunaway guard: a hook that stops a live Claude Code or Codex session when the agent loops on the same tool call, keeps failing, or exceeds a dollar cap. Use when the user wants a spending cap, budget limit, or cost ceiling for interactive agent sessions (the built-in --max-budget-usd works only in print mode); wants to halt an agent that repeats the same command, is stuck in a loop, or runs up a bill unattended overnight; wants a circuit breaker for several failed tool calls in a row; or asks how much the current session has spent against its cap, why a call was blocked, or how to raise or reset the cap. Runs locally: reads the session transcripts before each tool call and sends nothing.Other plugins' skills for the same job