tdd
Skill1 starsChanged 11 days agoMITView on GitHub
Test-first bug fix for data code, using pytest run through uv and small inline fixture frames. Use only when the user explicitly asks for TDD, a failing test, or a regression test, OR when a wrong number or broken transform has a cheap local test target. Skip when the test path is unclear, needs a warehouse or large data, or was not requested.
194 other projects use a version of this, 12 of them edited.
Adopted by
Most recently taken up by
- ishandutta2007/Awesome-Claude-Skillstheir own version, first seen Nov 8, 2026
- trpc/trpcedited, first seen Nov 8, 2026
- wowyuarm/dsh-agent-teamtheir own version, first seen Nov 8, 2026
- Contexera/dsh-agent-teamtheir own version, first seen Nov 8, 2026
- Dimon94/dveritytheir own version, first seen Nov 8, 2026
- Dimon94/skillstheir own version, first seen Nov 8, 2026
Used with
Projects with it also use capture-learning-tools, design-frontend-dev and 5 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
The-Vibe-CompanySkillcapture-learning-tools
Turn technical conversations, bugs, CI failures, review comments,
Also in 5 projects that use this
The-Vibe-CompanySkilldesign-frontend-dev
Clean Impeccable frontend design skill. Use when the user wants to
Also in 5 projects that use this
tristanphvnSkillketchup-video
Catch the user up like /keel:ketchup, with a short silent video of slides for what happened and the waiting calls as text under it. Use for /keel:ketchup-video.
Also in 14 projects that use this
jaydubya818Skillprinciple-migrate-callers-then-delete-legacy-apis
Apply when replacing an internal API without leaving ambiguous dual paths.
Also in 44 projects that use this
jaydubya818Skillprinciple-exhaust-the-design-space
Apply when a novel design needs concrete candidates compared before selection.
Also in 43 projects that use this
- +2 more from The-Vibe-Company
Other versions194 projects use a version of this.
Word for word · 0
None found.
Edited · 12
- trpc/trpc★ 41k59% same
- backnotprop/pstack★ 3.8k59% same
- jtaroreh/agystack★ 12855% same
- uzairansaruzi/p3-stack★ 12659% same
- dsebban/skills★ 7159% same
- overextended/skills★ 2250% same
- creedants/pstack-t3★ 1860% same
- painhardcore/pstack★ 1860% same
- Scino/fstack★ 1847% same
- mariusflorescu/pstack-t3★ 1359% same
2 more not listed
Wrote their own version · 182
- mattpocock/skills★ 309ksame name
- Yeachan-Heo/oh-my-claude-sisyphus★ 41ksame name
- Yeachan-Heo/oh-my-claudecode★ 41ksame name
- QuivrHQ/quivr★ 40ksame name
- The-Vibe-Company/quivr★ 40ksame name
- ccusage/ccusage★ 19ksame name
- ryoppippi/ccusage★ 19ksame name
- MODSetter/SurfSense★ 17ksame name
- GreyDGL/PentestGPT★ 16ksame name
- open-metadata/OpenMetadata★ 16ksame name
172 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository50 other files it gives its agents.
- analyst-modeSkill
- architectSkill
- arenaSkill
- astack-helpSkill
- benchmark-checklistSkill
- blast-radiusSkill
- catch-upSkill
- correctSkill
- create-formal-verification-skillSkill
- figure-it-outSkill
- howSkill
- interrogateSkill
- in-your-own-wordsSkill
- maintain-formal-verification-skillSkill
- no-commentsSkill
- plain-wordsSkill
- principle-attack-the-premiseSkill
- principle-boundary-disciplineSkill
- principle-build-the-leverSkill
- principle-define-the-questionSkill
- principle-encode-lessons-in-structureSkill
- principle-experience-firstSkill
- principle-explain-the-numberSkill
- principle-fix-root-causesSkill
- principle-foundational-thinkingSkill
- principle-guard-the-context-windowSkill
- principle-laziness-protocolSkill
- principle-make-operations-idempotentSkill
- principle-minimize-reader-loadSkill
- principle-model-the-domainSkill
- principle-name-the-estimandSkill
- principle-never-block-on-the-humanSkill
- principle-prove-it-worksSkill
- principle-reproduce-from-clean-stateSkill
- principle-respect-the-grainSkill
- principle-sequence-verifiable-unitsSkill
- principle-simulate-the-methodSkill
- principle-subtract-before-you-addSkill
- principle-test-behavior-not-implementationSkill
- recallSkill
- reflectSkill
- retail-analyticsSkill
- sharpenSkill
- show-me-your-workSkill
- statechartSkill
- swarmSkill
- teachSkill
- technical-writingSkill
- unslopSkill
- whySkill
The file
We split this skill into the rules it gives an agent
12 rules. 0 are common, 11 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 186 edited versions we read keep these.
11
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
When fixing a bug in a transform or metric with a clear, cheap test path, make the broken behavior executable before changing production …
- Very specific: line 14
Run tests through uv run pytest.
- Distinctive: line 16
Write fixtures as small Polars frames built inline, with three to ten rows that show the bug.
- Distinctive: line 37
Choose the narrowest executable check: Prefer the closest unit test already used for that function.
- Distinctive: line 47
Prefer no new test over a bad test.
- Distinctive: line 51
Do not change expected values to match a wrong implementation.
- Distinctive: line 52
Do not weaken existing assertions unless the expected behavior has genuinely changed and the reason is clear.
- Distinctive: line 53
Keep the regression test focused on the bug.
- Distinctive: line 54
Never commit real data into a fixture.
- Distinctive: line 55
If the bug is flaky, fix the seed and the sort order so the test is deterministic, and document the signal being locked down.
- Distinctive: line 56
If the bug exposes a broader class of failures, first land the focused regression test, then consider sibling coverage.
- Distinctive: line 64
If failing-before evidence could not be demonstrated, state why and describe the closest regression check used instead.
“Common” is measured: kept by at least 6 in 10 of the 186 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
TDD Bug Fix
When fixing a bug in a transform or metric 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.
Do not force a test when it would be impractical. If the available test would need a warehouse connection, a multi-gigabyte extract, mocked database clients, production-only state, vague reproduction steps, or large unrelated fixture churn, skip adding a new test and use the closest useful verification instead.
Setup
Run tests through uv run pytest. If the project has no pytest yet, add it as a dev dependency with uv add --dev pytest. Keep tests in tests/, and name each file after the module it covers.
Write fixtures as small Polars frames built inline, with three to ten rows that show the bug. Do not load the real data in a unit test. A regression test on a 6-row frame runs in milliseconds and shows the reader the input.
import polars as pl
from pipeline.orders import dedupe_orders
def test_dedupe_keeps_latest_row_per_order():
raw = pl.DataFrame(
{
"order_id": [1, 1, 2],
"updated_at": ["2026-01-01", "2026-01-05", "2026-01-02"],
"amount": [10.0, 12.0, 7.0],
}
)
out = dedupe_orders(raw).sort("order_id")
assert out["amount"].to_list() == [12.0, 7.0]Workflow
- Understand the bug. Identify the intended behavior, current behavior, affected transform or metric, and the smallest input that shows the wrong output.
- Choose the narrowest executable check. Prefer the closest unit test already used for that function. If no practical test path is obvious, do not create one from scratch just to satisfy the workflow.
- Write the failing test first. Add the smallest test that would have caught the bug, on a small inline frame. The test should encode the intended behavior, not mirror the current implementation. Put the expected values in the test as literals. Do not compute them with the code under test.
- Run the new test before fixing. Run only the affected file while iterating:
uv run pytest tests/test_orders.py::test_dedupe_keeps_latest_row_per_order. Confirm it fails for the intended reason, with a wrong value in the assertion message. If it passes or fails for an unrelated reason such as an import error or a dtype mismatch in the fixture, correct the test before editing the implementation. - Fix the bug. Make the smallest production change that satisfies the intended behavior while preserving nearby contracts, such as column names, dtypes, and the grain.
- Rerun the regression test. Confirm it passes. Then run the full suite once with
uv run pytestat the end.
If a Failing Test Is Impractical
Use the closest executable regression check instead, written by you and run by the human: a script that re-runs the transform on a sampled extract, a row-count or checksum assertion on the real output, a data-quality check on the output table, or a saved query that compares old and new results. The data-quality-check playbook of the analyst-mode skill covers the last one.
Prefer no new test over a bad test. A bad test is one that mostly tests mocks, encodes current implementation details, depends on file paths or wall-clock time, needs a warehouse for a small fix, or would be deleted right after it proves the fix.
Guardrails
- Do not change expected values to match a wrong implementation.
- Do not weaken existing assertions unless the expected behavior has genuinely changed and the reason is clear.
- Keep the regression test focused on the bug. Avoid broad fixture churn or unrelated coverage expansion.
- Never commit real data into a fixture. Build the rows inline, or use a few rows you made up.
- If the bug is flaky, fix the seed and the sort order so the test is deterministic, and document the signal being locked down.
- If the bug exposes a broader class of failures, first land the focused regression test, then consider sibling coverage.
Final Response
Report the evidence, not just the outcome:
- Name the failing-before test and the assertion it produced, with the wrong value.
- Name the passing-after test run and any nearby validation performed.
- If failing-before evidence could not be demonstrated, state why and describe the closest regression check used instead.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

