From frontend-craft
Guides front-end TDD workflow: write failing tests first, implement minimum code, then refactor. Applies to components, hooks, utilities, API clients, route guards, and user workflows.
How this skill is triggered — by the user, by Claude, or both
Slash command
/frontend-craft:fec-tdd-workflowThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Use the rhythm of "write failing tests first, then implement the minimum code, and then refactor" to deliver front-end functions to avoid supplementing coverage only after implementation.
Use the rhythm of "write failing tests first, then implement the minimum code, and then refactor" to deliver front-end functions to avoid supplementing coverage only after implementation.
When fixing a defect, make the test fail first, then make it pass. If it cannot fail first, it means that the test does not cover the original problem, and the input, assertion or test level needs to be narrowed.
| Risk | Preferred Test |
|---|---|
| utils, schema, status calculation | unit testing |
| hooks / composables | unit or lightweight integration testing |
| Component props, emits, interactions, status | Component testing |
| Router, Provider, Store collaboration | Lightweight integration testing |
| Login, payment, permissions, key CRUD | E2E testing |
npx claudepluginhub bovinphang/frontend-craftEnforces TDD cycle (Red: failing test, Green: minimal code, Refactor) for new functions, features, bug fixes, refactoring. Includes Elixir backend and TypeScript frontend test patterns.
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.
Enforces RED-GREEN-REFACTOR cycle: prompts writing a failing test first, verifying failure, then implementing to pass. Includes structured gates for build, launch, and log-based verification before E2E testing.