tdd
/tdd
Implements features using strict test-driven development — red-green-refactor cycle. Writes a failing test first, then minimal code to pass, then refactors. Use when building features that need high reliability.
- Author
- viknesh20-20 ↗
- Repository
- claude-code-tool-kit ↗
- Licence
- MIT
- Last repository change
- 02.05.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 02.05.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Implements features using strict test-driven development — red-green-refactor cycle. Writes a failing test first, then minimal code to pass, then refactors. Use when building features that need high reliability.
Arguments
/tdd [feature or function to implement]
Original author description
Implements features using strict test-driven development — red-green-refactor cycle. Writes a failing test first, then minimal code to pass, then refactors. Use when building features that need high reliability.
How it works
- Detect Test Environment
- The TDD Cycle
- Test Progression
- Output
- Rules
SKILL.md preview
--- name: tdd description: "Implements features using strict test-driven development — red-green-refactor cycle. Writes a failing test first, then minimal code to pass, then refactors. Use when building features that need high reliability." argument-hint: "[feature or function to implement]" allowed-tools: Read, Grep, Glob, Bash, Write, Edit --- # Test-Driven Development ## Detect Test Environment !`ls package.json pytest.ini pyproject.toml go.mod Cargo.toml *.csproj Gemfile mix.exs 2>/dev/null` !`find . -type f \( -name "*.test.*" -o -name "*.spec.*" -o -name "test_*" -o -name "*_test.*" \) -not -path "*/node_modules/*" -not -path "*/.git/*" 2>/dev/null | head -5` --- ## The TDD Cycle For the requested feature, repeat this cycle until complete: ### RED — Write a Failing Test 1. Write the smallest possible test that describes the next piece of behavior 2. The test must import/reference the function or module (even if it doesn't exist yet) 3. Run the test — it MUST fail 4. Verify the failure message is meaningful (not just a compilation error) ### GREEN — Make It Pass 1. Write the absolute minimum code to make the test pass 2. Hardcoding is acceptable at this stage — it will be cleaned up in refactor 3. Don't add functionality the test doesn't require 4. Run the test — it MUST pass 5. Run all related tests — nothing else should break ### REFACTOR — Clean Up 1. Remove duplication in both production and test code 2. Improve naming, extract methods, simplify logic 3. Run tests after every refactoring step — they must stay green 4. Stop when the code is clean ## Test Progression Start simple, add complexity gradually: 1. Null/empty/zero case 2. Single item / simplest valid input 3. Multiple items / typical case 4. Edge cases / boundary values 5. Error cases / invalid input 6. Async / concurrent behavior (if applicable) ## Output - Show each cycle clearly: RED (test code + failure), GREEN (impl + pass), REFACTOR - Display test runner output at each step - Final summary: all tests, coverage of the feature ## Rules - NEVER write implementation before a failing test - NEVER skip the refactor step - One behavior per cycle — don't batch multiple features - If the test framework isn't set up, set it up first
Versions
| Repository | Score | Licence |
|---|---|---|
| This page · viknesh20-20/claude-code-tool-kit | 90 | MIT |
| kdlbs/kandev | 100 | AGPL-3.0 |
| sentimony/skills | 100 | MIT |
| sentimony/skills | 100 | MIT |
| TerminalSkills/skills | 100 | Apache-2.0 |
| duronext/jig | 100 | MIT |
| xoai/sage | 100 | MIT |
| rolemodel/skills | 100 | MIT |
| matteocodogno/wellforge | 100 | MIT |
Database snapshot: 13.11.2026 · package version ba2213e87ab0 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 3 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100red-green-refactor
Guides the red-green-refactor TDD workflow: write a failing test first, implement the minimum code to make it pass, then refactor while keeping tests green. Use when a user asks to practice TDD, write tests first, follow red-green-refactor, do test-driven development, write… - 90test-driven-development
Use when implementing any feature or bugfix in code — guides the strict RED-GREEN-REFACTOR cycle: write one failing test, confirm it fails for the right reason, write the minimal code to pass, refactor while the context is fresh. - 100tdd-expert
Drive development with strict Red-Green-Refactor discipline - write one failing test, write the minimum code to pass it, refactor on green - including test-list planning and a worked kata cycle. Use when someone asks "write this test-first", "do TDD on this feature", "help me… - 100tdd-feature
Red-green-refactor scaffold for building new features with TDD. Write failing tests first, then implement to pass. Use when building new features test-first. - 100test-driven-development-tdd-workflow
Use this skill when developing software iteratively following the strict Red-Green-Refactor development cycle. - 100sdlc-tdd
Test-driven development in vertical slices: agree the test seam, then one failing test, minimal code, refactor, repeat. Use whenever changing behaviour (features, fixes, T2 changes), when writing tests, or when the user says 'TDD' or 'red-green'.