tdd-red-green-refactor
TDD Red / Green / Refactor
Use this skill whenever making code changes that should be covered by tests.
Non-negotiables
- Start with a failing test that expresses the behavior (red).
- Implement the smallest change to pass (green).
- Refactor for clarity/structure after green, keeping tests passing.
- If no tests exist, add a minimal test harness + a failing test first.
Workflow
- Identify the smallest observable behavior.
- Add or update a test to fail on current code.
- Run the smallest relevant test command (targeted if possible).
- Implement the minimal code to make it pass.
- Refactor with tests still green.
- Report: test command(s) run + results.
If tests cannot run
More from skillrecordings/support
vercel-cli
Deploy and manage Vercel projects via CLI. Use when deploying apps, managing environment variables, configuring domains, or pushing secrets to Vercel. Triggers on deploy, vercel, env vars, production.
4ai-sdk
Comprehensive guide to AI SDK v6 for agent development, tool definitions, multi-step agentic workflows, and result extraction patterns
2lesson-content-question
Answer lesson-specific content questions. Use when a customer asks about a lesson, code example, or concept in a course.
2vector-search
Implement vector search for knowledge retrieval. Use when adding RAG, semantic search, knowledge base features, or context building for the agent.
2ops-setup
Guide user through support platform setup. Use when user says "set up", "configure", "I'm on step X", or provides API keys/credentials.
2email-change
Transfer licenses to a new email address. Use when a customer wants to change account email, move a license, or update access after a job change.
2