Official agent skill

TDD Bug Fix

by cursor in cursor/plugins

Fixes a bug with a failing regression test first when a cheap, focused test path exists, and falls back to the closest practical check when it does not.

OfficialNo licenceAuto-check passedTesting & QA

Install TDD Bug Fix

skills CLI
$ npx skills add cursor/plugins --skill tdd -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install cursor/plugins tdd --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/cursor/plugins.git skills-src && mkdir -p .claude/skills && cp -r skills-src/pstack/skills/tdd .claude/skills/tdd && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
tdd
GitHub stars
10k
Used in
8 other repos
Token cost
~786 tokens
SKILL.md length
430 words
Files
1
Skills in repo
99
Repo updated
First seen
Licence
None found

At a glance

Fixes a bug with a failing regression test first when a cheap, focused test path exists, and falls back to the closest practical check when it does not.

  • Works in 6 steps: Understand the bug. Identify the… → Choose the narrowest executable check.… → Write the failing test first. Add the… → …
  • Fixing a bug that has a clear, cheap unit or component test target
  • SKILL.md covers Workflow, If a Failing Test Is Impractical, Guardrails and Final Response
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

The skill is selective. It applies when you ask for TDD, a failing test or a regression test, or when a bug has an obvious inexpensive local test target, and it is skipped when the test path is unclear, costly or integration-heavy. The agent pins down intended behavior, current behavior and the smallest reproduction, picks the narrowest executable check already used for that code, and writes the smallest test that would have caught the bug.

It runs that test before touching the implementation to confirm it fails for the intended reason, makes the smallest production change, and reruns the test. When a failing test would need heavy harness setup, brittle mocks or production-only state, the agent uses a targeted script, a manual reproduction, browser automation, a snapshot comparison or a log assertion. A new test is better skipped than bad. Guardrails forbid editing tests to fit a wrong implementation or weakening assertions without a clear reason.

When your agent uses it

  • Fixing a bug that has a clear, cheap unit or component test target
  • You ask for a failing test or regression test before the fix
  • Making a flaky bug deterministic so its test locks in the signal

Example prompts

  • “Fix the rounding bug in the invoice total and add a regression test first.”
  • “Use TDD to fix the date formatter returning the wrong month on the first day.”
  • “Reproduce this pagination bug with a failing test before changing any code.”

Requirements

  • A project with a test runner the agent can execute

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Understand the bug. Identify the intended behavior, current behavior, affected path, and smallest observable reproduction.
  2. Choose the narrowest executable check. Prefer the closest unit, component, integration, or regression test already used for that codepath…
  3. Write the failing test first. Add the smallest focused test that would have caught the bug. The test should encode intended behavior, not…
  4. Run the new test before fixing. Confirm it fails for the intended reason. If it passes or fails for an unrelated reason, correct the test…
  5. Fix the bug. Make the smallest production change that satisfies the intended behavior while preserving nearby contracts.
  6. Rerun the regression test. Confirm the test now passes.

What it can do on your machine

Read from SKILL.md and the folder at commit 9f451cf. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

TDD Bug Fix loads about 786 tokens when it runs. Until then it costs about 57 tokens; SKILL.md has 430 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~57
When it runs · the whole SKILL.md, loaded when a task matches
~786

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

Without a licence we can't republish the file, so here is its outline and opening line. It has 430 words (~786 tokens).

“When fixing a bug with a clear, cheap test path, make the broken behavior executable before changing production code. The goal is a focused regression test that fails before the fix and passes after it.”

— opening of SKILL.md by cursor
name
tdd
disable-model-invocation
true

Read the full SKILL.md on GitHub

Files

Just SKILL.md in pstack/skills/tdd of cursor/plugins.

Open the folder on GitHubat commit 9f451cf

Used in 8 other repositories

We found 8 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 8 other GitHub owners. This page covers the copy in cursor/plugins, which our catalogue first saw on October 7, 2026.

Compare with similar skills

TDD Bug Fix next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

TDD Bug Fix compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
TDD Bug Fix this skillcursor/plugins10k8 repos~786Automated safety check: PassNone
Test Guidelinesgetsentry/sentry-dart873—~3.1kAutomated safety check: PassMIT
Agent Harness Testing Methodologyhuiliyi37/Tianshu-harness1.1k—~1kAutomated safety check: NotesApache-2.0
Opsmill Dev Test Driving Bugsopsmill/infrahub529—~4kAutomated safety check: PassApache-2.0
Bug FixEmeaAppGbb/spec2cloud100—~2kAutomated safety check: PassMIT
Systematic Debuggingforyourhealth111-pixel/Vibe-Skills3.6k—~2.6kAutomated safety check: PassApache-2.0

Similar skills

  • Test Guidelines

    getsentry/sentry-dart

    Official

    Enforce Sentry Dart/Flutter SDK test conventions for naming, structure, and fixtures.

    873 GitHub stars~3.1k tokensUpdated today
    Testing & QAAuto-check passed
  • Agent Harness Testing Methodology

    huiliyi37/Tianshu-harness

    Guides an agent through probing an unfamiliar project's test setup, then choosing a red-light-first testing strategy matched to the task type.

    1.1k GitHub stars~1k tokensUpdated yesterday
    Testing & QAAuto-check: notes
  • Writes a single failing test that reproduces a bug after its root-cause analysis is complete, before any fix is written.

    529 GitHub stars~4k tokensUpdated today
    Testing & QAAuto-check passed
  • Bug Fix

    EmeaAppGbb/spec2cloud

    Lightweight entry point for fixing bugs with full traceability.

    100 GitHub stars~2k tokensUpdated 5 mo ago
    Testing & QAAuto-check passed
  • Systematic Debugging

    foryourhealth111-pixel/Vibe-Skills

    Root-cause route for actual bugs, failing tests, build errors, crashes, stack traces, and unexpected behavior.

    3.6k GitHub stars~2.6k tokensUpdated 1 mo ago
    Testing & QAAuto-check passed
  • Aidd Fix

    paralleldrive/aidd

    Fix a bug or implement review feedback following the AIDD fix process.

    384 GitHub stars~886 tokensUpdated 3 mo ago
    Testing & QAAuto-check passed

More from cursor/plugins

All 99 skills in this repo
  • Official

    Keeps a TSV decision log for long or unattended agent runs, one row per decision with what, why, evidence and result, so a reviewer can check the work later.

    10k GitHub starsUsed in 9 repos~1.6k tokens
    Auto-check passed
  • Official

    Digs into why code is shaped the way it is by checking git history, pull requests and connected tools in parallel, then reporting a cited read on the tradeoffs.

    10k GitHub starsUsed in 9 repos~2.6k tokens
    Auto-check passed
  • Official

    Starts three parallel reviewer subagents over the current conversation transcript, then turns their findings into concrete edits to existing skills.

    10k GitHub starsUsed in 5 repos~1.2k tokens
    Auto-check passed
  • Official

    Applies four layers of technical-writing rules to docs, RFCs, readmes, PR descriptions and commit messages so a tired engineer follows them on the first read.

    10k GitHub starsUsed in 10 repos~2.4k tokens
    Auto-check passed
  • Advisor Mode

    cursor/plugins

    Official

    Adds a second, stronger model that the main agent consults before major decisions, when stuck and before finishing, controlled by /advisor commands.

    10k GitHub stars~2.6k tokensUpdated today
    Auto-check: notes
  • Official

    Prepare PRs for review by cleaning noisy history, improving PR descriptions, and adding reviewer guidance without changing code behavior.

    10k GitHub starsUsed in 3 repos~569 tokens
    Auto-check passed

Questions about TDD Bug Fix

What does TDD Bug Fix do?

Fixes a bug with a failing regression test first when a cheap, focused test path exists, and falls back to the closest practical check when it does not. The skill is selective. It applies when you ask for TDD, a failing test or a regression test, or when a bug has an obvious inexpensive local test target, and it is skipped when the test path is unclear, costly or integration-heavy.

When should I use TDD Bug Fix?

TDD Bug Fix fits situations like: fixing a bug that has a clear, cheap unit or component test target; you ask for a failing test or regression test before the fix; making a flaky bug deterministic so its test locks in the signal.

How do I install TDD Bug Fix in Claude Code?

Run `npx skills add cursor/plugins --skill tdd -a claude-code`. Or copy the skill folder (pstack/skills/tdd in cursor/plugins) into .claude/skills/tdd in your project. Claude Code loads it when a task matches its description.

How do I install TDD Bug Fix in Codex?

Run `npx skills add cursor/plugins --skill tdd -a codex`. Or copy the skill folder (pstack/skills/tdd in cursor/plugins) into .agents/skills/tdd in your project. Codex loads it when a task matches its description.

Can I use TDD Bug Fix in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add cursor/plugins --skill tdd -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/tdd, .gemini/skills/tdd, .github/skills/tdd and .opencode/skills/tdd in your project.

What does TDD Bug Fix need to run?

SKILL.md names no scripts, command-line tools or credentials: TDD Bug Fix is instructions for the agent only. Our summary lists: A project with a test runner the agent can execute.

Does TDD Bug Fix access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is TDD Bug Fix safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does TDD Bug Fix use?

No licence was found for TDD Bug Fix or its repository. Without one, default copyright applies: ask the author before reusing or redistributing it.

How many tokens does TDD Bug Fix use?

About 786 tokens (SKILL.md is roughly 3.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to TDD Bug Fix?

Skills that share tags, products or a category with TDD Bug Fix: Test Guidelines (getsentry/sentry-dart, 873 stars), Agent Harness Testing Methodology (huiliyi37/Tianshu-harness, 1.1k stars), Opsmill Dev Test Driving Bugs (opsmill/infrahub, 529 stars) and Bug Fix (EmeaAppGbb/spec2cloud, 100 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains TDD Bug Fix?

cursor (a GitHub organization, an official publisher) maintains it in cursor/plugins, which has 10,130 GitHub stars. The repository holds 99 skills in this directory. The repository was last updated on October 6, 2026.

Source: cursor/plugins on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.