MVPavan/via / .claude/skills/test-driven-development
test-driven-development
VerifiedUse for risky behavior changes, regression proof, legacy characterization, or substantive test design. Trivial test renames do not require a test-first workflow.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 2.6 KB |
| agents/openai.yaml | config | 42 B |
| references/writing-good-tests.md | markdown | 1.9 KB |
references/writing-good-tests.md
View on GitHub# Writing useful tests
A test should name a plausible break and exercise the behavior that would reveal
it. Use existing repository tooling and representative boundaries.
- Derive expected values independently from requirements, worked examples or
trusted fixtures. Do not compute both sides with the implementation under test.
- Assert meaningful results, state or boundary interactions. Outbound call counts,
arguments and ordering can be the contract; internal call choreography usually is not.
- Prefer real components where economical. Fakes, mocks and partial responses are
legitimate when they preserve the contract exercised and do not replace the
behavior being proved. Add integration coverage for material assumptions they omit.
- Choose a stable public boundary when practical; internal tests can earn their
place for algorithms and invariants. Do not add production methods solely for
test cleanup or expose internals just to satisfy a test pattern.
- Control time, randomness and shared state when they cause nondeterminism.
Keep fixtures understandable and expectations visible. A focused parameter table
often beats duplicated tests or a generic fixture framework.
- A test of exact source text is useful only when that text is the actual contract;
for a script, execute controlled inputs and assert outputs/side effects instead.
Before accepting substantive tests, identify the wrong branch, missing validation
or side effect they catch. A safe mutation trial can resolve uncertainty when
worth its cost; mental inspection is not a reported executed mutation test.
Regression checks should fail against the original defect and pass after the fix.
Characterization checks instead establish the existing passing baseline.
Preserve tests that catch distinct failures. Update expectations for intentional
behavior changes and explain why; do not weaken checks merely to obtain green.
Scale verification to affected behavior and honor required repository gates.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |