tdd/SKILL.md
Guides 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 test-first development, or requests TDD workflow. Don't use for writing tests after implementation, adding tests to existing untested code, or one-off test fixes.
npx skillsauth add helderberto/skills tddInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Tests verify behavior through public interfaces, not implementation details. See principles.md for testing philosophy and mocking guidelines.
DO NOT write all tests first, then all implementation. Each cycle: one test → minimal code to pass → next test. See examples.md for demonstrations.
RED: Write first test → fails
GREEN: Minimal code to pass → passes
For each remaining behavior:
RED: Write next test → fails
GREEN: Minimal code to pass → passes
One test at a time. Minimal code to pass. No refactoring while RED.
Once all tests GREEN, look for refactor candidates:
Never refactor while RED.
| Excuse | Rebuttal | |---|---| | "This is too small for TDD" | Small functions have edge cases too. A 1-min test prevents a 30-min debug. | | "I'll write tests after" | That's not TDD. Tests written after miss the design feedback loop. | | "The test is obvious, skip RED" | If it's obvious, writing it takes 10 seconds. Skip nothing. | | "I need to refactor first" | Never refactor while RED. Get to GREEN, then refactor. | | "Mocking is too complex here" | Complexity in mocking signals a design problem. Simplify the interface. | | "I'll batch these 3 tests" | One test at a time. Batching hides which change broke what. |
package.json for test script; ask user which runner to usetesting
Ultra-compressed communication mode. Cuts token usage ~75% by speaking like caveman while keeping full technical accuracy. Supports intensity levels: lite, full (default), ultra, wenyan-lite, wenyan-full, wenyan-ultra. Use when user says "caveman mode", "talk like caveman", "use caveman", "less tokens", "be brief", or invokes /caveman. Also auto-triggers when token efficiency is requested.
documentation
Compact the current conversation into a handoff doc so a fresh agent can continue the work. Use when user asks to "handoff", "/handoff", "hand this off", or wants to end a session mid-task. Don't use for summarising completed work, writing PRDs/plans/ADRs, or committing changes.
development
Create new agent skills with proper structure, progressive disclosure, and bundled resources. Use when user wants to create, write, or build a new skill, or asks "make a skill for X".
development
Tell the agent to zoom out and give broader context or a higher-level perspective. Use when you're unfamiliar with a section of code or need to understand how it fits into the bigger picture.