$npx skillfedfor your agent

Test Driven Development

Test Driven Development teaches the red-green-refactor discipline for writing code validated by tests before implementation. Learn when to apply TDD across feature work, bug fixes, and refactoring, plus how to design testable interfaces, mock at system boundaries, and avoid common pitfalls.

Test Driven Development guides you through red-green-refactor cycles and testable design for production code.

AI-generated summary based on this skill's SKILL.md

13 5 unlicensed, metadata onlyupdated by oakoss

Install

oakoss/agent-skills/test-driven-development · repository language: Python

generated, unverified - the skill's exact subdirectory could not be determined; check the repository on GitHub

Open directory. Skills are indexed for reading, not audited. Review a skill's body before installing it.

Frequently asked questions

AI-generated answers based on this skill's SKILL.md and metadata

What is the red-green-refactor pattern in Test Driven Development?

Test Driven Development uses the red-green-refactor cycle as its core discipline. Red means writing a failing test first; green means writing minimal code to pass that test; refactor means improving the code while keeping tests passing. This cycle repeats for each feature, ensuring tests validate implementation before production code exists.

How do I write tests first in Test Driven Development?

Test Driven Development begins by writing a test that describes the desired behavior before any implementation code. The test fails initially (red phase). Then write the simplest code to make it pass (green phase). Finally, improve the code's design without changing behavior (refactor phase). This test-first approach ensures your code is testable and requirements are clear from the start.

When should I apply TDD to my development workflow?

Test Driven Development applies across feature work, bug fixes, and refactoring. Use TDD when building new functionality to ensure testable design. Apply it when fixing bugs by writing a test that reproduces the issue, then fixing code to pass. During refactoring, TDD's test suite validates that changes preserve behavior. Start with high-value areas and gradually expand TDD adoption.

What are key Test Driven Development best practices?

Test Driven Development best practices include designing testable interfaces, mocking at system boundaries to isolate units, writing focused tests for single behaviors, and avoiding common pitfalls like testing implementation details instead of contracts. Keep tests fast and independent, use descriptive test names, and maintain a high test-to-code ratio to catch regressions early.

How does Test Driven Development improve code quality?

Test Driven Development improves code quality by enforcing testable design upfront, reducing defects through continuous validation, and creating living documentation via tests. The test-first approach forces developers to think through requirements and edge cases before coding, leading to simpler, more maintainable implementations with fewer bugs reaching production.

What automated testing strategies does Test Driven Development use?

Test Driven Development employs unit testing as its primary automated testing strategy, validating individual components in isolation. It emphasizes fast feedback through quick test execution, uses mocking to control dependencies, and builds a regression suite that catches breaking changes. Integration and end-to-end tests complement unit tests for comprehensive coverage.

Let your AI agent find skills like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 56,283 agent skills by what they can do, searchable in plain language.

wish › “Learn and implement test-driven development methodology”

Give your agent the search over MCP, or paste the wish link into any chat. No install? Search from any chat →

Related skills

doc-tdd
by vladm3105 · vladm3105/aidoc-flow-framework

doc-tdd generates Layer 7 TDD artifacts that translate component contracts into concrete test cases with quality thresholds. It maps BDD scenarios to unit, integration, functional, and end-to-end tests, establishes coverage targets per type, and sequences the Red-Green-Refactor workflow before implementation begins.

MITupdated Jul 2026
★ 16repo stars
openspec-plus-tdd
by sudokar · sudokar/openspec-plus

This skill activates during OpenSpec change implementation to enforce atomic test-driven development: every test—acceptance, unit, edge case, or helper—must fail for the right reason before production code is written to make it pass. Gherkin scenarios in spec.md are the canonical acceptance contract; every relevant scenario must become at least one test. The per-test state machine forbids batching, skipping refactor assessment, or shipping with uncovered scenarios.

MITupdated Jul 2026
★ 133repo stars
tdd-mastery
by xenitV1 · xenitV1/claude-code-maestro

TDD Mastery enforces the iron law of test-first development: write a failing test, verify it fails, implement minimal code to pass, then refactor. The skill drills the red-green-refactor cycle with no exceptions, rejecting any production code written before its corresponding test exists and has been observed failing.

MITupdated Jan 2026
★ 230repo stars
Tdd
by glebis · glebis/claude-skills

This skill guides you through test-driven development using separate subagents for test writing and implementation, ensuring each phase stays focused on its role. It supports Jest, Vitest, pytest, Go test, cargo test, PHPUnit, and RSpec, with modes for interactive approval, autonomous execution, and dry-run validation. Vertical slicing and context isolation keep your TDD workflow disciplined and your tests honest.

no license declared → metadata onlyupdated Jul 2026
★ 334repo stars
tdd
by frankify-app · frankify-app/skills

tdd guides you through writing tests before implementation using the red-green-refactor workflow. Each cycle commits a failing test marked red, then minimal passing code marked green, with refactoring only after all tests pass. The skill enforces behavioral testing over implementation details and includes commit hygiene checks to keep your tree lint-clean at every step.

MITupdated Jul 2026
★ 0repo stars
bug-fix-tdd
by stacklok · stacklok/toolhive-studio

Bug Fix TDD guides you through test-driven bug resolution: write a failing test that reproduces the issue, then apply the minimum fix to make it pass. The skill covers test placement, mock patterns, and the complete red-green-refactor cycle for both standard fixes and fallback code-analysis approaches when reproduction isn't possible.

Apache-2.0for claude-code, codex, cursorupdated Jul 2026
★ 158repo stars

More skills rtk-tdd (Apache-2.0) · Tdd Workflow (MIT) · tdd-rust (Apache-2.0)

Tags
quality-assurancecode-validationagile-methodologytesting-firstdevelopment-workflowrefactoring-practicesoftware-craftsmanshipcontinuous-improvement