testing-best-practices

testing-best-practices is a skill for Claude Code, Codex from adewale/skill-eval-harness. It costs 120 tokens per session (3,455 once invoked), scanned A, original, MIT.

A set of practices for writing and reviewing software tests, including test-driven development (writing a failing test before the code), property-based tests, integration checks, and end-to-end tests of user journeys.

In plain words
What is it for?
Use it to add tests, assess an existing test suite, strengthen weak tests, find skipped or fake-coverage tests, and fix gaps between mocks and real behavior.
Why use it?
It helps avoid tests that only increase coverage numbers while missing real failures, relying too heavily on mocks, or becoming flaky and misleading. It also guides you toward the smallest test that checks the relevant risk.

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/adewale/skill-eval-harness/testing-best-practices
Any agent
npx skills add adewale/skill-eval-harness --skill testing-best-practices
Clone the repo
git clone --depth 1 https://github.com/adewale/skill-eval-harness

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 testing-best-practices

README.md
[![agentmods](https://agentmods.dev/badge/skills/adewale/skill-eval-harness/testing-best-practices.svg)](https://agentmods.dev/skills/adewale/skill-eval-harness/testing-best-practices)
Your own site
<a href="https://agentmods.dev/skills/adewale/skill-eval-harness/testing-best-practices"><img src="https://agentmods.dev/badge/skills/adewale/skill-eval-harness/testing-best-practices.svg" alt="Measured on agentmods" height="20"></a>
Per session 120 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,455 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.1 $0.00120 $0.03455
Opus 5 $0.00060 $0.01728
Sonnet 5 $0.00024 $0.00691
Haiku 4.5 $0.00012 $0.00346

Measured today against content hash 260abdee2aac, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

testing-best-practices 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 today.

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.

tests/corpus/testing-best-practices.SKILL.md · 242 lines

How it starts

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

Testing Best Practices

This skill has four modes:

  1. Write — add tests or test-first bug fixes/features.
  2. Assess — review an existing suite for quality, not just coverage.
  3. Upgrade — strengthen weak/flaky/over-mocked tests.
  4. Detect — find skipped, sabotaged, fake-coverage, or gap-prone tests.

First 90 seconds

Before writing or changing tests:

  1. Detect language/framework from repo files and adjacent tests.
  2. Read nearby tests for naming, fixtures, builders, assertion style, and runner commands.
  3. Find the nearest validation command before broad full-suite commands.
  4. Identify the risk boundary: pure logic, internal component boundary, external API, UI/user journey, security boundary, or type/schema invariant.
  5. Classify the change and asset: behavior change vs. structure/tidying, reusable library vs. throwaway probe, customer-facing rule vs. internal helper.
  6. Choose the smallest useful test tier from references/test-types.md.
  7. Load only relevant references from the matrix below.

If the language is unsupported by a dedicated reference, follow project conventions plus the generic principles here.

Reference matrix

Always consider:

  • Test type selection → references/test-types.md
  • Anti-pattern detection → references/antipatterns.md

Language/framework references:

  • Python / pytest / Hypothesis → references/python.md
  • TypeScript/JavaScript / Vitest/Jest/fast-check/Playwright → references/typescript.md
  • Go → references/go.md
  • Rust → references/rust.md

Topical references by trigger:

  • Legacy/refactor safety → references/characterization-testing.md
  • Reimplementation, port, multi-language SDK, custom data structure with no reference, or approximate/probabilistic/ANN/ranking output → references/differential-testing.md
  • Complex outputs, snapshots, transformation pipelines, save/load or migration roundtrips → references/golden-file-testing.md
  • Time, timers, schedules, sleeps, flaky time tests, background threads/async work tests can only reach by sleeping → references/deterministic-time.md
  • External APIs, recorded real responses, mock drift → references/vcr-cassettes.md
  • CLI/plugin/docs registry sync → references/doc-sync-testing.md
  • High coverage but escaping bugs → references/mutation-testing.md
  • Small finite state spaces → references/exhaustive-testing.md
  • Arithmetic/domain operators/laws → references/mathematical-properties.md
  • Fixtures/builders/assertion helpers → references/test-data-builders.md
  • Same invariant checked across layers, type-vs-test decisions, invalid states → references/correctness-by-construction.md

Read the full file on GitHub · 242 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. today First seen · 242 lines · 120 tokens per session scan A 260abdee2aac

Subscribe to this mod's changes

testing-best-practices is a skill published in the GitHub repository adewale/skill-eval-harness (73 stars, last pushed 5d ago), licensed MIT. It adds 120 tokens to every session and 3,455 once invoked, about $0.0006 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-05.