/praxis:testing-strategyfrom praxis
Mandatory test design protocol invoked before writing tests. Guides classification of test types (pure logic, I/O, integration, regression), ranking failure modes by damage, writing regression tests first, and auditing flakiness.
Ships in praxis. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
EXTREMELY_IMPORTANT: This is a MANDATORY protocol, not a suggestion. Follow every step. Do not skip steps. Do not combine steps. Do not summarize. Work through each gate in order.
You are deciding WHAT to test and HOW — before writing tests. Do NOT open a test file yet. Tests written without a strategy verify what the code does, not what it must do.
For each unit of work, classify it as exactly ONE of these. The test type follows:
| Subject | Signature | Right test type |
|---|---|---|
| PURE-LOGIC | Deterministic input→output, no side effects | Unit tests, edge-case tables |
| I/O-BOUNDARY | Talks to disk, network, DB, clock, env | Contract test + fake/double at the seam |
| INTEGRATION | Multiple components must agree | Few end-to-end paths through real wiring |
| REGRESSION | A specific past bug must never return | One test that reproduces that exact bug |
State the classification explicitly. If a unit mixes types (logic tangled with I/O), that is a design finding — flag it; the seam may need extracting before it is testable.
List the ways this code can fail that would actually hurt: data loss, wrong money math, silent corruption, security bypass, crash on common input. Rank by damage × likelihood.
Write tests top-down from this list. Coverage percentage is NOT a goal — a suite that covers 60% including every ranked failure mode beats 95% of asserting getters. If you catch yourself adding a test only to move a coverage number, delete it and return here.
If this work fixes a bug, this step is not optional:
The fail-then-pass sequence must be observed, not assumed. A fix without this test is a fix that can silently regress.
Before accepting any new test as good, check it against each flakiness source:
A flaky test is worse than no test: it trains humans to ignore red. Fix or delete.
Silence is not a coverage report. List explicitly what these tests do NOT protect: untested paths, unhandled input classes, environments not exercised, concurrency behavior, scale behavior. The user decides if those gaps are acceptable — not you, and not by omission.
TEST STRATEGY: [scope]
├── Classification: [PURE-LOGIC / I/O-BOUNDARY / INTEGRATION / REGRESSION per unit]
├── Top failure modes covered: [ranked list → test that covers each]
├── Regression test: [fails-on-old-code verified? yes/no/N-A]
├── Flakiness audit: [sources checked, findings]
├── NOT covered: [explicit gaps]
└── Confidence: [HIGH / MEDIUM / LOW]
Confidence: HIGH = every top-ranked failure mode has a test and the fail/pass sequence was observed. MEDIUM = strategy sound but some tests unverified against failure. LOW = significant untestable seams remain — name the refactor that would raise it.
Do NOT call a bug "fixed" until a test exists that FAILS on the pre-fix code and PASSES on the fixed code — sequence observed, not inferred. Do NOT present a test suite as done without STEP 5's explicit not-covered list.Red flags that this skill catches:
After the strategy is complete (classification, ranked failure modes, gaps stated):
If Superpowers is installed → invoke Skill(superpowers:test-driven-development) to
write the tests and implementation. Pass the classification table, ranked failure modes,
and the regression-test requirement. PRAXIS decides what to test. Superpowers writes it.
If Superpowers is NOT installed → write the tests yourself in failure-mode rank order, regression test first when fixing a bug.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub xd4o/praxis --plugin praxis19 skills in this plugin
/architecture-reasoningMANDATORY architecture analysis. You MUST invoke this skill before making module boundary decisions, build-vs-buy choices, technology selections, data model designs, API contracts, or any structural decision that is expensive to reverse. Do NOT propose architecture without running reversibility classification, boundary analysis, and bottleneck identification. Invoke BEFORE writing implementation plans for non-trivial systems.
/codebase-comprehensionMANDATORY comprehension protocol. You MUST invoke this skill before changing code you did not write or do not already understand — modifying, fixing, extending, or refactoring an existing file, function, or module whose behavior you have not traced. Do NOT edit from pattern-matching. Do NOT claim "nothing else is affected" without checking. Invoke BEFORE proposing the edit. Does NOT apply to greenfield code you are writing from scratch, or to diagnosing a runtime failure (use diagnostic-reasoning).
/code-quality-analysisMANDATORY code review protocol. You MUST invoke this skill when writing significant code (not one-liners), reviewing PRs or diffs, refactoring modules, or when code quality is requested. Runs 15 structural checks across readability, structure, safety, purity, and design. Complements TDD — tests verify behavior, this verifies design quality. Do NOT ship code with 3+ safety failures without remediation.
/decision-analysisMANDATORY trade-off evaluation. You MUST invoke this skill when the user faces a choice between alternatives — build-vs-buy, rewrite-vs-patch, technology selection, resource allocation, priority decisions. Do NOT default to the first reasonable option. Do NOT skip evaluating "do nothing" as a valid alternative. Invoke this to run weighted criteria analysis with second-order consequences before recommending.
/diagnostic-reasoningMANDATORY debugging protocol. You MUST invoke this skill when debugging complex issues, investigating failures, diagnosing intermittent problems, or performing root cause analysis. Do NOT start changing code before collecting observations. Do NOT guess at causes — generate 5 competing hypotheses and design a discriminating test. Invoke this BEFORE touching any code when something is broken.
/domain-modelingMANDATORY modeling protocol. You MUST invoke this skill when designing a data model, domain model, database schema, or the core entities and relationships of a system — "design the schema", "model this domain", "what tables/entities do we need". Do NOT jump to tables or classes before the invariants are named. Do NOT leave illegal states representable. Invoke BEFORE writing migrations, ORM models, or type definitions for the domain. Does NOT apply to choosing a database engine (use architecture-reasoning).
Other plugins' skills for the same job