tdd
TDD Skill
Strict red-green-refactor for all net-new behavior. Test-first, one behavior slice at a time.
Constraints
- Test-first — no production code without a failing test that demands it.
- Minimal diff — no unrelated refactors, renames, or formatting churn.
- Deterministic — control time, randomness, I/O, and concurrency via seams/fakes.
- Fail fast — no silent error swallowing without a test proving the intent.
Cycle
Per behavior slice, execute the canonical red-green-refactor loop:
- Red — one test, failing for the right reason. Name encodes behavior + condition.
- Green — minimum production code to pass. No speculative abstraction (Rule of Three).
- Refactor — remove duplication, tighten names, simplify flow. Behavior unchanged.
- Verify — run smallest relevant target first, then full suite. Report commands + outcomes.
Output
- Intent: one sentence.
- Test slices: 3-7 bullets, ordered.
- Changes: tests added/updated + production code, by file.
- Verification: commands + pass/fail.
- Risks: contract changes, flaky-test vectors, uncovered boundaries.
More from discountry/ritmex-skills
use-ctx7
Fetch up-to-date library documentation via the ctx7 CLI. Use PROACTIVELY whenever any code change, feature design, or implementation or user request involves a project dependency — always query the matching version's docs first before writing code.
30codex-prompt-optimize
>
8slack
Control Slack via the `slack` CLI to read, search, and manage messages, threads, files, reactions, channels, DMs, and canvases. Trigger on requests involving Slack messages, threads, URLs, channel history, unread or recent DMs, or sending/replying to messages (English or Chinese queries mentioning Slack).
3debug
>
2refactor
>
2clickup
Use for ClickUp tasks and docs. Trigger on ClickUp URLs, task IDs, list IDs, doc IDs, page IDs, assignees, statuses, due dates, comments, checklists, and document workflows. Use the global `clickup` CLI.
2