dianyike/claude-code-insights/tdd

Claude Code and agent skill by dianyike/claude-code-insights

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Test-driven development with red-green-refactor loop. Use when user wants to build features or fix bugs using TDD, mentions "red-green-refactor", wants integration tests, or asks for test-first development.

Install

npx vskill@latest install dianyike/claude-code-insights/tdd

SKILL.md

Test-Driven Development

Tests verify behavior through public interfaces, not implementation details. Always use vertical slices (one test -> one implementation -> repeat), never horizontal slices.

Additional resources

Workflow

1. Planning
  • [ ] Identify what interface changes are needed
  • [ ] Identify which behaviors to test (prioritize)
  • [ ] Design interfaces for testability (accept deps, return results, small surface)
  • [ ] List the behaviors to test (not implementation steps)
2. Tracer Bullet

Write ONE test that confirms ONE thing about the system:

RED: Write test for first behavior -> test fails
GREEN: Write minimal code to pass -> test passes
3. Incremental Loop

For each remaining behavior:

RED: Write next test -> fails
GREEN: Minimal code to pass -> passes
  • One test at a time
  • Only enough code to pass current test
  • Don't anticipate future tests
4. Refactor

After all tests pass:

  • [ ] Extract duplication
  • [ ] Deepen modules (move complexity behind simple interfaces)
  • [ ] Run tests after each refactor step

Never refactor while RED. Get to GREEN first.

Checklist Per Cycle

  • [ ] Test describes behavior, not implementation
  • [ ] Test uses public interface only
  • [ ] Test would survive internal refactor
  • [ ] Code is minimal for this test
  • [ ] No speculative features added

Completion Criteria

  • [ ] All planned behaviors have a corresponding test
  • [ ] All tests pass (GREEN state)
  • [ ] Refactor pass completed — no duplication, modules are deep
  • [ ] No speculative code — every line justified by a test

Gotchas

  • Iterate this section: After each TDD session, append new gotchas here

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
69
Repository forks
13
7-day trend score
0

Stars and forks are for the whole GitHub repository, not this skill alone. 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
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/dianyike/claude-code-insights/tdd/badge)](https://verified-skill.com/skills/dianyike/claude-code-insights/tdd)

Something wrong with this skill or its page? Tell us.