test-driven-development

A test-first development method, usually called TDD, in which you write a test, watch it fail, then add the smallest code needed to pass it. It also defines safe ways to run test tools without leaving them waiting for input.

In plain words
What is it for?
Use it when implementing or changing code with tests such as Vitest or Jest, especially when reliable pass/fail evidence and clean test processes matter.
Why use it?
It provides evidence that a test checks the intended behavior and reduces the risk of claiming a change works without verification.

Skill for Claude CodeCodex

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 skills/romiluz13/cc-teams/test-driven-development
Any agent
npx skills add romiluz13/cc-teams --skill test-driven-development
Clone the repo
git clone --depth 1 https://github.com/romiluz13/cc-teams

Made for: Claude Code, Codex.

Per session 18 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,758 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.03758
Opus 5 $0.00009 $0.01879
Sonnet 5 $0.00004 $0.00752
Haiku 4.5 $0.00002 $0.00376

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

Security

Grade A, and why

test-driven-development 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 2d 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.

plugins/cc-teams/skills/test-driven-development/SKILL.md · 541 lines

How it starts

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

Test-Driven Development (TDD)

Overview

Write the test first. Watch it fail. Write minimal code to pass.

Core principle: If you didn't watch the test fail, you don't know if it tests the right thing.

Task completion is not goal achievement. Passing a task requires proof, not intent.

No proof, no PASS. No fresh evidence, no completion claim.

Violating the letter of the rules is violating the spirit of the rules.

Test Process Discipline (CRITICAL)

Problem: Test runners (Vitest, Jest) default to watch mode, leaving processes hanging indefinitely. 61 hanging processes = frozen computer.

Mandatory Rules:

  1. Always use run mode - Never invoke watch mode:
    • Vitest: npx vitest run (NOT npx vitest)
    • Jest: CI=true npx jest or npx jest --watchAll=false
    • npm scripts: CI=true npm test or npm test -- --run
  2. Prefer CI=true prefix for all test commands: CI=true npm test
  3. Timeout guard: If CI handling is uncertain, prefix with timeout 60s so the Bash tool never hangs indefinitely:
    timeout 60s npx vitest run
    
  4. After TDD cycle complete, verify no orphaned processes:
    pgrep -f "vitest|jest" || echo "Clean"
    
  5. Kill if found: pkill -f "vitest|jest" 2>/dev/null || true
  6. IDE vs CLI truth: If CLI tests/builds pass with exit 0, trust the CLI over stale IDE/LSP diagnostics during active generation.

Phase Execution Guard

If you are working from a plan, treat the current approved phase as the contract.

Recover and follow:

  • objective
  • inputs
  • files/surfaces
  • expected artifacts
  • required checks
  • checkpoint type
  • exit criteria

If a non-trivial phase is missing these and the work would become guesswork, stop and ask the lead for a clarified phase instead of inventing one.

When to Use

Always:

  • New features
  • Bug fixes
  • Refactoring
  • Behavior changes

Exceptions (ask your human partner):

  • Throwaway prototypes
  • Generated code
  • Configuration files

Read the full file on GitHub · 541 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. 2d ago First seen · 541 lines · 18 tokens per session scan A 547c8b00f6a6

Subscribe to this mod's changes

test-driven-development is a skill published in the GitHub repository romiluz13/cc-teams (5 stars, last pushed 4mo ago), licensed MIT. It adds 18 tokens to every session and 3,758 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.

Related

Other skills, from other repositories

agent-integration

Run all three agent integration phases sequentially: research, write-tests, and implement using E2E-first TDD (unit tests written last). For individual phases, use /agent-integration:research, /agent-integration:write-tests, or /agent-integration:implement. Use when the user says "integrate agent", "add agent…

entireio/cli · 89 tokens

engram-testing-coverage

TDD and coverage standards for Engram. Trigger: When implementing behavior changes in any package.

Gentleman-Programming/engram · 25 tokens

code-assist

Guides implementation of code tasks using test-driven development in an Explore, Plan, Code, Commit workflow. Acts as a Technical Implementation Partner and TDD Coach — following existing patterns, avoiding over-engineering, and producing idiomatic, modern code.

mikeyobrien/ralph-orchestrator · 53 tokens

tdd

Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests.

GreyDGL/PentestGPT · 33 tokens

css-design-tdd

Test-driven CSS design system modifications. Run checks before/after CSS changes to verify token usage, variable definitions, fallbacks, and consistency. Use when modifying CSS tokens, fixing design inconsistencies, or auditing CSS architecture.

xiaolai/vmark · 49 tokens

mobiai-mobile-tdd

You MUST use this before writing any implementation code for a mobile feature, bug fix, refactor, or behavior change. Tests come before implementation — no exceptions.

ArisGuimera/MobiAI-Core · 38 tokens