Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add burin-labs/harn --skill harn-rulesgit clone --depth 1 https://github.com/burin-labs/harnWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/burin-labs/harn/harn-rules)<a href="https://agentmods.dev/skills/burin-labs/harn/harn-rules"><img src="https://agentmods.dev/badge/skills/burin-labs/harn/harn-rules.svg" alt="Measured on agentmods" height="20"></a>- NVIDIA SkillSpector warn
SkillSpector: 1 finding, up to high
These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →
- high Tool Misuse · line 76 Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00026 | $0.01541 |
| Opus 5 | $0.00013 | $0.00771 |
| Sonnet 5 | $0.00005 | $0.00308 |
| Haiku 4.5 | $0.00003 | $0.00154 |
Grade A, and why
harn-rules scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 105 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Harn rule engine
Use this skill when matching or rewriting code structurally — a search pattern,
a lint rule, or a codemod — instead of with regex/glob. The engine is the
harn-rules crate; it is exposed to Harn as std/rules and to the CLI as
harn scan (read-only) and harn codemod (apply).
Pair it with [[harn-language]] for .harn syntax and [[harn-testing]] for
conformance fixtures.
Start here
crates/harn-rules/README.mdis the rule-model reference (matcher forms, relational/composite algebra,where/transform/fix, safety tiers).docs/src/cookbooks/rules-engine.mdis the worked-example cookbook (harn scan/harn codemod, authoring a rule).- A rule is TOML; an agent can author and run one entirely from
.harn(viastd/rules) without recompiling the binary.
A rule, end to end
- A rule has an identity (
id,language,severity,message), a[rule]matcher block, and an optionalfix. - Scalar fields come before
[rule]—[rule]opens a TOML table, so any later top-level scalar would bind to it. - The rule's kind is derived: a
fixmakes it a codemod; amessagewith nofixis a lint; a bare matcher is a search.
Matcher forms (the [rule] block)
pattern— a code snippet with$VARmetavariable holes (ast-grep style), compiled to a tree-sitter query. Operators/keywords match literally (??≠||); a repeated$VARunifies; a metavar-free pattern is a literal pattern (foo()matches calls tofoo, not any call).$VAR:kind— a typed placeholder: bind only nodes of a syntactic class.expr/stmt/type/identaliases resolve to the grammar's supertype (TypeScript/JS/Python), else use an exact tree-sitter kind. Unknown kind = compile error.kind— a bare tree-sitter node kind.regex— a regex over node text.- Relational (each a sub-rule, tuned by
stopBy/field):inside(ancestor),has(descendant),follows/precedes(siblings). - Composite:
all/any(lists),not(a sub-rule),matches(a[utils.NAME]utility rule by id). Every key on a node is ANDed.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 8d ago First seen · 105 lines · 26 tokens per session scan A f42aea0d0e51
harn-rules is a skill published in the GitHub repository burin-labs/harn (20 stars, last pushed today), licensed Apache-2.0. It adds 26 tokens to every session and 1,541 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
hunk-extensions
Maps the hunkdiff/extension authoring surface for Hunk, the terminal diff viewer — hiding or reordering reviewed files, docked panes, alternate file views, commands and key bindings, dialogs, workspace writes, themes, syntax languages, VCS backends, lifecycle events. Use when writing, debugging, or installing a Hunk…
md-audit
Read-only code quality audit — scan the current working directory for common issues (bugs, dead code, security hotspots, missing error handling) and return a prioritised findings report. No files are edited. Use when asked to "audit the code", "quick audit", "find issues", "code scan", or "what's wrong with this…
oracle
Oracle second-model review: bundle prompts/files, debug, refactor, design.
cocoreview
CocoReview — structured code review with six-severity findings vocabulary, progressive disclosure architecture, and universal anti-pattern baseline. Invoked via $review [file] [--complexity] [--security] [--architecture] [--language ].
review-loop
Run the adversarial verification loop — implement, then hand the change to a fresh checker that did not write it, fix what it finds, and re-dispatch until APPROVE. Use before claiming any behavioural change is done, and on requests like "review loop", "adversarial review", "independent review", "get this verified"…
commit
Auto-fix, lint, test, and commit changes with a conventional commit message.