tdd

tdd is a skill for Claude Code, Codex from Prismer-AI/PrismerCloud. It costs 33 tokens per session (1,049 once invoked), scanned A, a copy of tdd, MIT.

A guide for test-driven development, or TDD: writing a test that fails, adding code to make it pass, and then improving the code. It focuses on tests that check public behavior rather than internal implementation details.

In plain words
What is it for?
Use it to build features or fix defects test-first, follow the red-green-refactor cycle, and write integration-style tests through public interfaces.
Why use it?
It helps catch regressions while building features or fixing bugs and keeps tests useful when the code is reorganized. It also makes the intended behavior explicit before production code is changed.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to build features or fix defects test-first, follow the red-green-refactor cycle, and write integration-style tests through public interfaces.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/prismer-ai/prismercloud/tdd
About the project

Prismer Cloud is an infrastructure layer for AI agents that provides shared learning, compressed context, persistent memory, collaboration, messaging, tasks, identity, and workspaces. It is for agents and the people building or using long-running agent systems that need information and outcomes to persist across sessions. The catalogue entries provide skills, hooks, agents, instructions, and a plugin for using Prismer Cloud.

Prismer-AI/PrismerCloud · 1,384 stars · on GitHub · prismer.cloud

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 Prismer-AI/PrismerCloud --skill tdd
Clone the repo
git clone --depth 1 https://github.com/Prismer-AI/PrismerCloud

Made for: Claude Code, Codex.

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 tdd

README.md
[![agentmods](https://agentmods.dev/badge/skills/prismer-ai/prismercloud/tdd/github.svg)](https://agentmods.dev/skills/prismer-ai/prismercloud/tdd)
Your own site
<a href="https://agentmods.dev/skills/prismer-ai/prismercloud/tdd"><img src="https://agentmods.dev/badge/skills/prismer-ai/prismercloud/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 tdd

Your own site · 80×15
<a href="https://agentmods.dev/skills/prismer-ai/prismercloud/tdd"><img src="https://agentmods.dev/badge/skills/prismer-ai/prismercloud/tdd.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 33 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,049 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 89% copy Near-identical to another mod 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.00033 $0.01049
Opus 5.5 $0.00013 $0.00420
Sonnet 5.5 $0.00007 $0.00210
Haiku 4.5 $0.00003 $0.00105

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

Security

Grade A, and why

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 18d 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.

Origin

This is a copy

89% identical to tdd — 9 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

sdk/cloud/catalog/skills/tdd/SKILL.md · 118 lines

How it starts

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

For additional red/green examples, read references/test-driven-development/GUIDE.md. Use the repository's test runner and verify the failing assertion before changing production code. Treat upstream tool names and repository paths as examples, not available tools or bundled files.

Test-Driven Development

Philosophy

Core principle: Tests should verify behavior through public interfaces, not implementation details. Code can change entirely; tests shouldn't.

Good tests are integration-style: they exercise real code paths through public APIs. They describe what the system does, not how it does it. A good test reads like a specification - "user can checkout with valid cart" tells you exactly what capability exists. These tests survive refactors because they don't care about internal structure.

Bad tests are coupled to implementation. They mock internal collaborators, test private methods, or verify through external means (like querying a database directly instead of using the interface). The warning sign: your test breaks when you refactor, but behavior hasn't changed. If you rename an internal function and tests fail, those tests were testing implementation, not behavior.

See tests.md for examples and mocking.md for mocking guidelines.

Anti-Pattern: Horizontal Slices

DO NOT write all tests first, then all implementation. This is "horizontal slicing" - treating RED as "write all tests" and GREEN as "write all code."

This produces crap tests:

  • Tests written in bulk test imagined behavior, not actual behavior
  • You end up testing the shape of things (data structures, function signatures) rather than user-facing behavior
  • Tests become insensitive to real changes - they pass when behavior breaks, fail when behavior is fine
  • You outrun your headlights, committing to test structure before understanding the implementation

Correct approach: Vertical slices via tracer bullets. One test → one implementation → repeat. Each test responds to what you learned from the previous cycle. Because you just wrote the code, you know exactly what behavior matters and how to verify it.

Read the full file on GitHub · 118 lines

Files

What ships with it

8 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. 18d ago First seen · 118 lines · 33 tokens per session scan A 1d2f8061f0e5

Subscribe to this mod's changes

tdd is a skill published in the GitHub repository Prismer-AI/PrismerCloud (1,384 stars, last pushed 2d ago), licensed MIT. It adds 33 tokens to every session and 1,049 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 89% identical to tdd, differing in 9 lines, and is treated as a copy.

Related

Other skills, from other repositories

implementation-task

Execute one issue-sized task with tests and handoff.

rebel0789/Memory-Recall · 0 tokens

Pair Programming

AI-assisted pair programming with multiple modes (driver/navigator/switch), real-time verification, quality monitoring, and comprehensive testing. Supports TDD, debugging, refactoring, and learning sessions. Features automatic role switching, continuous code review, security scanning, and performance optimization with…

jazz-max/ruflo-hub · 61 tokens

test-driven-development

Drives development with tests using the red-green-refactor loop. Use when implementing any logic, fixing any bug, or changing any behavior. Use when you need to prove that code works, when a bug report arrives, or when you're about to modify existing functionality. Use when asked to add tests to a function, fix a bug…

addyosmani/agent-skills · 92 tokens

bad-case-to-dpo

A guide to turning failed production agent runs into training and evaluation data. It explains how to find the first mistake, create preference examples for DPO (Direct Preference Optimization), and check that a fix does not damage other tasks.

bojieli/ai-agent-book · 168 tokens

test-driven-development

Test-driven development, or TDD, is a way to build software by writing a test that fails, adding the smallest code that makes it pass, and then cleaning up the code. These instructions require that process for features, bug fixes, refactors, and behavior changes.

jnMetaCode/superpowers-zh · 20 tokens

JavaScript Testing Patterns

Modern JavaScript testing strategies with Jest, Mocha, and testing best practices covering unit testing, integration testing, mocking, async patterns, and DOM testing.

PramodDutta/qaskills · 36 tokens