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 atuljha23/holocron --skill test-patternsgit clone --depth 1 https://github.com/atuljha23/holocronWrote 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/atuljha23/holocron/test-patterns)<a href="https://agentmods.dev/skills/atuljha23/holocron/test-patterns"><img src="https://agentmods.dev/badge/skills/atuljha23/holocron/test-patterns/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/atuljha23/holocron/test-patterns"><img src="https://agentmods.dev/badge/skills/atuljha23/holocron/test-patterns.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.00041 | $0.00680 |
| Opus 5.5 | $0.00016 | $0.00272 |
| Sonnet 5.5 | $0.00008 | $0.00136 |
| Haiku 4.5 | $0.00004 | $0.00068 |
Grade A, and why
test-patterns 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 1mo 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 — 88 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Test patterns
A test's job is to fail when the behavior is wrong. Most mediocre tests pass whether the code is right or not.
Rules of thumb
Assert behavior, not implementation
Bad:
expect(spy).toHaveBeenCalled()
Good:
expect(response.body.status).toBe('completed')
expect(db.getUser(id).lastSeenAt).toBe(mockNow)
Spy-assertions fail on refactor and protect nothing. Behavior-assertions fail when the user-visible contract breaks.
One logical check per test
Many expect lines can add up to one assertion of one outcome — that's fine. What's not fine: one test that covers three unrelated behaviors so nobody can tell what broke when it fails.
Arrange-Act-Assert
it('rejects stale tokens', () => {
// Arrange
const token = signToken({ exp: yesterday() })
// Act
const result = verify(token)
// Assert
expect(result.ok).toBe(false)
expect(result.reason).toBe('expired')
})
Table-driven when the shape repeats
test.each([
['empty', '', 'required'],
['too short', 'ab', 'min_length'],
['has space', 'a b', 'invalid_char'],
['ok', 'alice', null],
])('validateUsername(%s=%j)', (_, input, expected) => {
expect(validateUsername(input).error).toBe(expected)
})
Fixtures > inline setup
If three tests set up the same validUser, extract it. If the setup is 20 lines, it's probably doing too much — mock less, use a real test DB.
Name tests as specs
The test name is a sentence the reader can understand without opening the code. it('rejects stale tokens') > it('test2').
Integration > unit for risk hotspots
Unit tests are great for pure logic. For "this endpoint returns the right data for this user" you want an integration test that hits a real database, a real router, and a real serializer. Mocks hide the bugs you actually ship.
Framework-specific pointers
Testing Library (React/Vue/Svelte)
- Query by role/label first,
getByTestIdlast. userEventoverfireEvent.- Avoid testing props/state; test what the user sees.
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.
- 1mo ago First seen · 88 lines · 41 tokens per session scan A b05573f6d092
test-patterns is a skill published in the GitHub repository atuljha23/holocron (2 stars, last pushed 6mo ago), licensed MIT. It adds 41 tokens to every session and 680 once invoked, about $0.0002 per session on Opus 5.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-31.
Other skills, from other repositories
debugging-testing
Use when the user reports a bug they can't reproduce, asks where to start debugging, or mentions a Heisenbug / production-only failure. Drives the observe→hypothesize→predict→test→iterate scientific method.
systems-engineering
Systems engineering covering requirements management, the V-model lifecycle, integration planning, verification and validation (V&V), interface control, trade studies, and the NASA Systems Engineering Handbook. Spans the full lifecycle from concept through operations and disposal. Includes requirements decomposition…
test-generator
Generates test cases for functions and components. Use when writing tests or creating test suites.
verification-before-completion
Use when about to claim work is complete, fixed, or passing, or before committing or creating PRs.
developing-openrig
Use when changing OpenRig's own source in a clone of the openrig repository: finding which package or file owns a behaviour, choosing which tests to run, testing a change without disturbing the OpenRig daemon your own session runs on, judging whether a diff touches a high-risk area, or preparing a pull request. Not…
go-testing
Trigger: Go tests, go test coverage, Bubbletea teatest, golden files. Apply focused Go testing patterns.