Agent skill

TDD Methodoly Expert

by thedaviddias in thedaviddias/skill-check

A skill your agent uses when implementing features or fixing bugs with strict Test-Driven Development (TDD).

MITAuto-check passedTesting & QA

Install TDD Methodoly Expert

skills CLI
$ npx skills add thedaviddias/skill-check --skill tdd-methodoly-expert -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install thedaviddias/skill-check tdd-methodoly-expert --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/thedaviddias/skill-check.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/tdd-methodoly-expert .claude/skills/tdd-methodoly-expert && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
tdd-methodoly-expert
GitHub stars
190
Token cost
~2.2k tokens
SKILL.md length
935 words
Files
2 (incl. references)
Skills in repo
1
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when implementing features or fixing bugs with strict Test-Driven Development (TDD).

  • Works in 3 steps: Write a test that expresses the desired… → Run the test and verify it fails (for… → Confirm the failure message indicates…
  • Implementing features
  • SKILL.md covers When to Use This Skill, Core TDD Methodology, TDD Workflow Integration and Bundled Tools and Resources, plus 1 more section
  • Calls python and bash

What it does

TDD Methodoly Expert is an agent skill from thedaviddias/skill-check. Use when implementing features or fixing bugs with strict Test-Driven Development (TDD). Activate for coding tasks that require new functionality, refactoring, or comprehensive test coverage, especially when the user mentions TDD or Test Driven Development.

Its SKILL.md is about 2.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/tdd-reference.md`).

It sits in Testing & QA, covering Test-driven development and Refactoring. The repository describes itself as: Linter for agent skill files. The licence is MIT.

When your agent uses it

  • Implementing features
  • Fixing bugs with strict Test-Driven Development (TDD)
  • Test Driven Development

Example prompts

  • “/tdd-methodoly-expert”

Requirements

  • Python 3

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. Write a test that expresses the desired behavior
  2. Run the test and verify it fails (for the right reason)
  3. Confirm the failure message indicates what's missing

What it can do on your machine

Read from SKILL.md and the folder at commit 923aaee. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • python
    • bash

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

TDD Methodoly Expert loads about 2.2k tokens when it runs, and up to ~5.8k if it reads all its reference files. Until then it costs about 70 tokens; SKILL.md has 935 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~70
When it runs · the whole SKILL.md, loaded when a task matches
~2.2k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~5.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from thedaviddias/skill-check at commit 923aaee, republished under its MIT licence (© thedaviddias). 935 words, ~2,216 tokens.

Download SKILL.mdSave it as .claude/skills/tdd-methodoly-expert/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
tdd-methodoly-expert
description
Use when implementing features or fixing bugs with strict Test-Driven Development (TDD). Activate for coding tasks that require new functionality, refactoring, or comprehensive test coverage, especially when the user mentions TDD or Test Driven Development.

TDD Methodology Expert

Enforce and reinforce Test-Driven Development (TDD) methodology throughout the software development process. This skill provides comprehensive guidance, automated validation, and continuous reinforcement of the Red-Green-Refactor cycle.

When to Use This Skill

This skill automatically activates when:

  • TDD is mentioned in CLAUDE.md or CLAUDE.local.md
  • TDD is referenced in project memory
  • The user explicitly requests TDD methodology
  • The user asks to write tests or implement features

Use this skill for:

  • Implementing new features using TDD
  • Refactoring existing code with test protection
  • Fixing bugs with test-first approach
  • Ensuring code quality through TDD discipline
  • Validating that TDD principles are being followed

Do NOT use this skill for:

  • Pure design discussions without implementation
  • Documentation-only tasks
  • Research or exploration tasks

Core TDD Methodology

Test-Driven Development follows a strict three-phase cycle that must be repeated for every increment of functionality:

🔴 Red Phase: Write a Failing Test

Always write the test before any production code.

  1. Write a test that expresses the desired behavior
  2. Run the test and verify it fails (for the right reason)
  3. Confirm the failure message indicates what's missing

Red Phase Principles:

  • Test must be simple and focused on one behavior
  • Test name should clearly describe expected behavior
  • Test should be readable without looking at implementation
  • Failure should be meaningful and guide implementation

Example Flow:

1. Write: test_should_calculate_total_with_tax()
2. Run: Test fails - "ShoppingCart has no attribute 'calculate_total'"
3. ✅ Ready for Green phase
🟢 Green Phase: Make the Test Pass

Write minimal code to make the failing test pass.

  1. Implement the simplest code that makes the test pass
  2. Run the test and verify it passes
  3. Run all tests to ensure nothing broke

Green Phase Principles:

  • Write only enough code to pass the current test
  • Don't add features not required by tests
  • It's okay to use shortcuts (you'll refactor later)
  • Focus on making it work, not making it perfect

Example Flow:

1. Implement: def calculate_total(self, tax_rate): ...
2. Run: Test passes ✅
3. Run all: All tests pass ✅
4. ✅ Ready for Refactor phase
🔵 Refactor Phase: Improve the Code

Clean up code while maintaining passing tests.

  1. Identify duplication, poor names, or structural issues
  2. Refactor incrementally, running tests after each change
  3. Verify all tests still pass
  4. Repeat until code is clean

Refactor Phase Principles:

  • Never refactor with failing tests
  • Make small, safe changes
  • Run tests after each refactoring step
  • Improve both production code and test code
  • Apply design patterns and best practices

Example Flow:

1. Identify: Duplicated tax calculation logic
2. Extract: Move to _calculate_tax() method
3. Run tests: All pass ✅
4. Improve: Better variable names
5. Run tests: All pass ✅
6. ✅ Commit and move to next feature

TDD Workflow Integration

Before Starting Any Code Task

Step 1: Understand the Requirement

  • Break down the task into small, testable behaviors
  • Identify the simplest test case to start with
  • State which TDD phase you're entering (Red)

Step 2: Plan the Test

  • Describe what test you're about to write
  • Explain what behavior it will verify
  • Confirm test will fail before implementation
During Implementation

Always follow this sequence:

  1. 🔴 Red: Write failing test → Run → Verify failure
  2. 🟢 Green: Write minimal code → Run → Verify pass
  3. 🔵 Refactor: Improve code → Run → Verify still passes
  4. Commit: Save working, tested, clean code
  5. Repeat: Next test for next behavior

Never skip phases or reverse the order.

Communicating TDD Progress

In every response involving code changes, explicitly state:

  • Current phase: Which phase you're in (Red/Green/Refactor)
  • Test status: Whether tests are passing or failing
  • Next steps: What comes next in the cycle

Example Communication:

🔴 RED PHASE: Writing a test for calculating order total with discounts.

Test: test_should_apply_percentage_discount_to_order_total()
Expected to fail because Order.apply_discount() doesn't exist yet.

[Test code here]

Running test... ❌ Fails as expected: "Order has no attribute 'apply_discount'"

🟢 GREEN PHASE: Implementing minimal code to pass the test...

[Implementation code here]

Running test... ✅ Passes!
Running all tests... ✅ All pass!

🔵 REFACTOR PHASE: Improving the discount calculation structure...

[Refactored code here]

Running all tests... ✅ All pass!
Ready to commit this increment.

Bundled Tools and Resources

Scripts
check_tdd_compliance.py

Analyzes code to detect TDD compliance issues and code smells that indicate test-after development.

Usage:

bash
python scripts/check_tdd_compliance.py <path-to-code>

What it checks:

  • Nested conditionals (sign of poor TDD structure)
  • Long methods (TDD produces small, focused methods)
  • Complex boolean conditions (TDD encourages extraction)
  • Missing abstractions (type checking vs polymorphism)
  • Test coverage (presence of corresponding test files)

When to use:

  • After completing a feature or module
  • Before committing code
  • When reviewing code quality
  • During refactoring sessions
Show full SKILL.md (345 more words)Show less
validate_tests.py

Validates that tests exist, are properly structured, and follow TDD patterns.

Usage:

bash
python scripts/validate_tests.py <path-to-tests>

What it checks:

  • Test file existence and structure
  • Test case count and naming
  • Arrange-Act-Assert pattern adherence
  • Test size and complexity
  • Descriptive test names

When to use:

  • Before committing new tests
  • When validating test quality
  • During code review
  • After writing a batch of tests
setup_hooks.sh

Installs git hooks and Claude Code hooks to enforce TDD methodology automatically.

Usage:

bash
bash scripts/setup_hooks.sh <project-directory>

What it installs:

  • Git pre-commit hook: Validates TDD compliance before commits
  • Claude user-prompt-submit hook: Injects TDD reminders into every interaction
  • Updates CLAUDE.md to document TDD requirement

When to use:

  • Once at project initialization
  • When onboarding new team members to TDD
  • When setting up TDD enforcement for the first time
References

Load these references when deeper understanding is needed:

tdd-principles.md

Comprehensive guide to TDD methodology including:

  • The Red-Green-Refactor cycle in detail
  • TDD philosophy and benefits
  • Best practices and common mistakes
  • TDD in different contexts (unit, integration, acceptance)
  • Measuring TDD effectiveness

When to reference: When explaining TDD concepts or resolving questions about methodology.

code-smells.md

Catalog of code smells that indicate test-after development:

  • High-severity smells (nested conditionals, long methods, god objects)
  • Medium-severity smells (type checking, duplication, primitive obsession)
  • Low-severity smells (magic numbers, long parameter lists)
  • Detection strategies and refactoring guidance

When to reference: When analyzing code quality or identifying non-TDD patterns.

Grep patterns for searching:

  • Nested conditionals: if.*:\s*\n\s+if
  • Long methods: Count lines between function definitions
  • Type checking: isinstance\(|typeof
  • God classes: Count methods per class
testing-patterns.md

Language-agnostic testing patterns and best practices:

  • Test structure patterns (AAA, Given-When-Then)
  • Test organization (fixtures, builders, object mothers)
  • Assertion patterns
  • Test doubles (stubs, mocks, fakes)
  • Parameterized testing
  • Exception testing
  • Test naming conventions

When to reference: When writing tests or improving test structure.

Assets
Hook Templates

Located in assets/hook-templates/:

  • pre-commit.sh: Git hook that runs TDD compliance checks before allowing commits
  • user-prompt-submit.sh: Claude Code hook that injects TDD reminders before every user prompt

These templates are used by setup_hooks.sh and can be customized for specific project needs.

Further reference

See references/tdd-reference.md for prompt-based validation and setup, TDD enforcement rules, common scenarios, workflow integration, troubleshooting, and summary.

© thedaviddias, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (references) in .agents/skills/tdd-methodoly-expert of thedaviddias/skill-check.

  • SKILL.md
  • references/tdd-reference.md

Open the folder on GitHubat commit 923aaee

Compare with similar skills

TDD Methodoly Expert next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

TDD Methodoly Expert compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
TDD Methodoly Expert this skillthedaviddias/skill-check190—~2.2kAutomated safety check: PassMIT
TDD WorkflowhellangleZ/burn-in-cceverywhere-ralph11211 repos~2.4kAutomated safety check: PassNone
TDDDanMcInerney/architect-loop626—~730Automated safety check: PassMIT
TDD Workflowaffaan-m/ECC276k1 repos~2.6kAutomated safety check: PassMIT
Fixjvm-skills/jvm-skills140—~695Automated safety check: PassApache-2.0
Test Driven Developmentdzhalaevd/Donatello135—~1.1kAutomated safety check: PassApache-2.0

Similar skills

  • TDD Workflow

    hellangleZ/burn-in-cceverywhere-ralph

    A skill your agent uses when writing new features, fixing bugs, or refactoring code.

    112 GitHub starsUsed in 11 repos~2.4k tokens
    Testing & QAAuto-check passed
  • TDD

    DanMcInerney/architect-loop

    Test-driven development for factory builders. An agent skill from DanMcInerney/architect-loop.

    626 GitHub stars~730 tokensUpdated 26 days ago
    Testing & QAAuto-check passed
  • TDD Workflow

    affaan-m/ECC

    Yeni özellikler yazarken, hata düzeltirken veya kod refactor ederken bu skill'i kullanın.

    276k GitHub starsUsed in 1 repo~2.6k tokens
    Testing & QAAuto-check passed
  • Fix

    jvm-skills/jvm-skills

    Fix a bug or missing feature using TDD — write failing test first, then fix, refactor, verify, beautify.

    140 GitHub stars~695 tokensUpdated 1 mo ago
    Testing & QAAuto-check passed
  • Test Driven Development

    dzhalaevd/Donatello

    Use as a workflow overlay when implementing any feature, bugfix, refactor, or behavior change before writing production code

    135 GitHub stars~1.1k tokensUpdated 6 days ago
    Testing & QAAuto-check passed
  • TDD

    nodetool-ai/nodetool

    Develop a behavior test-first through red, green, and refactoring.

    560 GitHub stars~906 tokensUpdated today
    Testing & QAAuto-check passed

Categories

Questions about TDD Methodoly Expert

What does TDD Methodoly Expert do?

A skill your agent uses when implementing features or fixing bugs with strict Test-Driven Development (TDD). TDD Methodoly Expert is an agent skill from thedaviddias/skill-check. Use when implementing features or fixing bugs with strict Test-Driven Development (TDD).

When should I use TDD Methodoly Expert?

TDD Methodoly Expert fits situations like: implementing features; fixing bugs with strict Test-Driven Development (TDD); test Driven Development.

How do I install TDD Methodoly Expert in Claude Code?

Run `npx skills add thedaviddias/skill-check --skill tdd-methodoly-expert -a claude-code`. Or copy the skill folder (.agents/skills/tdd-methodoly-expert in thedaviddias/skill-check) into .claude/skills/tdd-methodoly-expert in your project. Claude Code loads it when a task matches its description.

How do I install TDD Methodoly Expert in Codex?

Run `npx skills add thedaviddias/skill-check --skill tdd-methodoly-expert -a codex`. Or copy the skill folder (.agents/skills/tdd-methodoly-expert in thedaviddias/skill-check) into .agents/skills/tdd-methodoly-expert in your project. Codex loads it when a task matches its description.

Can I use TDD Methodoly Expert in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add thedaviddias/skill-check --skill tdd-methodoly-expert -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/tdd-methodoly-expert, .gemini/skills/tdd-methodoly-expert, .github/skills/tdd-methodoly-expert and .opencode/skills/tdd-methodoly-expert in your project.

What does TDD Methodoly Expert need to run?

Going by SKILL.md and its folder, TDD Methodoly Expert needs the command-line tools its instructions call (python and bash). Our summary lists: Python 3.

Does TDD Methodoly Expert access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is TDD Methodoly Expert safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does TDD Methodoly Expert use?

TDD Methodoly Expert is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does TDD Methodoly Expert use?

About 2.2k tokens (SKILL.md is roughly 8.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 3.6k tokens, read only when the agent opens those files.

What are the alternatives to TDD Methodoly Expert?

Skills that share tags, products or a category with TDD Methodoly Expert: TDD Workflow (hellangleZ/burn-in-cceverywhere-ralph, 112 stars), TDD (DanMcInerney/architect-loop, 626 stars), TDD Workflow (affaan-m/ECC, 276k stars) and Fix (jvm-skills/jvm-skills, 140 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains TDD Methodoly Expert?

thedaviddias (a GitHub user) maintains it in thedaviddias/skill-check, which has 190 GitHub stars. The repository was last updated on May 18, 2026.

Source: thedaviddias/skill-check on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.