cf-tdd

cf-tdd is a skill for Claude Code from dinhanhthi/coding-friend. It costs 136 tokens per session (1,869 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.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is **CLI Requirement:** NONE — Works without `coding-friend-cli`. See [CLI requirements](../../../docs/cli-requirements.md) for the full matrix..

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

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

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

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.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.svg" alt="Measured on agentmods" height="20"></a>
Per session 136 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,869 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.00136 $0.01869
Opus 5 $0.00068 $0.00934
Sonnet 5 $0.00027 $0.00374
Haiku 4.5 $0.00014 $0.00187

Measured 7d ago against content hash 95326fcc6b97, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-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 7d 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 · 174 lines

How it starts

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

Implementation Workflow

CLI Requirement: NONE — Works without coding-friend-cli. See CLI requirements for the full matrix.

Custom Guide

Custom guide — auto-loaded below (if the raw command shows instead of its output, run it yourself):

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

If output is not empty, integrate returned sections: ## Before → before first step, ## Rules → apply throughout, ## After → after final step.

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.

Read the full file on GitHub · 174 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. 7d 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 (3 stars, last pushed yesterday), licensed MIT. It adds 136 tokens to every session and 1,869 once invoked, about $0.0007 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

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

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

testing

Test writing SOP for unit, integration, and e2e tests (TDD) plus exploratory QA for web apps — find bugs, gather evidence, write reports.

furkangonel/cowrangler · 35 tokens