/red-tests
Use after DR and before any production code is written. Writes failing tests that encode the AC and DR visual assertions, then proves they fail by running them. RED phase of TDD — strict, no exceptions.
$ npx -y skills add Harshvardhan86/claude-wave-plugin --skill red-tests --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/red-tests
Context preview
The summary Claude sees to decide when to auto-load this skill.
Use after DR and before any production code is written. Writes failing tests that encode the AC and DR visual assertions, then proves they fail by running them. RED phase of TDD — strict, no exceptions.
SKILL.md
red-tests.SKILL.mdname: red-tests
description: Use after DR and before any production code is written. Writes failing tests that encode the AC and DR visual assertions, then proves they fail by running them. RED phase of TDD — strict, no exceptions.
RED Tests
You write **tests first, watch them fail, then hand off**. No production code. No exceptions. The point of RED is to prove the test will catch the failure before any implementation rationalises around it.
Why this skill exists
When implementation and tests are written together, the agent silently shapes the test to match what was easy to build. The feature ends with passing tests and broken behaviour. RED breaks that loop: you commit to the failure mode *before* knowing the implementation.
Inputs
- `.wave/ac.md`
- `.wave/dr.md` (especially the visual ACs section)
Procedure
1. Map ACs to tests
For each AC, write at least one test. For visual ACs from DR, the test must use:
- **`getComputedStyle()`** for color, font, spacing, border, transform values
- **`boundingBox()`** for size and position assertions
- **Real browser** (Playwright preferred) — not jsdom, not happy-dom — for any visual claim
- **Effective CSS bytes** comparison if the AC includes "the page is styled"
2. Banned assertion patterns (when used alone)
These pass on broken UIs and are forbidden as the *only* assertion in a visual test:
- `toBeVisible()` — passes on 0×0 elements
- `customElements.get(X) !== undefined` — registration ≠ rendering
- `not.toBeEmpty()` — passes with whitespace
- `getAttribute('data-theme') === 'dark'` — attribute set ≠ visible dark UI
- `toHaveCount(n)` on children without asserting their styles
Each must be paired with a computed-style or bounding-box check.
3. Write the tests
Place tests where the project conventions dictate (`tests/`, `e2e/`, `__tests__/`, `*.spec.ts`). If there is no test infra, set it up minimally — Playwright + a single config — and document the choice in `.wave/red.md`.
For non-UI ACs (API responses, persistence), use the project's existing test runner. Same rule: assertion must encode the AC, not the implementation.
4. Prove they fail
Run the test suite. The new tests **must fail**. Capture the failure output.
If a new test passes accidentally:
- The implementation already exists somewhere (great — strengthen the test until it fails meaningfully)
- Or the test is asserting a tautology (rewrite — your test is broken)
5. Document the RED state
Write `.wave/red.md` with:
- List of new test files
- For each test: AC reference, assertion type, **terminal output of the failure** (paste it)
- Test runner command for GREEN to use later
6. Hand off
Return to orchestrator with:
- Path to `.wave/red.md`
- Count of new tests
- Confirmation: "RED verified — N tests failing as expected."
If any new test passes at this stage, you do not hand off until you understand why and either delete the test or rewrite it.
Anti-patterns
- Writing tests that assert what the code *does* (tautology) instead of what the AC *demands*
- Using mocks at the boundary the AC cares about. If the AC is about a real DB write, the test hits a real DB.
- Skipping RED because "I can see the code passes". You can't. Run the tests.
- Treating type errors or compile errors as "the test failed". Tests fail when they execute and the assertion is rejected — not when the runner can't start.
- Asserting on framework internals that may change (e.g. specific React reconciler messages).
Read more
name: red-tests description: Use after DR and before any production code is written. Writes failing tests that encode the AC and DR visual assertions, then proves they fail by running them. RED phase of TDD — strict, no exceptions.
RED Tests
You write **tests first, watch them fail, then hand off**. No production code. No exceptions. The point of RED is to prove the test will catch the failure before any implementation rationalises around it.
Why this skill exists
When implementation and tests are written together, the agent silently shapes the test to match what was easy to build. The feature ends with passing tests and broken behaviour. RED breaks that loop: you commit to the failure mode *before* knowing the implementation.
Inputs
- `.wave/ac.md`
- `.wave/dr.md` (especially the visual ACs section)
Procedure
1. Map ACs to tests
For each AC, write at least one test. For visual ACs from DR, the test must use:
- **`getComputedStyle()`** for color, font, spacing, border, transform values
- **`boundingBox()`** for size and position assertions
- **Real browser** (Playwright preferred) — not jsdom, not happy-dom — for any visual claim
- **Effective CSS bytes** comparison if the AC includes "the page is styled"
2. Banned assertion patterns (when used alone)
These pass on broken UIs and are forbidden as the *only* assertion in a visual test:
- `toBeVisible()` — passes on 0×0 elements
- `customElements.get(X) !== undefined` — registration ≠ rendering
- `not.toBeEmpty()` — passes with whitespace
- `getAttribute('data-theme') === 'dark'` — attribute set ≠ visible dark UI
- `toHaveCount(n)` on children without asserting their styles
Each must be paired with a computed-style or bounding-box check.
3. Write the tests
Place tests where the project conventions dictate (`tests/`, `e2e/`, `__tests__/`, `*.spec.ts`). If there is no test infra, set it up minimally — Playwright + a single config — and document the choice in `.wave/red.md`.
For non-UI ACs (API responses, persistence), use the project's existing test runner. Same rule: assertion must encode the AC, not the implementation.
4. Prove they fail
Run the test suite. The new tests **must fail**. Capture the failure output.
If a new test passes accidentally:
- The implementation already exists somewhere (great — strengthen the test until it fails meaningfully)
- Or the test is asserting a tautology (rewrite — your test is broken)
5. Document the RED state
Write `.wave/red.md` with:
- List of new test files
- For each test: AC reference, assertion type, **terminal output of the failure** (paste it)
- Test runner command for GREEN to use later
6. Hand off
Return to orchestrator with:
- Path to `.wave/red.md`
- Count of new tests
- Confirmation: "RED verified — N tests failing as expected."
If any new test passes at this stage, you do not hand off until you understand why and either delete the test or rewrite it.
Anti-patterns
- Writing tests that assert what the code *does* (tautology) instead of what the AC *demands*
- Using mocks at the boundary the AC cares about. If the AC is about a real DB write, the test hits a real DB.
- Skipping RED because "I can see the code passes". You can't. Run the tests.
- Treating type errors or compile errors as "the test failed". Tests fail when they execute and the assertion is rejected — not when the runner can't start.
- Asserting on framework internals that may change (e.g. specific React reconciler messages).
Run Claude Code like an engineering org. Wave-based execution with dedicated sub-agents per phase, computed-style visual verification, no "tsc passes" lies.
Other skills on claude-wave-plugin.
- /ac-writer
Use as the first phase of a wave. Drafts brutal, testable acceptance criteria for a feature. Each AC must be falsifiable by a real-world test. Output written to .wave/ac.md.
Open skill - /design-reviewer
Use after AC and before RED for any wave that ships UI. Performs component API audit against installed dist files, produces per-route mockup, defines visual ACs, flags design-system gaps. Output written to .wave/dr.md.
Open skill - /green-impl
Use after RED is verified failing. Writes the minimum code to make RED tests pass, then verifies on a live stack with Playwright screenshots before any hand-off. Implements the verify-before-scan rule.
Open skill - /teet-verify
Use only after the user has approved the GREEN screenshot. Performs True End-to-End Testing across backend, frontend, DB, and external services with computed-style and boundingBox assertions, producing the final wave evidence pack.
Open skill - /wave-orchestrator
Use when shipping a feature end-to-end. Routes between the canonical v2 framework (17 phases + conditional [DR] for UI + optional [CR] gate, max 19 phases) and the trimmed 5-phase demo subset. Invoked by /wave-start and /wave-start --demo. The orchestrator is the single throat
Open skill

