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-code-setup 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:
tools
Comprehensively manually test the Circuit plugin's user-facing surface in either Claude Code or Codex. Use this skill whenever the user asks to "manually test Circuit", "QA the Circuit plugin", "exercise the Circuit surface", "run the Circuit checklist", "smoke test Circuit", "find regressions in Circuit", "test the Claude Circuit plugin", "test the Codex Circuit plugin", or when preparing a Circuit release for marketplace publication. Argument is the host package to test — `claude` or `codex`. Produces a Markdown report with per-command pass/fail, exploratory findings ranked by severity, run-folder evidence links, and a concise terminal summary. Use even if the user does not say the word "test" — phrases like "go through every Circuit command" or "make sure Circuit still works end-to-end" should also trigger.
development
Turn the prompt supplied with this skill into a concise, auditable Codex Goal or explain why a Goal is not the right fit. Use when the user asks to draft, formulate, rewrite, tighten, or create a `/goal` from a plain-language task, especially for multi-step work that needs a durable objective, evidence-based completion, constraints, iteration policy, and a default adversarial review loop.
development
Give the human a fast, plain-English catch-up on what changed in the project: what the agents did, why, and what decisions need their input. Use this whenever the user asks to "catch me up", "what changed", "where are we", "recap", "brief me", "give me the rundown", "what did you do", "summarize the session", "fill me in", or otherwise signals they have been away and want to get back up to speed quickly. Built for someone steering several agent-driven projects at once who does not read the code closely but needs to grasp the core ideas, the choices made, and the open decisions well enough to steer. Trigger even if they do not use these exact words: any request to get oriented on recent progress should use this skill.
tools
Expert Unix and macOS systems engineer for shell scripting, system administration, command-line tools, launchd, Homebrew, networking, and low-level system tasks. Use when the user asks about Unix commands, shell scripts, macOS system configuration, process management, or troubleshooting system issues.