tdd-impl

A slash command for implementing a feature with TDD, or test-driven development: write a failing test, make it pass, and then improve the code.

In plain words
What is it for?
Use `/tdd-impl [feature]` when implementing a feature interactively or when another agent needs to carry out a TDD-based issue implementation.
Why use it?
It gives the implementation a defined process and completion checks, including passing tests, target coverage, clean static analysis, and a completed commit.

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/kewton/commandmate/tdd-impl
Clone the repo
git clone --depth 1 https://github.com/Kewton/CommandMate

Made for: Claude Code.

Per session 14 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 430 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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.00014 $0.00430
Opus 5 $0.00007 $0.00215
Sonnet 5 $0.00003 $0.00086
Haiku 4.5 $0.00001 $0.00043

Measured yesterday against content hash d1b358fe9188, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

tdd-impl scanned grade B with 1 finding 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 yesterday.

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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

cat .claude/prompts/tdd-impl-core.md
.claude/commands/tdd-impl.md · 60 lines

What it actually says

TDD実装スキル

概要

テスト駆動開発(Test-Driven Development)の手法に従って、高品質なコードを実装するスキルです。

このスキルはスラッシュコマンドモードで動作します(ユーザーが直接実行)。

使用方法

  • /tdd-impl [機能名]
  • 「[機能名]をTDD実装してください」
  • 「テスト駆動開発で[機能名]を実装してください」

実行内容

共通プロンプトを読み込んで実行します:

cat .claude/prompts/tdd-impl-core.md

このプロンプトの内容に従って、TDD実装を実行してください。


動作モード

スラッシュコマンドモード:

  • ユーザーから対話的に情報を取得
  • Issue番号、受入条件、実装タスクなどを確認
  • 結果をターミナルに表示

完了条件

以下をすべて満たすこと:

  • すべてのテストが成功(Red → Green サイクル完了)
  • カバレッジが目標値以上(デフォルト: 80%)
  • 静的解析エラーがゼロ(ESLint, TypeScript)
  • コミットが完了

サブエージェントモード

サブエージェントとして呼び出す場合は、PM Auto-Devが以下のように実行します:

Use tdd-impl-agent to implement Issue #166 with TDD approach.

この場合、.claude/agents/tdd-impl-agent.md が使用されます。

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. yesterday First seen · 60 lines · 14 tokens per session scan B d1b358fe9188

Subscribe to this mod's changes

tdd-impl is a command published in the GitHub repository Kewton/CommandMate (39 stars, last pushed yesterday), licensed MIT. It adds 14 tokens to every session and 430 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.