test-driven-development

A strict test-first development method: write a failing test, add the smallest code that passes it, then clean up the code. TDD means test-driven development.

In plain words
What is it for?
Testing signing and verification, duplicate-event handling, retries, ordering, replay, metering, and bug fixes before implementing or changing the behavior.
Why use it?
It catches behavior changes and regressions early, including failures on unusual or invalid inputs. It is aimed at correctness-critical Webhook.co code.

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/webhook-co/webhook/test-driven-development
Any agent
npx skills add webhook-co/webhook --skill test-driven-development
Clone the repo
git clone --depth 1 https://github.com/webhook-co/webhook

Made for: Claude Code, Codex, Cursor.

Per session 54 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 706 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.00054 $0.00706
Opus 5 $0.00027 $0.00353
Sonnet 5 $0.00011 $0.00141
Haiku 4.5 $0.00005 $0.00071

Measured yesterday against content hash 38d83e17e6c6, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

test-driven-development 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 yesterday.

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/test-driven-development/SKILL.md · 57 lines

How it starts

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

Test-driven development

Write the test first, watch it fail, then make it pass. This is how the correctness-critical paths here stay correct: Standard Webhooks signing/verification (send + receive), dedup/idempotency, retry/ backoff (DO Alarms), FIFO ordering (one DO per endpoint), replay-to-localhost, and single-dimension metering.

The loop (don't skip a step)

  1. Red — write a failing test. Capture the desired behavior as a test before touching implementation. Assert the right outcome (status code, ordering, exactly-once effect), not just that code runs. Run it and watch it fail for the expected reason. A test that passes immediately, or fails for the wrong reason, isn't testing what you think.
  2. Green — minimum code to pass. Write the least implementation that makes the test pass. No gold-plating, no unrelated changes.
  3. Refactor — clean up under green. With the test green, improve names, structure, and duplication. Re-run; stay green.

Every bug fix starts with a regression test that fails without the fix. No behavior change lands without a test that exercises it, including the unhappy path.

What to cover

  • Boundary validation of all external input (webhook bodies, API params, MCP tool input).
  • Edge cases: malformed/oversized payloads, duplicate deliveries, out-of-order events, clock skew, partial failures, retries to exhaustion, replay idempotency, signature mismatch/expiry.
  • Retryable-vs-terminal failure distinction, so the retry scheduler does the right thing.
  • Prefer vitest with the Cloudflare Workers pool for DO/Workers code so tests run against the real runtime.

The gate is non-negotiable

This ties directly to the repo's no-skipped-tests rule and coverage thresholds:

  • Never add .only / fdescribe / it.only / describe.only, and never .skip / disable a test to get green. The no-skipped-tests check (wired into lint and CI) exists precisely to stop that.
  • Never lower a coverage threshold to make a build pass.
  • Never git commit --no-verify / git push --no-verify. If the pre-commit/lint-staged hook fails, fix the root cause and make a new commit. Local hooks are a convenience; CI required checks are the real gate and have no bypass for anyone, including admins.

Read the full file on GitHub · 57 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. yesterday First seen · 57 lines · 54 tokens per session scan A 38d83e17e6c6

Subscribe to this mod's changes

test-driven-development is a skill published in the GitHub repository webhook-co/webhook (0 stars, last pushed 6d ago), licensed Apache-2.0. It adds 54 tokens to every session and 706 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

update-saasmail

Sync the local saasmail repo with the latest upstream changes from https://github.com/choyiny/saasmail. Use this skill whenever the user wants to update saasmail, pull upstream changes, sync with upstream, rebase on upstream, get the latest saasmail, or says "/update-saasmail". Handles adding the upstream remote if…

choyiny/saasmail · 105 tokens

story-html-publisher

Final step of the AI Storybook pipeline. Consolidates the scenes, images, and per-scene audio into ONE self-contained HTML storybook — a swipe/tap player with every image and audio clip embedded as base64 so the single file works offline and can be shared as-is. Reads {slug}scenes.json, {slug}images.json, and…

hassancs91/claude-image-generation · 207 tokens

github-code-review

Comprehensive GitHub code review with AI-powered swarm coordination.

aegntic/cldcde · 15 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…

aegntic/cldcde · 61 tokens

sparc-methodology

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

aegntic/cldcde · 29 tokens

Skill Builder

Create new Claude Code Skills with proper YAML frontmatter, progressive disclosure structure, and complete directory organization. Use when you need to build custom skills for specific workflows, generate skill templates, or understand the Claude Skills specification.

aegntic/cldcde · 46 tokens