Agent skill · Testing & QA

tdd

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.

stevesolungithub.com/stevesolunGitHub ↗
claude-codeMIT
Install
npx skills add stevesolun/ctx --skill tdd --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 6
SKILL.md size: 4 KB
Bundled scripts: none
Path: imported-skills/mattpocock/tdd/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 569
Language: Python

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Test-Driven Development ## Philosophy **Core principle**: Tests should verify behavior through public interfaces, not implementation details. Code can change entirely; tests shouldn't. **Good tests** are integration-style: they exercise real code paths through public APIs. They describe _what_ the system does, not _how_ it does it. A good test reads like a specification - "user can checkout with valid cart" tells you exactly what capability exists. These tests survive refactors because they don't care about internal structure. **Bad tests** are coupled to implementation. They mock internal collaborators, test private methods, or verify through external means (like querying a database directly instead of using the interface). The warning sign: your test breaks when you refactor, but behavior hasn't changed. If you rename an internal function and tests fail, those tests were testing implementation, not behavior. See [tests.md](tests.md) for examples and [mocking.md](mocking.md) for mocking guidelines. ## Anti-Pattern: Horizontal Slices **DO NOT write all tests first, then all implementation.** This is "horizontal slicing" - treating RED as "write all tests" and GREEN as "write all

What's inside
Steps it walks through
  1. Philosophy
  2. Anti-Pattern: Horizontal Slices
  3. Workflow
  4. 1. Planning
  5. 2. Tracer Bullet
  6. 3. Incremental Loop
  7. 4. Refactor
  8. Checklist Per Cycle
Ships with 5 files
  • deep-modules.md
  • interface-design.md
  • mocking.md
  • refactoring.md
  • tests.md
More from ctx
All skills →
About this skill
What does the tdd skill do?

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.

How do I install it?

Run `npx skills add stevesolun/ctx --skill tdd --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From stevesolun/ctx, a repository with 569 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going