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 minghinmatthewlam/agent-guards --skill principle-test-behavior-not-implementationgit clone --depth 1 https://github.com/minghinmatthewlam/agent-guardsWrote 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/minghinmatthewlam/agent-guards/principle-test-behavior-not-implementation)<a href="https://agentmods.dev/skills/minghinmatthewlam/agent-guards/principle-test-behavior-not-implementation"><img src="https://agentmods.dev/badge/skills/minghinmatthewlam/agent-guards/principle-test-behavior-not-implementation/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/minghinmatthewlam/agent-guards/principle-test-behavior-not-implementation"><img src="https://agentmods.dev/badge/skills/minghinmatthewlam/agent-guards/principle-test-behavior-not-implementation.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.00050 | $0.00289 |
| Opus 5.5 | $0.00020 | $0.00116 |
| Sonnet 5.5 | $0.00010 | $0.00058 |
| Haiku 4.5 | $0.00005 | $0.00029 |
Grade A, and why
principle-test-behavior-not-implementation 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 9d 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.
This is a copy
88% identical to principle-test-behavior-not-implementation — 2 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
What it actually says
Test Behavior, Not Implementation
A test is a claim about what users of the code can observe through its interface: return values, errors, state they can read back, and effects on outside systems. Private helpers, internal call order, and intermediate data are implementation.
Judge each test against two imagined edits:
- Break the behavior (a wrong value, a skipped or doubled effect). If the test still passes, it proves nothing. The usual causes are a loose assertion, an expected value computed by the code under test, and an assertion on data the test built itself.
- Change the internals and keep every observable result. If the test fails, it is pinned to the implementation.
Keep a test that catches the first edit and survives the second. Rewrite or delete the rest. Drive the code through its public interface with a concrete input, and derive the expected value from the requirement. What an external service receives is behavior. A call to an internal helper is not. Pair "this never happens" with a case where it does happen. Assert the error type that callers branch on, not the message.
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 9d ago Changed · -4 lines 8aa44349662e
- 1mo ago Changed · -1 lines · -2 tokens per session 32bef6ab398f
- 1mo ago First seen · 22 lines · 52 tokens per session scan A f9a7cc57395f
principle-test-behavior-not-implementation is a skill published in the GitHub repository minghinmatthewlam/agent-guards (46 stars, last pushed 5d ago), licensed MIT. It adds 50 tokens to every session and 289 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 88% identical to principle-test-behavior-not-implementation, differing in 2 lines, and is treated as a copy.
principle-test-behavior-not-implementation compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| principle-test-behavior-not-implementationminghinmatthewlam/agent-guards | Skill | 46 | 5d ago | MIT | A | 50 | Claude Code, Codex |
| rust-testingaffaan-m/ECC | Skill | 313k | 7d ago | MIT | A | 31 | Claude Code, Kiro |
| cpp-testingaffaan-m/ECC | Skill | 313k | 7d ago | MIT | A | 34 | Claude Code, Kiro |
| write-vibe-testsmistralai/mistral-vibe | Skill | 5.5k | 2d ago | Apache-2.0 | A | 80 | Claude Code, Codex |
| nw-fp-haskellnWave-ai/nWave | Skill | 636 | 11d ago | MIT | A | 22 | Claude Code |
| nw-fp-clojurenWave-ai/nWave | Skill | 636 | 11d ago | MIT | A | 25 | Claude Code |
| nw-fp-fsharpnWave-ai/nWave | Skill | 636 | 11d ago | MIT | A | 21 | Claude Code |