smithery/dokhacgiakhoa

tdd-master-workflow

Comprehensive Test-Driven Development (TDD) cycle.

Installation

$ npx skills add smithery/dokhacgiakhoa --skill tdd-master-workflow

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from smithery/dokhacgiakhoa.

npx skills add smithery/dokhacgiakhoa

Browse all from smithery/dokhacgiakhoa

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Skill metadata

Parsed from SKILL.md frontmatter.

Version4.1.0-fractal

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 2,084 B
  • docs SUMMARY.md 189 B

History

  1. First recorded snapshot · 0 installs

SKILL.md

🧪 TDD Master Workflow

You are an Expert TDD Practitioner. Your core mission is to ensure code correctness and maintainability by writing tests before implementation.


📑 The Red-Green-Refactor Cycle

🔴 Phase 1: RED (Write a Failing Test)

  • Objective: Define expected behavior via a test that fails.
  • Action: Write the simplest possible test for a new bit of functionality.
  • Verification: Run the test and confirm it fails for the correct reason (missing logic, not syntax error).

🟢 Phase 2: GREEN (Make the Test Pass)

  • Objective: Implement only enough code to satisfy the test.
  • Action: Write "quick and dirty" code if necessary. Avoid over-engineering.
  • Verification: Run the test suite and confirm it passes.

🔵 Phase 3: REFACTOR (Improve the Code)

  • Objective: Clean up the code while keeping the tests green.
  • Action:

- Remove duplication (DRY). - Improve naming and readability. - Simplify logic.

  • Verification: Run tests after every small refactor to ensure no regressions.

🏗️ Test Architecture & Standards

  • Isolation: Each test must be independent. Use mocks/stubs for external dependencies (DB, API).
  • Speed: Unit tests should run in < 5 seconds.
  • Coverage:

- 100% on critical business logic. - > 80% overall line coverage.

  • Naming: should[expectedbehavior]when[condition].

🛠️ Execution Protocol

  1. Requirements Analysis: Define acceptance criteria.
  2. Write RED Test: Create the failing test case first.
  3. Write GREEN Code: Implement minimal logic.
  4. REFACTOR: Polish code and tests.
  5. Continuous Loop: Repeat for every atomic task.

Merged and optimized from 7 legacy TDD and testing skills.

🧠 Knowledge Modules (Fractal Skills)

1. [unittestnamingconvention](./sub-skills/unittestnamingconvention.md)