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.
npx agentmods add skills/doancan/mags/testing-strategynpx skills add doancan/mags --skill testing-strategygit clone --depth 1 https://github.com/doancan/magsWrote 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.
[](https://agentmods.dev/skills/doancan/mags/testing-strategy)<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>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.
| Model | Per session | Once 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 |
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.
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.
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.
- 3d ago First seen · 127 lines · 58 tokens per session scan A 6f5bdb989efe
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.
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.
prior-art-search
Systematic 7-step methodology for comprehensive patent prior art searches and patentability assessments using BigQuery and CPC classification.
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-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…
bigquery-patent-search
Fast, cloud-based patent searching across 100 million+ worldwide patents using Google BigQuery - keyword search, CPC classification, patent details retrieval.
development-assistant
Guides through adding new features, MCP tools, analyzers, and extending the patent creator system.