tdd-with-agents

tdd-with-agents is a skill for Claude Code from ils15/pantheon-legacy. It costs 32 tokens per session (1,096 once invoked), scanned A, original, MIT.

A test-driven development guide that follows the RED, GREEN, REFACTOR cycle: write a failing test, make it pass, then improve the code.

In plain words
What is it for?
Applying test-first development to backend, API, database, integration, load, mutation, and contract testing.
Why use it?
It helps catch incorrect assumptions early and keeps code changes backed by tests. TDD means writing tests before the implementation.

Skill for Claude Code

Written for Claude Code: context: fork in frontmatter.

Good fit Applying test-first development to backend, API, database, integration, load, mutation, and contract testing.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ils15/pantheon-legacy/tdd-with-agents
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 ils15/pantheon-legacy --skill tdd-with-agents
Clone the repo
git clone --depth 1 https://github.com/ils15/pantheon-legacy

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-with-agents

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/ils15/pantheon-legacy/tdd-with-agents"><img src="https://agentmods.dev/badge/skills/ils15/pantheon-legacy/tdd-with-agents.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 32 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,096 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00032 $0.01096
Opus 5 $0.00016 $0.00548
Sonnet 5 $0.00006 $0.00219
Haiku 4.5 $0.00003 $0.00110

Measured 8d ago against content hash 9880919a46b7, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

tdd-with-agents 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 8d 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.

.clinerules/skills/tdd-with-agents/SKILL.md · 171 lines

How it starts

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

TDD with Agents

Enforce RED → GREEN → REFACTOR cycle across all implementation agents. Includes advanced testing patterns for E2E, load, mutation, and contract testing.


Core Principle

Write the test FIRST. Watch it fail. Write minimal code to pass. Refactor with confidence.


TDD Cycle (RED → GREEN → REFACTOR)

RED — Write Failing Test

  • Write test for the behavior you want
  • Run it → must fail (confirms test works)
  • Test should be specific: one assertion per test

GREEN — Make It Pass

  • Write minimal code to pass the test
  • No extra features, no premature optimization
  • If it feels hard → design problem; refactor test

REFACTOR — Improve Without Breaking

  • Clean up code while tests stay green
  • Extract functions, rename, remove duplication
  • Tests are your safety net

Testing by Layer

Backend (Hermes)

# Unit: service logic
def test_calculate_discount_applies_percentage():
    result = calculate_discount(100, 10)
    assert result == 90.0

# Integration: API endpoint
def test_get_user_returns_404_for_missing():
    response = client.get("/users/nonexistent")
    assert response.status_code == 404

# Database: repository
def test_user_repository_saves_and_retrieves():
    repo.save(User(id="1", name="Test"))
    assert repo.find("1").name == "Test"

Frontend (Aphrodite)

// Test behavior, not implementation
test('shows error message on invalid form', async () => {
  render(<LoginForm />)
  await userEvent.click(screen.getByText('Submit'))
  expect(screen.getByText('Email is required')).toBeInTheDocument()
})

Database (Demeter)

def test_migration_creates_users_table():
    alembic upgrade(head)
    assert inspector.has_table('users')

def test_migration_rollback_drops_table():
    alembic upgrade(head)
    alembic downgrade(-1)
    assert not inspector.has_table('users')

Advanced Testing Patterns

E2E Testing (Playwright)

test('user can complete full signup flow', async ({ page }) => {
  await page.goto('/signup')
  await page.fill('[name="email"]', '[email protected]')
  await page.fill('[name="password"]', 'secure123')
  await page.click('button[type="submit"]')
  await expect(page.locator('.welcome-banner')).toBeVisible()
})

Read the full file on GitHub · 171 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. 8d ago First seen · 171 lines · 32 tokens per session scan A 9880919a46b7

Subscribe to this mod's changes

tdd-with-agents is a skill published in the GitHub repository ils15/pantheon-legacy (10 stars, last pushed 8d ago), licensed MIT. It adds 32 tokens to every session and 1,096 once invoked, about $0.0002 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-09-03.