/ceh-testing:write-test-firstfrom ceh-testing
Load this skill when about to write code that adds or changes behavior, whether or not tests were asked for: red, green, refactor, failing run seen first. Trigger on "implement", "add a feature", "build this", "TDD". Not for bug fixes (use ceh-testing:test-a-bug-fix).
Ships in ceh-testing. 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.
None: SKILL.md is the whole skill.
No production code without a failing test that asks for it. Every slice of new behavior goes red, then green, then refactor, and the task is done when every slice has a test that was seen failing before its code existed and passes now.
Writing and running the tests that prove the change is part of the change, so the procedure below applies without being asked, on every task that adds behavior. Only a slow or paid run waits for a request: the full suite, coverage, mutation testing, or repeated passes over the whole suite. When one of those would help and was not requested, name the command and what it would reveal, and state what stays unverified.
parse_duration('1h30m') returns 90 minutes". Order them so each builds on the
last. Choose the inputs for each: invoke the Skill tool with
skill="ceh-testing:design-test-cases", whose "Before the first
test" rules (name the seam, call it the way users do, no tautological tests) apply to every
test here.skip: <reason> in the hand-over rather than skipping
silently.assert script)
in the meantime.For each slice, in the hand-over:
- `<test name>`: red `<the assertion failure line seen before the code>`, now green.
protects: <behavior>; fails_when: <what breaking change turns it red>; why_new: <the gap it fills>
Then name what stayed unrun, such as the full suite, with the command that runs it, and list any
skip: <reason> lines and any test changed: <test name>: <reason> lines.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
9 skills in this plugin
/close-test-risk-gapsLoad this skill when a feature works and is about to be called done: triage what a passing suite misses (concurrency, contract drift, performance, authorization, migrations). Trigger on "is this ready", "before I open the PR", "race condition"./design-test-casesLoad this skill when deciding which inputs and scenarios a test should cover, not how to wire the runner: partitions, boundaries, state transitions, properties, fuzzing, failing dependencies. Trigger on "what should I test", "cover the edge cases", or a test file with only a happy path./explore-app-for-bugsLoad this skill when the running app itself must be tried for bugs: launch it, explore the changed areas, report each bug with repro steps. Report-only unless asked to fix. Trigger on "QA this", "click through the app and find bugs", "try to break it", "smoke-test the feature"./measure-performanceLoad this skill when speed, memory, or size is the task: something is slow, a benchmark is written or read, or a change may have regressed performance. Trigger on "make this faster", "is this a regression", "benchmark this", "why is this slow", "reduce memory"./review-test-suiteLoad this skill to find out whether a passing suite would catch a defect: assertion quality, mutation testing, flaky tests, tests that mirror the code. Trigger on "are these tests any good", "mutation testing", "flaky test", "tests pass but the bug shipped", or after generating tests./test-a-bug-fixLoad this skill when a bug, crash, or regression is being fixed, before writing the fix: the smallest failing test first, proven red without the fix. Trigger on "fix this bug", fixing a fix record, a stack trace, a bug-fix PR with no test, or a first test for a reported bug.npx claudepluginhub cheneeheng/ceh-claude-code-library --plugin ceh-testing