testing-strategy

testing-strategy is a skill for Claude Code, Codex from axiomantic/spellbook. It costs 66 tokens per session (778 once invoked), scanned A, original, MIT.

Guidance for choosing which automated tests to run after a code change.

In plain words
What is it for?
It helps select unit, integration, or end-to-end tests and decide when to run direct tests, dependent tests, or the full suite.
Why use it?
It keeps test runs matched to the size and type of the change, while still checking shared dependencies and broader regressions when needed.

Skill for Claude CodeCodex

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

Good fit It helps select unit, integration, or end-to-end tests and decide when to run direct tests, dependent tests, or the full suite.

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

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/axiomantic/spellbook/testing-strategy/github.svg)](https://agentmods.dev/skills/axiomantic/spellbook/testing-strategy)
Your own site
<a href="https://agentmods.dev/skills/axiomantic/spellbook/testing-strategy"><img src="https://agentmods.dev/badge/skills/axiomantic/spellbook/testing-strategy/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 testing-strategy

Your own site · 80×15
<a href="https://agentmods.dev/skills/axiomantic/spellbook/testing-strategy"><img src="https://agentmods.dev/badge/skills/axiomantic/spellbook/testing-strategy.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 66 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 778 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.00066 $0.00778
Opus 5.5 $0.00026 $0.00311
Sonnet 5.5 $0.00013 $0.00156
Haiku 4.5 $0.00007 $0.00078

Measured 1mo ago against content hash 60fb7fb18009, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 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/testing-strategy/SKILL.md · 63 lines

How it starts

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

Testing Strategy

Invariant Principles

  1. Scope Matches Change - Test selection mirrors the scope of the code change; a single-file change does not justify a full suite run.
  2. Marks Are Proactive - Tests are marked (slow, gpu, network) at authoring time based on what they require, not how fast they happen to run today.
  3. Full Suite Runs Once - The complete test suite runs once per work unit completion, not after every incremental change.

Test Tiers

Tier Time What When
Unit <1s each Pure logic, no I/O, no external deps After every change
Integration 1-5s each Real resources (DB, filesystem, network) After completing a logical unit of work
E2E / Slow >5s each Full pipelines, large data, real services Once per feature branch, before PR

Selecting What to Run

  • Single file changed: Run only the test file(s) that directly test that module. src/auth/login.py changed? Run tests/test_login.py.
  • Shared dependency changed (types, config, utilities): Grep for imports of the changed module across test files. Run all direct consumers.
  • Multi-file task complete: Run unit tests for all changed files in one command.
  • All tasks in a work unit complete: Run the full suite once.
  • If >5 test files affected: Run the full fast tier rather than listing individually.

Batching: Write code for task 1, run targeted tests, write code for task 2, run targeted tests, run full suite once at end.

Writing Tests for Speed

Mock expensive resources in unit tests. Use smallest possible inputs. Never sleep in tests. One assertion focus per test. No fixtures heavier than the test itself.

Read the full file on GitHub · 63 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. 1mo ago First seen · 63 lines · 66 tokens per session scan A 60fb7fb18009

Subscribe to this mod's changes

testing-strategy is a skill published in the GitHub repository axiomantic/spellbook (10 stars, last pushed 3d ago), licensed MIT. It adds 66 tokens to every session and 778 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-09-03.

Related

Other skills, from other repositories

e2e-testing

Guide for running end-to-end tests of the Qwen Code CLI, including headless mode, MCP server testing, and API traffic inspection. Use this skill whenever you need to verify CLI behavior with real model calls, reproduce user-reported bugs end-to-end, test MCP tool integrations, or inspect raw API request/response…

QwenLM/qwen-code · 94 tokens

terminal-capture

Automates terminal UI screenshot testing for CLI commands. Applies when reviewing PRs that affect CLI output, testing slash commands (/about, /context, /auth, /export), generating visual documentation, or when 'terminal screenshot', 'CLI test', 'visual test', or 'terminal-capture' is mentioned.

QwenLM/qwen-code · 66 tokens

tmux-real-user-testing

A real-user test workflow for Qwen Code's terminal interface, using tmux to drive the program and capture readable screen snapshots. tmux is a tool for running and observing terminal sessions.

QwenLM/qwen-code · 98 tokens

agent-reproduce-align

Use after a Codex or Claude Code feature has been implemented in Qwen Code to run the selected reference agent and Qwen Code under the same scenario, capture HTTP and terminal traces, compare request bodies, tool/function schemas, outputs, and iterate until the reproduced behavior is close enough.

QwenLM/qwen-code · 62 tokens

memstack-development-test-writer

Use this skill when the user says 'write tests', 'add tests', 'test coverage', 'unit tests', 'integration tests', 'component tests', 'mocking', 'edge cases', or needs to generate tests with proper mocking and edge case coverage. Do NOT use for refactoring plans or database migrations.

cwinvestments/memstack · 70 tokens

use-internals-di-seam-pattern-for-test-injectable-functions

When delegating a task affected by this skill, include.

ZaxbyHub/opencode-swarm · 27 tokens