giuseppeve/agentic-engineering-skills/test-driven-development
Claude Code and agent skill by giuseppeve/agentic-engineering-skills
- community
Checking that the SKILL.md file is still in the repository.
Use when implementing features, fixing bugs, changing behavior, or refactoring tested code.
Install
npx vskill@latest install giuseppeve/agentic-engineering-skills/test-driven-developmentSKILL.md
The same SKILL.md was published earlier as giuseppeve/agentic-engineering-skills/test-driven-development.
Test-Driven Development (TDD)
Adaptation: obra/superpowers condensed cross-host TDD guidance with behavioral coverage-gap assessment.
Write a behavioral test, observe its expected failure, implement the smallest change, then refactor while green. A passing test alone does not prove it can detect the bug.
Scope
Use this cycle for new behavior and bug fixes. For refactoring, establish existing tests are green; add coverage for unprotected behavior before restructuring.
Follow applicable project and task instructions when choosing verification. Prototypes, generated code, configuration, and trivial edits need appropriate validation, not automatic test scaffolding or a separate permission request. Time pressure and manual checks do not replace a meaningful regression test for changed behavior.
When delegating TDD work, start each subagent with a fresh context window and provide the objective, relevant references, constraints, and expected output explicitly.
Coverage gaps
Map changed behavior and acceptance criteria to existing behavioral tests, using the request and available specifications. Check relevant success, boundary, and failure paths; assess whether tests exercise production behavior and detect realistic defects. Prioritize material gaps by impact, reuse existing coverage, and add focused tests when warranted. For existing correct behavior, use safe regression sensitivity evidence when needed; report missing evidence and unresolved gaps.
RED → GREEN → REFACTOR
- Specify. Identify the observable contract and the realistic production defect the test should catch. Derive expected values independently of implementation helpers or constants.
- RED. Write one focused test with a behavior-based name. Exercise real code; use doubles at external boundaries when necessary. Read writing-good-tests.md for test design and testing-anti-patterns.md when writing or changing tests, especially when using mocks or test utilities.
- Verify RED. Run the smallest relevant test command from the project. Observe the assertion fail because behavior is missing or wrong. A syntax, import, fixture, dependency, or infrastructure error is not behavioral RED: repair the harness and rerun. A test passing immediately needs a relevant missing case or verified regression sensitivity; do not count it as observed RED.
- GREEN. Implement only what the failing test requires. Run it again; fix production code rather than weakening a valid expectation. Run affected existing checks and resolve failures introduced by the change. Disclose unrelated failures and blockers.
- REFACTOR. Improve structure without changing behavior. Rerun affected checks; add the next behavior through another verified RED.
Meaningful test example
Contract: at most three total attempts; stop after success.
Also cover exhaustion separately. Assert outcomes and contract-relevant side effects, not mock existence or private structure. Keep test-only utilities outside production APIs.
Recovery when implementation already exists
Preserve existing and user work. Establish requirements independently; add the missing behavioral tests. In an isolated copy or narrowly reversible change, reproduce pre-fix behavior or disable only the relevant change; observe expected failures, restore, and rerun green. Never delete unrelated work or apply a blanket reset to recover process order.
Report this as regression verification, not a claim that the original implementation followed test-first order. Resume verified RED before further behavior changes. If safe reproduction is unavailable, report the missing evidence.
Common mistakes
| Temptation | Required response | |
|---|---|---|
| Tests afterward or manual checks prove TDD | Establish regression sensitivity; report actual sequence. | |
| Any failing command counts as RED | Reach the intended behavioral assertion. | |
| Assert the imported constant or mock output | Use independently specified observable behavior. | |
| Test every method for coverage | Cover meaningful contracts and boundary cases; reuse existing coverage. |
Completion evidence
Report relevant contracts, observed RED failures, GREEN commands/results, affected checks, and remaining gaps. Classify observed RED as process evidence and identify its pre-fix revision or reproducible state, command, expected behavioral failure and observation time. Classify GREEN and affected acceptance checks as final_state evidence, rerun them after the last relevant fix, and bind them to the final reviewed commit or exact uncommitted diff. Do not rerun RED on the fixed commit merely to make its revision current. Tests should detect realistic wrong branches, missing side effects, boundary violations, and error outcomes. Distinguish passed, failed, and not run; never label missing verification complete.
When reviewing a plan task, verify its criteria and requirements against the specification, plan, diff, and evidence; fix findings within the authorized task scope. Return findings and the shared result contract, including the final commit SHA when authorized and created. The plan orchestrator decides acceptance; a review thread ending does not establish completion.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingplugins/agentic-engineering-skills/skills/test-driven-development/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/giuseppeve/agentic-engineering-skills/test-driven-development)