tdd
Red-Green-Refactor test-driven development workflow. Guides the agent through writing failing tests first, then implementing code to pass them, then refactoring while keeping tests green.
Best use case
tdd is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Red-Green-Refactor test-driven development workflow. Guides the agent through writing failing tests first, then implementing code to pass them, then refactoring while keeping tests green.
Teams using tdd should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/tdd/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How tdd Compares
| Feature / Agent | tdd | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Red-Green-Refactor test-driven development workflow. Guides the agent through writing failing tests first, then implementing code to pass them, then refactoring while keeping tests green.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
AI Agents for Coding
Browse AI agent skills for coding, debugging, testing, refactoring, code review, and developer workflows across Claude, Cursor, and Codex.
Best AI Skills for Claude
Explore the best AI skills for Claude and Claude Code across coding, research, workflow automation, documentation, and agent operations.
Cursor vs Codex for AI Workflows
Compare Cursor and Codex for AI coding workflows, repository assistance, debugging, refactoring, and reusable developer skills.
SKILL.md Source
# TDD Skill ## When to use this Skill Use this Skill when you are: - Implementing a new feature using test-driven development - Adding test coverage to existing untested code - Refactoring code while maintaining correctness via tests - Working on a project that requires TDD as part of its workflow ## The Red-Green-Refactor Cycle ### 1. Red — Write a Failing Test - Write the smallest test that expresses the next piece of desired behavior - Run the test and confirm it fails for the expected reason - The test should fail because the feature is not yet implemented, not because of a syntax or setup error - Name the test to describe the behavior being tested, not the implementation ### 2. Green — Make the Test Pass - Write the minimum code necessary to make the failing test pass - Do not write more code than needed — just enough to turn the test green - Avoid the temptation to implement the "full" solution - Run all tests to verify nothing else broke ### 3. Refactor — Clean Up - Now that tests are green, improve the code structure - Remove duplication, clarify names, simplify logic - Run all tests after each refactoring step to confirm they still pass - Do not add new behavior during refactoring — that requires a new Red step ## Guidelines - **One behavior per test**: Each test should verify one specific aspect - **Fast feedback**: Tests should run quickly; mock external dependencies if needed - **Descriptive names**: Test names should read like specifications - **Test the interface, not the implementation**: Tests should survive refactoring - **Commit after each Green step**: Small, frequent commits with passing tests ## Things to Avoid - Writing multiple tests before implementing any code - Writing implementation code before having a failing test - Skipping the refactor step when tests pass - Testing private implementation details instead of public behavior - Writing tests so tightly coupled to implementation that any refactor breaks them
Related Skills
qa-run
Run QA test suites against the local dev stack using Chrome DevTools and Playwright MCPs. Verifies environment, executes test flows, monitors for network errors, writes results, and creates Linear tickets for failures.
deploy-watch
Monitor GitHub Actions deploy workflows after merging a PR to staging. Polls until all deploys complete, diagnoses failures, and reports results.
linear-audit
Route audit findings to Linear as issues. Reads the most recent audit report from docs/audits/, parses findings at warning severity or above, and creates Linear issues in the project's configured team. Requires Linear MCP server to be available.
document-writer
Document generation skill for creating DOCX, PDF, PPTX, and other formatted documents. Guides structured content creation with proper formatting, headings, tables, and professional presentation.
debugging
Structured debugging workflow: reproduce, isolate, trace, fix, verify. Use when investigating bugs, unexpected behavior, or test failures. Guides systematic root-cause analysis instead of trial-and-error.
code-reviewer
PR review, quality audit, and security checks. Invoke when reviewing code changes before merging or pushing. Performs structured review covering correctness, security, performance, and maintainability.
catholic
Apply reverent, faith-inspired Christian verbiage to non-code artifacts. Invoke when generating specs, plans, task lists, READMEs, or other documentation to infuse them with blessings, gratitude, and references to divine guidance. Never applies to source code or config files.
VibeCollab — Setup Instructions for AI Assistants
You are helping a user set up VibeCollab in their project.
raycast-extension-docs
Guidance for building, debugging, and publishing Raycast extensions using the Raycast documentation set. Use when Codex needs to create or modify Raycast extensions (React/TypeScript/Node), consult Raycast API reference or UI components, build AI extensions, handle manifest/lifecycle/preferences, troubleshoot issues, or prepare/publish extensions to the Raycast Store or Teams.
evomap
Connect to the EvoMap collaborative evolution marketplace. Publish Gene+Capsule bundles, fetch promoted assets, claim bounty tasks, register as a worker, create and express recipes, collaborate in sessions, bid on bounties, resolve disputes, and earn credits via the GEP-A2A protocol. Use when the user mentions EvoMap, evolution assets, A2A protocol, capsule publishing, agent marketplace, worker pool, recipe, organism, session collaboration, or service marketplace.
maestro
Intelligent skill knowledge gateway. Routes tasks to the right knowledge without loading all skills into context. MUST be consulted before any coding task — call the search_skills MCP tool to retrieve relevant expertise from 100+ indexed skills covering Swift, SwiftUI, concurrency, testing, architecture, performance, and security.
opentui
Comprehensive OpenTUI skill for building terminal user interfaces. Covers the core imperative API, React reconciler, and Solid reconciler. Use for any TUI development task including components, layout, keyboard handling, animations, and testing.