skills/tdd/SKILL.md
Test-driven development for features, bug fixes, regressions, and safe refactors using a failing-test-first workflow. Use when Codex needs to add or change behavior with proof, reproduce a bug in a test, write regression or characterization tests, make a refactor safer, or respond to prompts like "use TDD", "red-green-refactor", "write the test first", "add a regression test", "reproduce this in a test", "prove the fix", "cover this change with tests", or "make this safe to refactor". Prefer this skill when confidence should come from executable evidence instead of reasoning alone.
npx skillsauth add petekp/claude-skills tddInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Treat executable evidence as the source of truth. Use this workflow to prevent five common agent failures:
Before editing code:
AGENTS.md, CLAUDE.md, and package or
test scripts.Follow repo-local instructions if they are stricter than this skill.
Do not batch all tests first and all implementation later.
Wrong:
RED: test1, test2, test3
GREEN: impl1, impl2, impl3
Right:
RED -> GREEN -> REFACTOR: test1 -> impl1
RED -> GREEN -> REFACTOR: test2 -> impl2
RED -> GREEN -> REFACTOR: test3 -> impl3
Write one failing test. Make it pass with the smallest sensible change. Refactor only on green. Repeat.
See bugfixes.md for the detailed mini-loop.
See seams.md, deep-modules.md, and refactoring.md.
For each cycle:
RED: Write or tighten one test that proves one behavior. Confirm it fails.GREEN: Write the minimum production change that makes only that behavior
pass.REFACTOR: Clean up duplication, naming, and structure while staying green.If the test cannot fail, the loop is invalid. Break it on purpose, lower the seam, or add the missing observability before trusting it.
Use this ladder:
If the loop feels slow, the seam is probably too high. Move down a level unless the behavior truly lives in the browser or across system boundaries.
See tests.md for examples and rewrites.
When other agents help:
Consider the task done only when:
development
Draft short, plainspoken notes in the author's voice that help reviewers understand non-obvious choices, boundaries, and preserved behavior in the author's own pull request or local diff. Use when the user asks to self-review, annotate, or add reviewer context to their PR or changes. Draft locally when no PR exists, and post approved notes as one GitHub review when a PR does exist. Do not use for reviewing someone else's PR, writing code comments, explaining code generally, or drafting a PR description. Never post without explicit approval.
tools
Design and build pure-CSS (zero-JavaScript) Tailwind CSS v4 plugins of unusual depth and craft. Use when the user wants to create, architect, or refine a Tailwind utility plugin or CSS effect — e.g. "make a tailwind plugin", "build a tw-* plugin", "a CSS-only shimmer/fade/glow/grain/noise utility", "tailwind v4 @utility", "package this effect as a plugin", or wants an effect with surprising visual depth (gradients, masks, filters, SVG filter tricks, scroll-driven animation). Pairs deep CSS/SVG technique research with a bespoke tuning workbench for dialing the effect in. Inspired by tw-fade and tw-shimmer.
content-media
Create clear, polished before-and-after screenshots for a GitHub pull request. Use when a UI change needs visual proof: capture matching states, crop to the relevant UI, stitch and caption one comparison image, attach it natively to the PR, and keep the image out of the repository.
testing
--- name: latent-potential description: First-principles, team-of-experts assessment of a software project that surfaces latent potential; underexploited assets, a sharper north star, missing high-leverage capabilities, better framing and messaging. Produces a prioritized, evidence-grounded report with cheap probes, a reframe candidate, a stop-doing list, and an honest skeptic's case. Use whenever the user wants fresh eyes on a project they have built: "what am I sitting on", "what could this be