better-testing

better-testing is a skill for Claude Code, Codex from NicolasYusim/better-codebase. It costs 78 tokens per session (1,191 once invoked), scanned A, original, MIT.

A review guide for making software tests protect important behaviour reliably.

In plain words
What is it for?
Assessing and improving unit, integration, contract, and end-to-end tests, including their assertions, fixtures, boundaries, and failure diagnostics.
Why use it?
It helps find missing coverage, weak checks, flaky tests, excessive mocking, and tests that are slow or tied too closely to implementation details.

Skill for Claude CodeCodex

Written for Claude Code and Codex: shipped in a Claude Code plugin, but also agents/openai.yaml present.

Part of the better-codebase plugin — 8 skills shipped together

Good fit Assessing and improving unit, integration, contract, and end-to-end tests, including their assertions, fixtures, boundaries, and failure diagnostics.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/nicolasyusim/better-codebase/better-testing
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 NicolasYusim/better-codebase --skill better-testing
Clone the repo
git clone --depth 1 https://github.com/NicolasYusim/better-codebase

Made for: Claude Code, Codex.

Or install better-codebase, the plugin that ships this one along with the rest of its 8 skills.

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 better-testing

README.md
[![agentmods](https://agentmods.dev/badge/skills/nicolasyusim/better-codebase/better-testing/github.svg)](https://agentmods.dev/skills/nicolasyusim/better-codebase/better-testing)
Your own site
<a href="https://agentmods.dev/skills/nicolasyusim/better-codebase/better-testing"><img src="https://agentmods.dev/badge/skills/nicolasyusim/better-codebase/better-testing/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 better-testing

Your own site · 80×15
<a href="https://agentmods.dev/skills/nicolasyusim/better-codebase/better-testing"><img src="https://agentmods.dev/badge/skills/nicolasyusim/better-codebase/better-testing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 78 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,191 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.00078 $0.01191
Opus 5.5 $0.00031 $0.00476
Sonnet 5.5 $0.00016 $0.00238
Haiku 4.5 $0.00008 $0.00119

Measured 1mo ago against content hash 3dcd1a4658e0, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

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

skills/better-testing/SKILL.md · 129 lines

How it starts

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

Protect critical behavior with trustworthy tests

Build confidence that meaningful changes are safe. Optimize for defect detection, behavioral contracts, useful failures, and maintainable feedback—not test count or coverage theater.

Own behavioral protection

Own test strategy, test selection, assertions, fixtures, doubles, suite boundaries, determinism, failure diagnostics, and testability signals.

Treat difficult testing as evidence that may point to an architecture or maintainability problem. Assign the root cause to the appropriate owner rather than prescribing test-only workarounds.

Review workflow

1. Map critical behavior

Identify public contracts, business rules, state transitions, data boundaries, permissions, error behavior, integration points, concurrency or transaction semantics, and high-cost failure paths.

Map each critical behavior to the narrowest trustworthy test layer:

  • unit tests for deterministic policy and transformations;
  • integration tests for storage, frameworks, queues, files, and service adapters;
  • contract tests for consumer/provider or protocol compatibility;
  • end-to-end tests for a small set of indispensable user or system paths;
  • characterization tests for behavior that must be preserved during refactoring.

Do not infer importance from existing test density. Untested code may be critical; heavily tested helpers may not be.

2. Inspect the suite as evidence

Run the narrowest safe test commands available. Inspect failures, duration, retries, skips, quarantine, and environment requirements.

Investigate:

  • critical behavior with no executable protection;
  • only happy-path coverage where failure modes have meaningful consequences;
  • assertions that prove a call happened but not the resulting behavior;
  • tests coupled to private methods, call order, internal data structures, or incidental rendering;
  • mocks that recreate the implementation and allow integrations to drift;
  • snapshots so broad that reviewers cannot see semantic changes;
  • non-deterministic time, randomness, shared state, ports, ordering, or external services;
  • tests that pass individually but fail in suites or depend on execution order;
  • slow setup repeated unnecessarily or end-to-end tests used for cheap policy checks;
  • vague names and failures that do not identify the broken contract;
  • duplicated fixtures that encode inconsistent domain rules;
  • skipped tests with no owner or removal condition.

Read the full file on GitHub · 129 lines

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. 1mo ago First seen · 129 lines · 78 tokens per session scan A 3dcd1a4658e0

Subscribe to this mod's changes

better-testing is a skill published in the GitHub repository NicolasYusim/better-codebase (1 stars, last pushed 2mo ago), licensed MIT. It adds 78 tokens to every session and 1,191 once invoked, about $0.0003 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.

Related

Other skills, from other repositories