test-quality

A set of rules for writing or reviewing software tests. TDD, or test-driven development, is a method where tests help define expected behaviour before or during coding.

In plain words
What is it for?
Choosing focused test cases, checking edge and failure paths, naming tests by behaviour, and judging whether an existing test is worth keeping.
Why use it?
It reduces tests that pass without detecting real bugs, rely on implementation details, or miss important error cases.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/localplugins/plugins/test-quality
Any agent
npx skills add localplugins/plugins --skill test-quality
Clone the repo
git clone --depth 1 https://github.com/localplugins/plugins

Made for: Claude Code, Codex.

Per session 30 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 434 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00030 $0.00434
Opus 5 $0.00015 $0.00217
Sonnet 5 $0.00006 $0.00087
Haiku 4.5 $0.00003 $0.00043

Measured yesterday against content hash 9cdd17f32522, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

test-quality 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 yesterday.

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.

green-keeper/skills/test-quality/SKILL.md · 37 lines

What it actually says

Test Quality

A good test catches a real regression and reads as a spec of intended behavior. A test that can't fail when the code breaks is worse than no test — it gives false confidence.

Use when

  • Writing or updating a test (as test-writer).
  • Judging whether a test is worth keeping (as green-guardian).

Decision guide

  1. Assert behavior, not implementation. Check outputs and observable effects, so refactors don't break the test but bugs do.
  2. Critical path first, then real edge cases — empty/null inputs, boundaries, error paths, off-by-one. Skip edge cases that can't actually occur.
  3. Narrowest assertion that captures intent — exact values over "truthy".
  4. Deterministic — no reliance on time, network, ordering, or randomness without control.
  5. Named for the behaviorreturns_zero_for_empty_cart, not test1.
  6. One behavior per test — split so a failure localizes the bug.
  7. Match the project — its framework, file layout, and naming conventions. Put the test where its neighbors live.

Avoid

  • Tautologies (expect(x).toBe(x)) and mock-testing-mocks (asserting only that a mock was called, with no real output check).
  • Over-mocking that hides the behavior under test.
  • One giant test asserting ten things.
  • Snapshot tests as a substitute for meaningful assertions.

Every test you write should pass its revert-verification (see the anti-fake-green skill): fail on the pre-change code, pass on the change.

Deep reference

  • references/test-patterns.md — good-vs-bad test examples across ecosystems: behavioral vs. implementation assertions, edge-case selection, controlling nondeterminism, right-sized mocking, and one-behavior-per-test splits.
Files

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.

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. yesterday First seen · 37 lines · 30 tokens per session scan A 9cdd17f32522

Subscribe to this mod's changes

test-quality is a skill published in the GitHub repository localplugins/plugins (5 stars, last pushed 1mo ago), licensed MIT. It adds 30 tokens to every session and 434 once invoked, about $0.0002 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-31.

Related

Other skills, from other repositories

brainstorm-okrs

Brainstorm team-level OKRs aligned with company objectives — qualitative objectives with measurable key results. Use when setting quarterly OKRs, aligning team goals with company strategy, drafting objectives, or learning how to write effective OKRs.

phuryn/pm-skills · 49 tokens

pre-mortem

Run a pre-mortem risk analysis on a PRD or launch plan. Categorizes risks as Tigers (real problems), Paper Tigers (overblown concerns), and Elephants (unspoken worries), then classifies as launch-blocking, fast-follow, or track. Use when preparing for launch, stress-testing a product plan, or identifying what could go…

phuryn/pm-skills · 79 tokens

ab-test-analysis

Analyze A/B test results with statistical significance, sample size validation, confidence intervals, and ship/extend/stop recommendations. Use when evaluating experiment results, checking if a test reached significance, interpreting split test data, or deciding whether to ship a variant.

phuryn/pm-skills · 54 tokens

dummy-dataset

Generate realistic dummy datasets for testing with customizable columns, constraints, and output formats (CSV, JSON, SQL, Python script). Use when creating test data, building mock datasets, or generating sample data for development and demos.

phuryn/pm-skills · 48 tokens

release-notes

Generate user-facing release notes from tickets, PRDs, or changelogs. Creates clear, engaging summaries organized by category (new features, improvements, fixes). Use when writing release notes, creating changelogs, announcing product updates, or summarizing what shipped.

phuryn/pm-skills · 57 tokens

retro

Facilitate a structured sprint retrospective — what went well, what didn't, and prioritized action items with owners and deadlines. Use when running a retrospective, reflecting on a sprint, creating action items from team feedback, or learning how to run effective retros.

phuryn/pm-skills · 52 tokens