tdd

tdd is a command for Claude Code from vishnu2kmohan/mcp-server-langgraph. It costs 18 tokens per session (995 once invoked), scanned A, original, MIT.

A Test-Driven Development (TDD) workflow, where you write a test before writing the code that should pass it.

In plain words
What is it for?
Use it when adding a feature or fixing a bug: define expected behavior, write and run a failing test, implement the smallest fix, then continue the workflow.
Why use it?
It helps confirm that a test actually detects missing behavior and keeps implementation focused on the stated requirement.

Command for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/vishnu2kmohan/mcp-server-langgraph/tdd
Clone the repo
git clone --depth 1 https://github.com/vishnu2kmohan/mcp-server-langgraph

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for tdd

README.md
[![agentmods](https://agentmods.dev/badge/commands/vishnu2kmohan/mcp-server-langgraph/tdd.svg)](https://agentmods.dev/commands/vishnu2kmohan/mcp-server-langgraph/tdd)
Your own site
<a href="https://agentmods.dev/commands/vishnu2kmohan/mcp-server-langgraph/tdd"><img src="https://agentmods.dev/badge/commands/vishnu2kmohan/mcp-server-langgraph/tdd.svg" alt="Measured on agentmods" height="20"></a>
Per session 18 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 995 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00018 $0.00995
Opus 5 $0.00009 $0.00498
Sonnet 5 $0.00004 $0.00199
Haiku 4.5 $0.00002 $0.00100

Measured 4d ago against content hash 16378d40d962, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

tdd scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/tdd.md · 162 lines

How it starts

The opening of the file, as written. The whole thing — 162 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Start TDD Workflow

Begin Test-Driven Development (TDD) workflow for a new feature or bug fix.

Usage

/tdd

Workflow

🔴 RED Phase - Write Failing Tests

  1. Understand the requirement:

    • What behavior needs to be implemented?
    • What are the expected inputs and outputs?
    • What edge cases need to be handled?
  2. Write the test FIRST:

    # Example: tests/test_feature.py
    
    def test_feature_handles_valid_input():
        # GIVEN: Valid input
        input_data = {"key": "value"}
    
        # WHEN: Function is called
        result = my_feature(input_data)
    
        # THEN: Returns expected output
        assert result == expected_output
    
  3. Run the test to verify it FAILS:

    pytest tests/test_feature.py::test_feature_handles_valid_input -xvs
    

    Expected: Test should FAIL with clear error message. Why: Proves the test is actually testing something and isn't a false positive.

  4. Commit the failing test:

    git add tests/test_feature.py
    git commit -m "test: add failing test for feature X"
    

🟢 GREEN Phase - Implement Minimal Code

  1. Write the simplest code to make test pass:

    # src/module/feature.py
    
    def my_feature(input_data):
        # Minimal implementation
        return expected_output
    
  2. Run the test to verify it PASSES:

    pytest tests/test_feature.py::test_feature_handles_valid_input -xvs
    

    Expected: Test should PASS.

  3. Run all tests to ensure no regressions:

    make test-unit
    
  4. Commit the implementation:

    git add src/module/feature.py
    git commit -m "feat: implement feature X
    
    Adds minimal implementation to make test pass.
    
    Closes #123"
    

♻️ REFACTOR Phase - Improve Code Quality

  1. Refactor for better design:
    • Extract functions for clarity
    • Add type hints
    • Improve variable names
    • Add docstrings
    • Remove duplication

Read the full file on GitHub · 162 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 162 lines · 18 tokens per session scan A 16378d40d962

Subscribe to this mod's changes

tdd is a command published in the GitHub repository vishnu2kmohan/mcp-server-langgraph (4 stars, last pushed 11d ago), licensed MIT. It adds 18 tokens to every session and 995 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.