/george-coding-agent:test-driven-developmentfrom george-coding-agent
Guides writing high-value tests by choosing the most realistic test that is still cheap, naming the failure it catches, and writing a failing regression test first for every bug.
Ships in george-coding-agent. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Most suites carry too many low-value tests. A test earns its place by catching a failure that would really happen, as close to how it would really happen as you can afford. Pick the most real test that is still cheap, name the failure it catches, and watch it run.
incremental-implementation puts the tests in the same commit as the change).Not for: config, docs, or a rename with no behavior change. UI behavior in a real browser: browser-testing.
Each project should carry its own skill that says how to prove behavior in that repo: how to launch it, drive it, what evidence counts, how to clean up. Look for it first:
.claude/skills/verify*/SKILL.md (or .cursor/skills/verify*/) in the repo;AGENTS.md, README.md or CONTRIBUTING.md.If one exists, follow it, and treat the rest of this skill as defaults it can override. If none exists and the repo will be verified again, offer to create one (pstack create-verification-skill is a good generator, and maintain-verification-skill keeps it honest). Offer, never create it unasked.
Read before the first test. Guessing the framework or the command is how a test never runs.
pytest path::test, npx vitest run file, ./gradlew test --tests, go test -run). Use the checked-in wrapper (./gradlew, make test, a repo script) over a global tool.Go down this ladder and stop at the first rung that is cheap enough for the change.
| Rung | What | Example |
|---|---|---|
| 1. Seam with real collaborators | An integration or component test that drives the public seam with the real classes behind it, fakes only at the process edge (network, cloud APIs, clock). | an HTTP handler test against the real service layer and an in-memory store; a job runner driven end to end with a fake queue |
| 2. The environment as evidence | Watch the behavior where it really runs. The test is the check you run there, recorded. | staging behavior, a load test, an integration suite run, a dashboard or metric after deploy |
| 3. Unit test | Only for pure logic with real edge cases. | math, parsing, a state machine, a backoff schedule |
Before writing a test, write one line: the real failure it would catch, the way it would happen in production. For example: "a failed upload is swallowed and the job reports success".
A seam is the public boundary where a caller observes behavior: a public function, a route, an emitted event, a written row. Tests go at seams, never against internals.
planning-and-task-breakdown, api-and-interface-design), one line each on what a test there catches and what it misses. In an interactive session, confirm them with the user before writing tests.| The test target | Do this |
|---|---|
| Cheap and local (pure logic, a fast component test) | Strict red-green: watch the test fail for the right reason, make it pass, refactor. |
| A clear seam, but the loop is slow (heavy build, CI-only setup) | Write the test first for the seam, then the code, then the next seam. Show it could fail (section 6). |
| Expensive, timing-bound, production-only state, vague repro | No new test. Use the closest executable check (rung 2, a script, a log or metric assertion, browser-testing) and say so. |
Prefer no new test over a bad test. A bad test mostly tests mocks, pins the current implementation, depends on timing or global state, needs broad harness work for a small fix, or would be deleted right after proving the fix.
Run the full suite with the repo's own command before calling it done, and name any failure you saw, including ones you did not cause.
A bug with a cheap repro starts with a test, not a fix.
Judge each test by two edits:
Rules that follow:
Coverage is a gate, not the goal. Meet the gate with tests at the seams. Read which check failed before you write a line.
The gate is the floor. About 85% new-line coverage is a soft ceiling: go past the gate toward it only with tests that each catch a real failure, and stop when the next test would only cover lines. Never 85% for its own sake.
A covered line with a meaningless assertion is worse than an honest gap. Name the gap in the pull request.
When you touch a test file, or a review says the tests are bloated, ask four questions of each test (gstack test-audit):
Low-value signs: no assertion, a value compared with itself, a copied fixture or constant list, a mock-call test duplicated at a real boundary, the same contract invoked twice, production code whose only callers are tests. Keep a test that guards a real contract even if it is slow. Retire tests in their own change, never mixed into a behavior change.
"Tests pass" with no output is not done. Report:
An agent's "success" is not evidence either. Check the run yourself.
A change routed error paths in three background workers to a new fault reporter. The new-line coverage gate failed at 66.66% against 70%. The uncovered lines were the new fault routes inside each worker's flush loop.
A second case: a whole-project ratchet failed twice (89.51%, then 89.46%, against 89.73%) with new lines fully covered and identical code. That is the ratchet's noise. The answer was an override with the reason, not more tests.
incremental-implementation runs this per slice. planning-and-task-breakdown names the seams and the done check, api-and-interface-design the contracts. browser-testing for UI behavior.quality-constraints guards the bar: a lowered threshold or an easier test is a finding.tdd, create-verification-skill, maintain-verification-skill, principle-test-behavior-not-implementation and principle-prove-it-works at 10d7b8a, MIT (see THIRD_PARTY_LICENSE-pstack): the loose stance (strict only with a cheap target, prefer no new test over a bad test, the closest executable check), the project-local verification skill, the two imagined edits, failing-before evidence.tdd at 5beb35b, MIT (see THIRD_PARTY_LICENSE-mattpocock-skills): tests at seams agreed up front, tautological tests, horizontal slicing as the anti-pattern.test-driven-development at aeac41d, MIT (see THIRD_PARTY_LICENSE-agent-skills): discover the stack first, red green refactor, the prove-it pattern, test sizes, real over mocks, a subagent writes the repro. The pyramid is replaced here by the real-world-first ladder.test-driven-development with writing-good-tests.md, and verification-before-completion at 2ce8aa1, MIT (see THIRD_PARTY_LICENSE-superpowers): watch it fail for the right reason, name the break, no change detectors, run the full suite, evidence before claims. Its Iron Law is not adopted.test-audit at 576839c, MIT (see THIRD_PARTY_LICENSE-gstack): the value bar, the low-value catalog, retire in separate batches.[bl: ...] tags are analysed in BITTER_LESSON.md.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
26 skills in this plugin
/api-and-interface-designDesign seams, APIs, config keys and schemas that are deep, hard to misuse, and safe to roll out and back. Use when adding or changing a contract./browser-testingVerify UI work in a real browser with the repo's own tool or the best fit (Playwright, DevTools, computer use) and look at the screen, not just the logs./ci-cd-and-automationAutomate the quality bar: one check command that hooks and required CI both run, fast gates first, protected main, and safe release and deploy steps./code-review-and-qualityReview a code change, or receive a review: pin the intent, read tests first, then spec and quality passes with a fresh read-only reviewer and the cr-review checklist./code-simplificationMake code easier to read without changing behavior: scope to the change, understand before removing, follow repo conventions, subtract before adding./context-engineeringPut the right context in front of an agent at the right time and carry it across a handoff without loss. Use when writing briefs, steering, or when context runs long.npx claudepluginhub georgewangyu/georgecodingagent --plugin george-coding-agentOther plugins' skills for the same job