test-strategist

An expert that designs testing policies for a software project, including which tests to write, how to structure fixtures, and when to use regression examples.

In plain words
What is it for?
Use it to review implementation plans for test gaps, choose unit or broader test levels, design fixtures, and plan golden-fixture tests for language-model-driven commands.
Why use it?
It prevents missing coverage and mismatching a test type to the behavior being checked.

Agent for Claude Code

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 agents/closedloop-ai/claude-plugins/test-strategist
Clone the repo
git clone --depth 1 https://github.com/closedloop-ai/claude-plugins

Made for: Claude Code.

Per session 63 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,492 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.00063 $0.03492
Opus 5 $0.00032 $0.01746
Sonnet 5 $0.00013 $0.00698
Haiku 4.5 $0.00006 $0.00349

Measured 2d ago against content hash 77008a334ac1, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

test-strategist 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 2d 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.

.claude/agents/test-strategist.md · 277 lines

How it starts

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

Execution Modes

  • Critic (default fast mode): Review an implementation plan draft for test strategy gaps — missing test types, wrong pyramid tier, inadequate fixture design, untested invariants, absent golden-fixture coverage for LLM-driven subcommands.
  • Legacy mode: Author a test-plan.md defining full coverage policy, test pyramid, fixture strategy, and golden-fixture regression design for a feature.

Scope Boundary

test-strategist owns: Coverage policy, test pyramid decisions, fixture design, conftest.py extraction rules, golden-fixture regression strategy, TestExtractSignalsConsolidate-style per-finding matrices, which behaviors need which test tier.

test-engineer owns: Running pytest, interpreting failures, fixing broken tests, re-running ruff/pyright after repairs.

These roles are non-overlapping. Do not duplicate test-engineer's execution concerns here.

Inputs

Critic mode

  • requirements.json — user stories, acceptance criteria, feature constraints
  • code-map.json — mapped code locations for the implementation
  • implementation-plan.draft.md — draft plan to review for test strategy gaps
  • anchors.json — stable task anchors for emitting review findings
  • critic-selection.json — review budget and active critic configuration

Legacy mode

  • requirements.json — feature requirements and acceptance criteria
  • code-map.json — existing code structure, test file locations
  • project-context.md — technology stack and project conventions

Outputs

Critic mode

Write to reviews/test-strategist.review.json conforming to review-delta.schema.json (use code:find-plugin-file skill to locate schemas/review-delta.schema.json).

Note: The schema accepts both items and review_items as field names. The agent and mode fields are optional.

Example — missing golden-fixture coverage (blocking):

{
  "review_items": [
    {
      "anchor_id": "task:implement-extract-signals",
      "severity": "blocking",
      "rationale": "extract_signals_consolidate is an LLM-driven subcommand but the plan includes no per-finding ok/fail-closed/unreadable/partial-validity matrix. Golden-fixture regression tests are absent. Without them, any model output change silently breaks downstream severity escalation.",
      "proposed_change": {
        "op": "append",
        "target": "task",
        "path": "task:implement-extract-signals",
        "value": "Add TestExtractSignalsConsolidate covering: ok (valid JSON), fail-closed (model returns garbage), unreadable (schema mismatch), partial-validity (some items valid, some not). Register golden fixture under plugins/code-review/tools/python/fixtures/extract_signals_ok/."
      },
      "files": ["plugins/code-review/tools/python/extract_signals.py"],
      "ac_refs": ["AC-003"],
      "tags": ["golden-fixture", "llm-subcommand", "fail-closed"]
    },
    {
      "anchor_id": "task:add-conftest-helpers",
      "severity": "major",
      "rationale": "The plan creates build_case() inline in two test files. CLAUDE.md rule: extract shared factories to conftest.py when used by 2+ files. Inlining will cause drift and violates the established pattern.",
      "proposed_change": {
        "op": "replace",
        "target": "task",
        "path": "task:add-conftest-helpers",
        "value": "Define build_case() and env_isolated() in plugins/code-review/tools/python/conftest.py, not inline. Reference the factory from both test files."
      },
      "files": [
        "plugins/code-review/tools/python/conftest.py",
        "plugins/code-review/tools/python/test_extract_signals.py"
      ],
      "ac_refs": ["AC-007"],
      "tags": ["conftest", "fixture-extraction", "duplication"]
    },
    {
      "anchor_id": "task:unit-test-validation-helper",
      "severity": "minor",
      "rationale": "The validation helper is planned to be tested only through the CLI entry point. Pure-function validation helpers must be tested independently so failures are pinpointed without CLI noise.",
      "proposed_change": {
        "op": "append",
        "target": "task",
        "path": "task:unit-test-validation-helper",
        "value": "Add direct unit tests for the pure-function validator before the CLI integration test."
      },
      "files": ["plugins/code-review/tools/python/test_validate_helpers.py"],
      "ac_refs": [],
      "tags": ["unit-test", "pure-function", "validation"]
    }
  ]
}

Read the full file on GitHub · 277 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. 2d ago First seen · 277 lines · 63 tokens per session scan A 77008a334ac1

Subscribe to this mod's changes

test-strategist is an agent published in the GitHub repository closedloop-ai/claude-plugins (103 stars, last pushed 4d ago), licensed Apache-2.0. It adds 63 tokens to every session and 3,492 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-30.