cf-tdd

cf-tdd is a skill for Claude Code from dinhanhthi/coding-friend. It costs 140 tokens per session (1,411 once invoked), scanned A, original, MIT.

An implementation workflow for writing production code, adding features, refactoring, and tests. TDD, or test-driven development, is the practice of writing a failing test before the code that makes it pass.

In plain words
What is it for?
Use it when creating functions, endpoints, routes, components, tests, or other production changes.
Why use it?
It provides a defined path for implementation and can use TDD when requested or enabled in project settings. Without that setting, it uses direct implementation by default.

Skill for Claude Code

Written for Claude Code: dynamic context ```! block. Also seen: mentions subagents.

Good fit Use it when creating functions, endpoints, routes, components, tests, or other production changes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/dinhanhthi/coding-friend/cf-tdd
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.

Any agent
npx skills add dinhanhthi/coding-friend --skill cf-tdd
Clone the repo
git clone --depth 1 https://github.com/dinhanhthi/coding-friend

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 cf-tdd

README.md
[![agentmods](https://agentmods.dev/badge/skills/dinhanhthi/coding-friend/cf-tdd/github.svg)](https://agentmods.dev/skills/dinhanhthi/coding-friend/cf-tdd)
Your own site
<a href="https://agentmods.dev/skills/dinhanhthi/coding-friend/cf-tdd"><img src="https://agentmods.dev/badge/skills/dinhanhthi/coding-friend/cf-tdd/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for cf-tdd

Your own site · 80×15
<a href="https://agentmods.dev/skills/dinhanhthi/coding-friend/cf-tdd"><img src="https://agentmods.dev/badge/skills/dinhanhthi/coding-friend/cf-tdd.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 140 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,411 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00140 $0.01411
Opus 5.5 $0.00056 $0.00564
Sonnet 5.5 $0.00028 $0.00282
Haiku 4.5 $0.00014 $0.00141

Measured 1mo ago against content hash 889be763c498, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

cf-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 1mo 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.

plugin-antigravity/skills/cf-tdd/SKILL.md · 124 lines

How it starts

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

Implementation Workflow

Custom Guide

bash "<plugin-root>/lib/load-custom-guide.sh" cf-tdd

If the block above printed anything, apply only the ## Before, ## Rules, and ## After sections; if it shows the raw command instead of output, re-run that exact load-custom-guide.sh fence now.

Mode Detection

Determine the implementation mode BEFORE doing anything else:

  1. Check if the user's invocation or task description contains --add-tests
  2. Check if .coding-friend/config.json exists and has "tdd": true
  3. Check if the user's invocation or task description contains --auto (orthogonal to mode — autopilot can combine with both Direct and TDD mode).

Result:

  • --add-tests present OR tdd: true in config → TDD mode. Show: > TDD mode enabled — RED → GREEN → REFACTOR. → TDD mode: Read <plugin-root>/skills/cf-tdd/modes/tdd-mode.md now and follow RED→GREEN→REFACTOR.
  • Neither → Direct mode (default). Show: > Direct mode — implementing without new tests
  • Additionally, if --auto is present → Autopilot active. Show: > 🤖 Autopilot enabled — will auto-review, auto-fix Critical+Important, and auto-commit after implementation.

Skip Conditions

Check these BEFORE starting. If a skip condition is met, bypass the workflow entirely and proceed directly to implementation.

Auto-skip whitelist

If ALL changed/new files match these extensions, skip entirely — note why and proceed:

  • Styles: .css, .scss, .sass, .less, .styl
  • Docs: .md, .mdx, .txt, .rst
  • Config: .json, .yaml, .yml, .toml, .env, .ini, .lock, .config

--no-tdd flag

Deprecated — direct mode is now the default. If present, acknowledge and proceed in direct mode:

--no-tdd is now the default. Proceeding in direct mode.

--auto flag

Note: --auto enables the Autopilot Post-Implementation Loop. It does NOT change the implementation mode itself. → When --auto is active, Read <plugin-root>/skills/cf-tdd/modes/autopilot-loop.md now and run that loop instead of the standard Review Reminder.

Read the full file on GitHub · 124 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 1mo ago Changed 889be763c498
  2. 1mo ago Changed · -50 lines · +4 tokens per session 85f65ca2bd52
  3. 1mo ago First seen · 174 lines · 136 tokens per session scan A 95326fcc6b97

Subscribe to this mod's changes

cf-tdd is a skill published in the GitHub repository dinhanhthi/coding-friend (4 stars, last pushed 2d ago), licensed MIT. It adds 140 tokens to every session and 1,411 once invoked, about $0.0006 per session on Opus 5.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

skillshare-implement-feature

Implement a feature from a spec file or description using TDD workflow. Use this skill whenever the user asks to: add a new CLI command, implement a feature from a spec, build new functionality, add a flag, create a new internal package, or write Go code for skillshare. This skill enforces test-first development…

runkids/skillshare · 114 tokens

implement

Implement a technical design by decomposing it into dependency-ordered vertical slices, executing each with TDD red-green, reviewing each via an isolated sub-agent, and persisting progress to a state file so work survives session restarts. Use when the user has a tech design (doc or settled conversation) and says…

open-octo/octo-agent · 97 tokens

repro-first

Bug-fix mode that reproduces a bug in a failing test before changing any code. Entered with /repro-first.

edonadei/caliper · 30 tokens

writing-skills

Use when creating new skills, editing existing skills, or verifying skills work before deployment.

oyi77/1ai-skills · 20 tokens

testing-expert

Ultimate Kotlin testing skill. Use this whenever writing, reviewing, or debugging ANY Kotlin test — unit, integration, property-based, or coroutine. Covers TDD (RED/GREEN/REFACTOR), Kotest + MockK + Kover, anti-pattern detection, and four-pillar quality framework. Triggers on: write a test, add coverage, why is this…

JosephSanjaya/skills · 115 tokens

test-driven-development

TDD workflow — Red, Green, Refactor cycle with practical examples.

furkangonel/cowrangler · 19 tokens