rockclaver/systemcraft

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.

First seen Apr 4, 2026

Installation

$ npx skills add rockclaver/systemcraft --skill tdd

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from rockclaver/systemcraft · top by installs.

npx skills add rockclaver/systemcraft

Browse all from rockclaver/systemcraft

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Default branch main
Open issues 0
Status Active

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 2,150 B
  • docs SUMMARY.md 217 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 19 installs

SKILL.md

Test-Driven Development

Philosophy

Tests verify behavior through public interfaces, not implementation details. Good tests read like a spec and survive refactors; bad tests mock internals and break without a behavior change. See [tests.md](tests.md) and [mocking.md](mocking.md).

Anti-Pattern: Horizontal Slices

DO NOT write all tests first, then all implementation ("horizontal slicing") -- it produces tests that check imagined shape, not real behavior. Correct approach: vertical slices via tracer bullets -- one test, one implementation, repeat.

WRONG (horizontal):
  RED:   test1, test2, test3, test4, test5
  GREEN: impl1, impl2, impl3, impl4, impl5

RIGHT (vertical):
  RED→GREEN: test1→impl1
  RED→GREEN: test2→impl2
  RED→GREEN: test3→impl3
  ...

Workflow

1. Planning

  • Confirm interface changes and which behaviors to test (prioritize) with the user
  • Identify [deep modules](deep-modules.md) (small interface, deep implementation)
  • Design for [testability](interface-design.md)
  • List behaviors to test, not implementation steps; get user approval
  • Focus on critical paths and complex logic -- you can't test everything

2. RED-GREEN Loop

Start with a tracer bullet -- one test proving the path end-to-end -- then repeat per behavior:

RED:   Write test → fails
GREEN: Minimal code to pass → passes

One test at a time; only enough code to pass it; don't anticipate future tests.

3. Refactor

After all tests pass, apply [refactor candidates](refactoring.md): extract duplication, deepen modules, apply SOLID where natural, run tests after each step. Never refactor while RED.

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