tdd-development

Enforces test-first workflow for code changes with focused failing tests and verification.

Updated Feb 26, 2025
One-click install
npx skills add https://github.com/adschill/dev-config --skill tdd-development-adschill
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: tdd-development
Source: https://github.com/adschill/dev-config/tree/main/skills/tdd-development
Command: npx skills add https://github.com/adschill/dev-config --skill tdd-development-adschill

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Code changes made without tests often introduce regressions and unverified behavior. This Skill enforces a disciplined test-driven development workflow so every feature, bug fix, or refactor is backed by a focused failing test before implementation begins. ## Core Features & Use Cases - Test-First Workflow: Guides writing or updating a narrow failing test before touching production code, then implementing the smallest change to make it pass. - Verification Discipline: Runs the narrowest relevant tests plus lint, typecheck, or static analysis, broadening coverage when shared behavior or public APIs change. - Pragmatic Exceptions: Defines clear rules for when test-first is impractical, such as mechanical changes, CSS-only updates, or missing test frameworks, while still requiring nearby coverage. - Use Case: When asked to fix a bug in a payment calculation, the Skill first adds a regression test reproducing the bug, confirms it fails, implements the minimal fix, and reports all verification commands and results. ## Quick Start Use the tdd-development skill to implement this feature by writing a failing test first and verifying it passes.

Frequently Asked Questions about tdd-development

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I apply test-driven development to a bug fix?▼

Write a focused regression test that reproduces the bug and confirm it fails before changing production code. Then implement the smallest fix that makes the test pass, re-run the test, and run relevant lint or typecheck commands.

What is the correct TDD workflow for new features?▼

Understand the expected behavior and nearby test patterns, add a narrow failing test for the new behavior, implement the minimal code to pass it, then broaden verification if shared behavior or public APIs are affected. Refactor only after tests pass cleanly.

When is it acceptable to skip test-first development?▼

Test-first can be skipped for mechanical non-behavioral changes like formatting or renaming, CSS-only visual changes, or when no test framework exists in the area. You should still add coverage as close to the changed behavior as possible and explain why.

What kind of tests should I write first in TDD?▼

Prefer the narrowest useful test targeting the requested behavior, reusing existing helpers, fixtures, and style. Favor direct behavioral assertions over broad snapshots, and add edge cases for branching, permissions, concurrency, and error handling.

What verification should run after implementing a code change?▼

Re-run the focused test to confirm it passes, then run the narrowest relevant lint, typecheck, or static analysis command. Broaden test scope when the change touches shared behavior, integration points, or risky edge cases.