testing-strategy

testing-strategy is a skill for Claude Code, Codex from doancan/mags. It costs 58 tokens per session (2,131 once invoked), scanned A, original, MIT.

Testing guidance for planning a balanced set of checks for code, from individual functions to complete user workflows. It covers unit, integration, and end-to-end tests, plus test coverage and test-driven development (writing tests before code).

In plain words
What is it for?
Use it to plan test coverage, choose test types, define test patterns, and select tools for a particular technology stack.
Why use it?
It helps avoid slow, unreliable test suites and unclear decisions about what to test. It also gives teams a way to match testing effort to the importance of each part of the software.

Skill for Claude CodeCodex

Part of the mags plugin — 17 skills, 2 agents shipped together

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

Made for: Claude Code, Codex.

Or install mags, the plugin that ships this one along with the rest of its 17 skills, 2 agents.

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/doancan/mags/testing-strategy.svg)](https://agentmods.dev/skills/doancan/mags/testing-strategy)
Your own site
<a href="https://agentmods.dev/skills/doancan/mags/testing-strategy"><img src="https://agentmods.dev/badge/skills/doancan/mags/testing-strategy.svg" alt="Measured on agentmods" height="20"></a>
Per session 58 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,131 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.00058 $0.02131
Opus 5 $0.00029 $0.01066
Sonnet 5 $0.00012 $0.00426
Haiku 4.5 $0.00006 $0.00213

Measured 3d ago against content hash 6f5bdb989efe, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 3d 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 · 127 lines

How it starts

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

Testing Strategy

Test Pyramid

Follow the test pyramid distribution to balance speed, cost, and confidence:

  • Unit Tests (70%): Test individual functions, methods, and classes in isolation. These run in milliseconds, have no external dependencies, and form the foundation of the test suite. Every public function should have at least one unit test.
  • Integration Tests (20%): Test the interaction between two or more components, including database queries, API endpoints, and service-to-service communication. Use real dependencies where practical (e.g., test containers for databases) and mocks only for external third-party services.
  • End-to-End Tests (10%): Test complete user workflows through the full stack. Keep these focused on critical paths only: signup, login, core business transactions, and payment flows. E2E tests are slow and brittle; do not use them to cover edge cases that unit tests can handle.

Rationale: Inverting the pyramid (heavy E2E, light unit) leads to slow CI pipelines, flaky builds, and poor developer experience. If a test can be written at a lower level, write it there.

Coverage Targets

Set coverage targets based on module criticality, not a single global number:

  • Authentication and payment modules: 90%+ line coverage, 85%+ branch coverage. These modules handle security and money; gaps here create real risk.
  • Core business logic: 80%+ line coverage, 75%+ branch coverage. This includes domain models, validation rules, and business workflows.
  • API controllers and route handlers: 70%+ line coverage. Focus on testing request validation, authorization checks, and response formatting.
  • Utility functions and helpers: 60%+ line coverage. Simple utilities often have obvious behavior, but still test edge cases (empty input, null, boundary values).
  • Generated code, type definitions, and configuration: Exclude from coverage metrics. Do not inflate coverage numbers by testing boilerplate.

Enforce coverage in CI as a ratchet: coverage can go up but never down. Use --coverage-threshold flags or equivalent to fail the build if coverage drops below the current baseline.

Read the full file on GitHub · 127 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. 3d ago First seen · 127 lines · 58 tokens per session scan A 6f5bdb989efe

Subscribe to this mod's changes

testing-strategy is a skill published in the GitHub repository doancan/mags (3 stars, last pushed 6mo ago), licensed MIT. It adds 58 tokens to every session and 2,131 once invoked, about $0.0003 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

video-perception

Use when the user mentions a video file (.mp4, .mov, .avi, .mkv, .webm), a YouTube URL, asks to watch/analyze/review a video, or references video content in conversation.

jordanrendric/claude-video-vision · 51 tokens

prior-art-search

Systematic 7-step methodology for comprehensive patent prior art searches and patentability assessments using BigQuery and CPC classification.

RobThePCGuy/Claude-Patent-Creator · 26 tokens

portable-text-serialization

Render and serialize Portable Text to React, Svelte, Vue, Astro, HTML, Markdown, and plain text. Use when implementing Portable Text rendering in any frontend framework, building custom serializers for non-standard block types, converting Portable Text to HTML strings server-side, converting Portable Text to Markdown…

sanity-io/agent-toolkit · 85 tokens

sanity-best-practices

Sanity development best practices for schema design, GROQ queries, TypeGen, Visual Editing, images, Portable Text, Studio structure, localization, migrations, Sanity Functions, webhooks, Blueprints, and framework integrations such as Next.js, Nuxt, Astro, Remix, SvelteKit, Angular, Hydrogen, and the App SDK. Use this…

sanity-io/agent-toolkit · 164 tokens

bigquery-patent-search

Fast, cloud-based patent searching across 100 million+ worldwide patents using Google BigQuery - keyword search, CPC classification, patent details retrieval.

RobThePCGuy/Claude-Patent-Creator · 34 tokens

development-assistant

Guides through adding new features, MCP tools, analyzers, and extending the patent creator system.

RobThePCGuy/Claude-Patent-Creator · 24 tokens