Test Patterns

Test Patterns is a skill for Claude Code, Codex from niels-emmer/myace. It costs 28 tokens per session (633 once invoked), scanned A, original, MIT.

A checklist for writing tests that cover normal behavior, edge cases, and failures. It treats a passing happy-path test as only one part of reliable coverage.

In plain words
What is it for?
Use it when adding tests for new behavior, bug fixes, or refactors with conditional logic.
Why use it?
It helps expose bugs caused by invalid input, empty data, limits, concurrent access, and partial failures.

Skill for Claude CodeCodex

Which agent this was written for is unclear — built for aider. Also seen: mentions Codex; built for aider; mentions OpenCode.

Good fit Use it when adding tests for new behavior, bug fixes, or refactors with conditional logic.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/niels-emmer/myace/test-patterns
Install

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.

Any agent
npx skills add niels-emmer/myace --skill test-patterns
Clone the repo
git clone --depth 1 https://github.com/niels-emmer/myace

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for Test Patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/niels-emmer/myace/test-patterns/github.svg)](https://agentmods.dev/skills/niels-emmer/myace/test-patterns)
Your own site
<a href="https://agentmods.dev/skills/niels-emmer/myace/test-patterns"><img src="https://agentmods.dev/badge/skills/niels-emmer/myace/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.

agentmods 80×15 button for Test Patterns

Your own site · 80×15
<a href="https://agentmods.dev/skills/niels-emmer/myace/test-patterns"><img src="https://agentmods.dev/badge/skills/niels-emmer/myace/test-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 28 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 633 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00028 $0.00633
Opus 5 $0.00014 $0.00316
Sonnet 5 $0.00006 $0.00127
Haiku 4.5 $0.00003 $0.00063

Measured 8d ago against content hash 8989cd036ceb, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

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 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.

collections/base/software-engineer/skills/test-patterns/SKILL.md · 30 lines

How it starts

The opening of the file, as written. The whole thing — 30 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Purpose

A test suite that only exercises the happy path proves the code works when everything goes right, which is the case least likely to break in production. The failure modes — bad input, empty state, concurrent access, partial success — are where real bugs live and where a thin test suite gives false confidence. This skill is a checklist for deliberately covering that space instead of stopping at the first green run.

When to use it

Any time you write or extend tests for a nontrivial change — new functionality, a bug fix, or a refactor of logic that has any conditional branching. Run through the checklist below as a deliberate step, not an afterthought after the happy-path test already passes.

Checklist

  • Happy path — the code does the intended thing with valid, typical input. Necessary but not sufficient; don't stop here.
  • Boundary values — empty string/list/collection, zero, negative numbers where they're conceptually possible, the first and last valid index, one-past-the-boundary values that should be rejected.
  • Null/missing/malformed inputNone/null/undefined where a value is expected, a required field missing from a payload, a type that doesn't match what's expected, malformed JSON or encoding.
  • Failure and partial-failure modes — what happens when a dependency (network call, database, filesystem) fails outright, times out, or returns a partial/unexpected result. A test that only mocks the success response isn't testing the failure path at all.
  • Concurrency and ordering, where relevant — two callers hitting the same code path at once, operations that assume an order that isn't actually guaranteed, idempotency (does calling this twice with the same input cause a problem it shouldn't).
  • Regression coverage for bug fixes — a fix without a test that fails on the old code and passes on the new one isn't confirmed to have actually fixed anything; it's confirmed to compile.
  • Authorization boundaries, where applicable — does a test confirm that a user without permission is actually denied, not just that a user with permission is allowed. A missing negative-authorization test is a common way authz bugs slip through.

Read the full file on GitHub · 30 lines

Changes

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.

  1. 8d ago First seen · 30 lines · 28 tokens per session scan A 8989cd036ceb

Subscribe to this mod's changes

Test Patterns is a skill published in the GitHub repository niels-emmer/myace (1 stars, last pushed 5d ago), licensed MIT. It adds 28 tokens to every session and 633 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-09-03.