testing-strategy

testing-strategy is a skill for Claude Code, Codex from halflength-ampleness75/claude-code-recipes. It costs 0 tokens per session (1,972 once invoked), scanned A, original, MIT.

A testing guide based on the testing pyramid: many fast unit tests, fewer integration tests, and a small number of end-to-end tests. Unit tests check one function or component, while end-to-end tests cover a complete user journey.

In plain words
What is it for?
Use it to plan test layers, structure tests, choose mocks, check business logic and edge cases, and cover critical user flows.
Why use it?
It helps teams choose tests that provide useful coverage without making the test suite unnecessarily slow or difficult to maintain.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

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/halflength-ampleness75/claude-code-recipes/testing-strategy
Any agent
npx skills add halflength-ampleness75/claude-code-recipes --skill testing-strategy
Clone the repo
git clone --depth 1 https://github.com/halflength-ampleness75/claude-code-recipes

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/halflength-ampleness75/claude-code-recipes/testing-strategy.svg)](https://agentmods.dev/skills/halflength-ampleness75/claude-code-recipes/testing-strategy)
Your own site
<a href="https://agentmods.dev/skills/halflength-ampleness75/claude-code-recipes/testing-strategy"><img src="https://agentmods.dev/badge/skills/halflength-ampleness75/claude-code-recipes/testing-strategy.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,972 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.00000 $0.01972
Opus 5 $0.00000 $0.00986
Sonnet 5 $0.00000 $0.00394
Haiku 4.5 $0.00000 $0.00197

Measured 5d ago against content hash f71b4db7452a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

testing-strategy 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 5d 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/testing-strategy/SKILL.md · 243 lines

How it starts

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

Testing Strategy

Testing approach: unit/integration/e2e split, what to test, test structure (AAA pattern), mocking strategies, and coverage targets.

Testing Pyramid

Follow the testing pyramid — more unit tests, fewer integration tests, even fewer e2e tests:

        /  E2E  \           ~5%   — Critical user journeys
       /----------\
      / Integration \       ~20%  — Module boundaries, API contracts
     /----------------\
    /    Unit Tests     \   ~75%  — Functions, components, utilities
   /____________________\
Level Speed Scope Quantity
Unit Fast (ms) Single function/component Many
Integration Medium (seconds) Module interactions, DB, API Some
E2E Slow (seconds-minutes) Full user flows Few

What to Test

Always Test

  • Business logic and calculations
  • Data transformations and mappings
  • Validation rules
  • Error handling paths
  • Edge cases: empty inputs, boundary values, null/undefined
  • Public API of modules (exported functions)
  • State transitions (reducers, state machines)
  • Critical user journeys (e2e)

Don't Test

  • Third-party library internals
  • Simple getters/setters with no logic
  • Framework boilerplate (constructor, lifecycle method existence)
  • Implementation details (private methods, internal state shape)
  • Constants and configuration values
  • CSS styling (use visual regression tools instead)

Test Structure — AAA Pattern

Every test should follow Arrange, Act, Assert:

describe("OrderService", () => {
  describe("calculateTotal", () => {
    it("applies percentage discount to subtotal", () => {
      // Arrange
      const items = [
        { name: "Widget", price: 25.00, quantity: 2 },
        { name: "Gadget", price: 15.00, quantity: 1 },
      ];
      const discount = { type: "percentage", value: 10 };

      // Act
      const total = calculateTotal(items, discount);

      // Assert
      expect(total).toBe(58.50); // (50 + 15) * 0.90
    });
  });
});

Read the full file on GitHub · 243 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. 5d ago First seen · 243 lines · 0 tokens per session scan A f71b4db7452a

Subscribe to this mod's changes

testing-strategy is a skill published in the GitHub repository halflength-ampleness75/claude-code-recipes (2 stars, last pushed today), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,972 tokens. 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