From frontend-skills
Test-driven development with red-green-refactor loop, including planning via coverage gaps, tracer bullets, async leak detection, deep module design, and condition-based waiting. Activates on test files.
How this skill is triggered — by the user, by Claude, or both
Slash command
/frontend-skills:tdd**/*.test.{ts,tsx}**/*.spec.{ts,tsx}**/*.integration.{ts,tsx}**/*.unit.{ts,tsx}The summary Claude sees in its skill listing — used to decide when to auto-load this skill
**No prod code without failing test first.** No exceptions.
No prod code without failing test first. No exceptions.
DO NOT write all tests first, then all impl. Bulk tests test imagined behavior, not actual.
Correct: Vertical slices -- one test -> one impl -> repeat.
WRONG: RED: test1,test2,test3 -> GREEN: impl1,impl2,impl3
RIGHT: RED->GREEN: test1->impl1 -> RED->GREEN: test2->impl2
Full state diagram: REFERENCE.md#state-machine.
vitest run --coverage.enabled --coverage.reporter=textMonitor: vitest --watch -- stream pass/fail as edit. Edit->fail->fix->pass->refactor->repeat.
RED->GREEN->REFACTOR per behavior. One at a time.
| Suffix | Purpose | DOM? |
|---|---|---|
.test.ts | Unit -- pure logic | No |
.test.tsx / .integration.tsx | Integration -- render components | Yes |
e2e/*.spec.ts | E2E -- Playwright browser | Browser |
New TanStack Router routes need *.browser.test.tsx sibling -- only if project use vitest browser mode (existing *.browser.test.* files or @vitest/browser dep). Skip layout/redirect-only routes. See REFERENCE.md.
vitest run)DeprecationWarning / React act() / unhandled rejection / @ts-ignore is NOT done. test-warning-check hook surfaces; fix at source. Escape: // allow: test-warning w/ reason.vitest run --detectAsyncLeaks) -- Stop hook run autosetTimeout hacks -- condition-based waitgetByRole > getByText > getByTestId > querySelectordefaultOpen for content tests | waitFor for close assertionsexpect.soft() for multi-assertion state testsci-warning-audit clean -- gh run view <id> --log | grep -E 'Warning|Deprecation' returns nothingSee REFERENCE.md for element selectors, portal testing, mock patterns, diagnostics, Vitest config.
npx claudepluginhub redpanda-data/ui-harness --plugin frontend-skillsEnforces a strict test-driven development workflow: write failing test first, then minimal code to pass, then refactor. Use for features, bugfixes, and refactoring.
Guides Test-Driven Development with Red-Green-Refactor cycle for writing code, implementing features, or fixing bugs in TDD projects.
Enforces a strict red-green-refactor TDD cycle with coordinated agent orchestration, covering test specification, failing tests, and incremental implementation with coverage thresholds.