tdd

tdd is a skill for Claude Code from Avalon-27reg/smyslokod-starter. It costs 65 tokens per session (952 once invoked), scanned A, original, MIT.

A test-first coding workflow for functions and business rules with clear inputs and outputs. It follows TDD, or Test-Driven Development: write a failing test, make it pass, then improve the code.

In plain words
What is it for?
Use it when building calculators, validators, parsers, converters, or rules for prices, discounts, limits, and access. It can also guide fixes for bugs that can be reproduced.
Why use it?
It reduces the risk of writing untested logic and helps catch reproducible bugs or regressions during refactoring. It is not intended for UI work, throwaway scripts, simple configuration changes, or unclear external API integrations.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

Good fit Use it when building calculators, validators, parsers, converters, or rules for prices, discounts, limits, and access. It can also guide fixes for bugs that can be reproduced.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/avalon-27reg/smyslokod-starter/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 Avalon-27reg/smyslokod-starter --skill tdd
Clone the repo
git clone --depth 1 https://github.com/Avalon-27reg/smyslokod-starter

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 tdd

README.md
[![agentmods](https://agentmods.dev/badge/skills/avalon-27reg/smyslokod-starter/tdd/github.svg)](https://agentmods.dev/skills/avalon-27reg/smyslokod-starter/tdd)
Your own site
<a href="https://agentmods.dev/skills/avalon-27reg/smyslokod-starter/tdd"><img src="https://agentmods.dev/badge/skills/avalon-27reg/smyslokod-starter/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/avalon-27reg/smyslokod-starter/tdd"><img src="https://agentmods.dev/badge/skills/avalon-27reg/smyslokod-starter/tdd.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 65 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 952 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.00065 $0.00952
Opus 5 $0.00032 $0.00476
Sonnet 5 $0.00013 $0.00190
Haiku 4.5 $0.00006 $0.00095

Measured 12d ago against content hash 70acefe5c0c7, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, 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 12d 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.

.claude/skills/tdd/SKILL.md · 78 lines

How it starts

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

Skill: tdd

Test-Driven Development по циклу Red → Green → Refactor. Не догма, а инструмент: применяй где это реально ускоряет, а не где «положено».

Когда применять

Любое из:

  • Новая чистая функция (вход → выход) — расчёт, валидатор, парсер, конвертер.
  • Бизнес-логика с понятными правилами (скидки, цены, лимиты, доступы).
  • Багфикс воспроизводимого бага (см. также скилл diagnose).
  • Часть кода, которую планируем рефакторить — тесты страхуют.

Когда НЕ применять

  • UI-компонент, где визуал важнее логики (используй ручную проверку + Playwright позже).
  • Прототип / разовый скрипт, который выкинут через час.
  • Интеграция с внешним API без чёткого контракта (сначала разведка, потом тесты).
  • Простая правка конфига или копи.

Цикл (Red → Green → Refactor)

Шаг 1 — Red (тест падает)

  • Назови ожидание словами: «при входе X должно получиться Y».
  • Напиши один тест, который проверяет это ожидание. Не пять сразу.
  • Запусти тест → должен упасть. Если не упал — тест неверный (что-то проверяет случайно).
  • Если тест падает с «module not found» / «is not a function» — это нормально, это «red».

Шаг 2 — Green (минимальная реализация)

  • Напиши минимальный код, чтобы тест прошёл.
  • Допускается «прибить гвоздями» (захардкодить ответ), если это самое простое.
  • Цель этого шага не «красивый код», а «тест зелёный».
  • Запусти все тесты — все зелёные.

Шаг 3 — Refactor (улучшаем без потери зелёного)

  • Убрать дублирование, дать осмысленные имена, разбить на функции.
  • После каждого изменения — прогнать тесты.
  • Если тесты красные — откатываемся, переделываем меньшими шагами.

Шаг 4 — Следующий случай

  • Добавь следующий тест: edge case, граница, пустой вход, ошибка.
  • Снова Red → Green → Refactor.

Какие тесты писать в первую очередь

Порядок приоритета:

  1. Happy path — типичный вход → ожидаемый выход.
  2. Граничные значения — 0, 1, пустая строка, последний день месяца.
  3. Ошибки — неверный тип, отрицательное число, null.
  4. Регрессии — для каждого пойманного бага — тест, который его ловит.

Read the full file on GitHub · 78 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. 12d ago First seen · 78 lines · 65 tokens per session scan A 70acefe5c0c7

Subscribe to this mod's changes

tdd is a skill published in the GitHub repository Avalon-27reg/smyslokod-starter (1 stars, last pushed 4mo ago), licensed MIT. It adds 65 tokens to every session and 952 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

sparc-methodology

SPARC (Specification, Pseudocode, Architecture, Refinement, Completion) comprehensive development methodology with multi-agent orchestration.

ruvnet/RuView · 29 tokens

tdd

Test-driven development with red-green-refactor loops around vertical slices (tracer bullets), not horizontal layers. Use when asked to "use TDD", "write test-first", "red-green-refactor", "build this with tests", or when a feature has a clear observable contract. The discipline complement to the test/add-tests skills…

open-gsd/gsd-pi · 73 tokens

test-first-bugs

Enforces a test-driven bug-fixing workflow. Use when a user reports a bug, failing code, an error, or asks to fix something.

jamditis/claude-skills-journalism · 35 tokens

building

Implementation skill for writing production code with TDD. Covers the RED-GREEN-REFACTOR cycle, false-RED detection, vertical slicing, scope escalation, test process discipline, and code generation patterns. Loaded by component-builder and bug-investigator.

romiluz13/cc10x · 53 tokens

08-debug

Reproduce and fix a known bug, or find an unknown root cause by hypothesis validation. Use when the user wants to fix a bug, find why something breaks, or reopen a stuck investigation. Not for building a feature or reviewing a diff.

ai-driven-dev/framework · 52 tokens

nl-to-constraints

Transforms natural language requirements (user stories, verbal descriptions, business rules) into formal specifications and constraints. Use when converting informal requirements into structured, testable specifications with explicit constraints. Outputs in multiple formats including BDD-style Given-When-Then, JSON…

ArabelaTso/Skills-4-SE · 64 tokens