tdd-workflow

tdd-workflow is a skill for Claude Code, Codex, Cursor from jy315189/everything-cursor. It costs 0 tokens per session (2,672 once invoked), scanned A, original, MIT.

A Test-Driven Development guide. TDD means writing a failing test first, adding the smallest code that passes it, and then improving the code.

In plain words
What is it for?
Use it when building features, fixing bugs, writing or reviewing tests, discussing testing strategy, or setting up test infrastructure.
Why use it?
It gives feature work and bug fixes a repeatable testing process and helps tests shape the design.

Skill for Claude CodeCodexCursor

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

Made for: Claude Code, Codex, Cursor.

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-workflow

README.md
[![agentmods](https://agentmods.dev/badge/skills/jy315189/everything-cursor/tdd-workflow.svg)](https://agentmods.dev/skills/jy315189/everything-cursor/tdd-workflow)
Your own site
<a href="https://agentmods.dev/skills/jy315189/everything-cursor/tdd-workflow"><img src="https://agentmods.dev/badge/skills/jy315189/everything-cursor/tdd-workflow.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,672 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.1 $0.00000 $0.02672
Opus 5 $0.00000 $0.01336
Sonnet 5 $0.00000 $0.00534
Haiku 4.5 $0.00000 $0.00267

Measured 5d ago against content hash 0de8a5c96443, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

tdd-workflow 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 5d 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.

.cursor/skills/tdd-workflow/SKILL.md · 375 lines

How it starts

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

TDD Workflow Skill

Test-Driven Development methodology with advanced patterns for real-world applications.

When to Use

Activate this skill when:

  • Implementing new features or fixing bugs
  • Writing or reviewing tests
  • Discussing testing strategy
  • Setting up test infrastructure

1. The TDD Cycle

┌─────────────────────────────────────────────────────────┐
│                                                         │
│   1. RED    — Write a test that FAILS                   │
│   2. GREEN  — Write MINIMAL code to PASS                │
│   3. REFACTOR — Improve code, keep tests GREEN          │
│   4. REPEAT — Next requirement                          │
│                                                         │
│   Key insight: Tests drive DESIGN, not just correctness │
│                                                         │
└─────────────────────────────────────────────────────────┘

Step 0: Define the Interface FIRST

// Before writing any test, define WHAT you're building
// This is your contract — tests verify the contract

interface OrderService {
  createOrder(input: CreateOrderInput): Promise<Result<Order>>
  getOrder(id: string): Promise<Result<Order>>
  cancelOrder(id: string, reason: string): Promise<Result<void>>
}

interface CreateOrderInput {
  userId: string
  items: Array<{ productId: string; quantity: number }>
  shippingAddress: Address
}

interface Order {
  id: string
  userId: string
  items: OrderItem[]
  status: OrderStatus
  total: number
  createdAt: Date
}

type OrderStatus = 'pending' | 'confirmed' | 'shipped' | 'delivered' | 'cancelled'

Step 1: RED — Write a Failing Test

describe('OrderService', () => {
  let service: OrderService
  let mockProductRepo: MockProductRepository
  let mockOrderRepo: MockOrderRepository

  beforeEach(() => {
    mockProductRepo = createMockProductRepo()
    mockOrderRepo = createMockOrderRepo()
    service = new OrderServiceImpl(mockOrderRepo, mockProductRepo)
  })

  describe('createOrder', () => {
    it('creates order with valid items and calculates total', async () => {
      // Arrange
      mockProductRepo.findById.mockResolvedValueOnce({ id: 'p1', price: 29.99, stock: 10 })
      mockProductRepo.findById.mockResolvedValueOnce({ id: 'p2', price: 49.99, stock: 5 })

      const input: CreateOrderInput = {
        userId: 'user-1',
        items: [
          { productId: 'p1', quantity: 2 },
          { productId: 'p2', quantity: 1 },
        ],
        shippingAddress: { street: '123 Main St', city: 'NYC', zip: '10001' },
      }

      // Act
      const result = await service.createOrder(input)

      // Assert
      expect(result.success).toBe(true)
      if (result.success) {
        expect(result.data.total).toBe(109.97)  // 29.99*2 + 49.99*1
        expect(result.data.status).toBe('pending')
        expect(result.data.items).toHaveLength(2)
      }
    })

    it('rejects order when product is out of stock', async () => {
      mockProductRepo.findById.mockResolvedValue({ id: 'p1', price: 10, stock: 0 })

      const result = await service.createOrder({
        userId: 'user-1',
        items: [{ productId: 'p1', quantity: 1 }],
        shippingAddress: validAddress,
      })

      expect(result.success).toBe(false)
      if (!result.success) {
        expect(result.error).toContain('out of stock')
      }
    })

    it('rejects order with empty items', async () => {
      const result = await service.createOrder({
        userId: 'user-1',
        items: [],
        shippingAddress: validAddress,
      })

      expect(result.success).toBe(false)
    })
  })
})

Read the full file on GitHub · 375 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. 5d ago First seen · 375 lines · 0 tokens per session scan A 0de8a5c96443

Subscribe to this mod's changes

tdd-workflow is a skill published in the GitHub repository jy315189/everything-cursor (2 stars, last pushed 6mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,672 tokens. 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.