surgical-tdd

surgical-tdd is a skill for Claude Code from infohata/mind-vault. It costs 48 tokens per session (1,942 once invoked), scanned A, original, Apache-2.0.

A targeted testing workflow for large Python codebases that runs only the specific tests related to a change or failure. TDD means test-driven development; here it refers to writing a regression test, seeing it fail, then confirming it passes after the fix.

In plain words
What is it for?
Use it to run exact pytest or Django test paths, create regression tests for bugs, and iterate quickly in large Python projects.
Why use it?
It avoids waiting for a slow full test suite while debugging a narrow problem. Focused tests give quick feedback, while the broader suite can run in continuous integration.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the mv plugin — 23 skills, 6 commands, 8 agents, 2 hooks shipped together

Good fit Use it to run exact pytest or Django test paths, create regression tests for bugs, and iterate quickly in large Python projects.

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

Made for: Claude Code.

Or install mv, the plugin that ships this one along with the rest of its 23 skills, 6 commands, 8 agents, 2 hooks.

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 surgical-tdd

README.md
[![agentmods](https://agentmods.dev/badge/skills/infohata/mind-vault/surgical-tdd/github.svg)](https://agentmods.dev/skills/infohata/mind-vault/surgical-tdd)
Your own site
<a href="https://agentmods.dev/skills/infohata/mind-vault/surgical-tdd"><img src="https://agentmods.dev/badge/skills/infohata/mind-vault/surgical-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 surgical-tdd

Your own site · 80×15
<a href="https://agentmods.dev/skills/infohata/mind-vault/surgical-tdd"><img src="https://agentmods.dev/badge/skills/infohata/mind-vault/surgical-tdd.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,942 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.00048 $0.01942
Opus 5 $0.00024 $0.00971
Sonnet 5 $0.00010 $0.00388
Haiku 4.5 $0.00005 $0.00194

Measured 12d ago against content hash 6f22a20aa94c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

surgical-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.

skills/surgical-tdd/SKILL.md · 161 lines

How it starts

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

surgical-tdd

Targeted test execution for repos where a full suite takes 10+ minutes. Iterate with pinpoint tests while editing the code; let CI handle broad regression. Pairs with the regression-probe workflow: write the test first, watch it fail in isolation, watch it flip green when the fix lands.

Not a strict TDD framework — the "TDD" in the name refers to the red-green probe loop for reported bugs, not a write-test-first-for-all-code discipline.

When to use

TRIGGER when: Python monolith with 500+ tests; local full-suite runs >2 min; debugging a specific failure or implementing a feature that touches a narrow surface; writing a regression probe for a reported bug.

SKIP for: small repos where the full suite is <30 s (no time saved); first-contribution exploration of an unfamiliar test layout (broader runs teach you the shape); flaky-test triage (surgical runs hide intermittent failures that only appear under parallel contention).

Pattern

1. Verify the exact target before running

Never guess a test name from memory. Grep the source first:

rg "class ShortcutTest\b" path/to/app/tests/
rg "def test_upgrade_pro_to_enterprise\b"

If the target doesn't match anything, the runner happily reports 0 tests collected as a success — silent false green.

✅ DO: Confirm exact class + method name with rg (or grep -rn) before running. ❌ DON'T: Type a test path from memory; a typo passes silently and wastes container spin-up.

2. Run with a fully-qualified target, not a directory

The finer the scope, the tighter the feedback loop.

Django test runner:

make test ARGS="billing.tests.test_models.BillingPlanTest.test_upgrade_pro_to_enterprise"
# or without a Makefile:
python manage.py test billing.tests.test_models.BillingPlanTest.test_upgrade_pro_to_enterprise

Plain pytest (nodeid or keyword):

pytest path/to/app/tests/test_models.py::BillingPlanTest::test_upgrade_pro_to_enterprise
pytest -k "upgrade_pro_to_enterprise"

Read the full file on GitHub · 161 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 · 161 lines · 48 tokens per session scan A 6f22a20aa94c

Subscribe to this mod's changes

surgical-tdd is a skill published in the GitHub repository infohata/mind-vault (2 stars, last pushed 3d ago), licensed Apache-2.0. It adds 48 tokens to every session and 1,942 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-08-31.