tdd-implementation

A test-driven development guide for making code changes. TDD means writing a test that fails first, adding the smallest code that makes it pass, then cleaning up the code.

In plain words
What is it for?
Use it for new behavior, bug fixes, and revisions after review. It covers testing through public interfaces such as service methods, API routes, command-line commands, and rendered output.
Why use it?
It checks that a test can detect the missing or broken behavior before the fix is written. This helps prevent code that passes tests which never proved they could catch the problem.

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/bartoszarendt/agenticloop/tdd-implementation
Any agent
npx skills add bartoszarendt/agenticloop --skill tdd-implementation
Clone the repo
git clone --depth 1 https://github.com/bartoszarendt/agenticloop

Made for: Claude Code, Codex.

Per session 64 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 773 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.00064 $0.00773
Opus 5 $0.00032 $0.00387
Sonnet 5 $0.00013 $0.00155
Haiku 4.5 $0.00006 $0.00077

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

Security

Grade A, and why

tdd-implementation 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.

skills/tdd-implementation/SKILL.md · 87 lines

How it starts

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

TDD implementation

No production code without a failing test or failing check first when behavior changes. A test written after the code passes immediately and proves little: it never demonstrated that it can catch the missing behavior.

The cycle

  1. RED: write one minimal test or check for the next required behavior from the task record.
  2. Verify RED: run it and confirm it fails for the expected reason.
  3. GREEN: write the smallest production change that passes.
  4. Verify GREEN: run the focused check, then the task's Required Checks.
  5. REFACTOR: clean names and duplication while everything is green.

Keep the RED output. The implementation summary needs it under [[verification-evidence]].

For bugfixes, RED is the reproduction of the bug. For review revisions, RED covers the gap identified by [[review-and-accept]].

If production code already exists before its test, temporarily disable or revert the behavior, watch the new test fail, then restore the behavior. Otherwise the test is unverified.

Test through a public seam

Use the highest useful public interface that exercises the behavior:

  • service or repository method,
  • API route,
  • CLI command,
  • rendered component,
  • user-facing workflow.

Assert observable behavior, not private helper calls or internal fields. Prefer real collaborators over mocks where practical.

Vertical slices

Do not write a batch of imagined tests and then a batch of implementation. Run one behavior at a time:

RED -> GREEN -> REFACTOR
RED -> GREEN -> REFACTOR

Horizontal slicing hides which behavior is actually being built and encourages brittle tests.

Scaffold and infra tasks

Some tasks have no unit-testable behavior. The principle still applies through the Required Checks:

  • config validation,
  • lint/typecheck,
  • smoke command,
  • migration dry run,
  • package/build command.

If a task is genuinely unverifiable, say so under Known Limitations. Do not write fake tests just to satisfy a checklist.

Read the full file on GitHub · 87 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 · 87 lines · 64 tokens per session scan A 6c362aae1e40

Subscribe to this mod's changes

tdd-implementation is a skill published in the GitHub repository bartoszarendt/agenticloop (2 stars, last pushed 12d ago), licensed MIT. It adds 64 tokens to every session and 773 once invoked, about $0.0003 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

skill-creator

Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.

bytedance/deer-flow · 64 tokens

consulting-analysis

Use this skill when the user requests to generate, create, or write professional research reports including but not limited to market analysis, consumer insights, brand analysis, financial analysis, industry research, competitive intelligence, investment due diligence, or any consulting-grade analytical report. This…

bytedance/deer-flow · 110 tokens

ppt-generation

Use this skill when the user requests to generate, create, or make presentations (PPT/PPTX). Creates visually rich slides by generating images for each slide and composing them into a PowerPoint file.

bytedance/deer-flow · 44 tokens

deerflow-maintainer-orchestrator

Use when a DeerFlow maintainer needs comment-only GitHub issue or PR handling: resolve issue/PR scopes with gh, analyze issues, post or draft issue comments, perform PR review comments, review PR or issue batches, compare competing PRs that target the same issue, give fix strategy, risk classification, and validation…

bytedance/deer-flow · 88 tokens

systematic-literature-review

Use this skill when the user wants a systematic literature review, survey, or synthesis across multiple academic papers on a topic. Also covers annotated bibliographies and cross-paper comparisons. Searches arXiv and outputs reports in APA, IEEE, or BibTeX format. Not for single-paper tasks — use academic-paper-review…

bytedance/deer-flow · 73 tokens

academic-paper-review

Use this skill when the user requests to review, analyze, critique, or summarize academic papers, research articles, preprints, or scientific publications. Supports comprehensive structured reviews covering methodology assessment, contribution evaluation, literature positioning, and constructive feedback generation.…

bytedance/deer-flow · 95 tokens