Claude for writing tests, done properly.
The tested prompt, the codes that help, and the setup software development pros run. Copy, adapt, ship.
Writing tests is tedious and most developers skip edge cases. Coverage reports show green but the tests don't actually catch real bugs because they only test the happy path.
Three reasons this actually lands.
The prompt, the codes, the fit. Each one on its own is a nice-to-have. Together, they change the workflow.
One tested prompt, copy-paste ready. Rules baked in, placeholders marked, tone locked down. No prompt-engineering trial runs, no back-and-forth.
Prefix with V=2, REASON, REFINE for compound effects. Each code is a documented technique, not a magic word.
Tuned for software development workflows. Not a generic template, and not another "you are a helpful assistant" hack.
Without the pattern vs with it.
What the day looks like when you keep winging the prompt, and what it looks like when you stop.
Generic prompt. Claude writes something that could be about anyone, in any industry, from anywhere. Sounds like a template because it is one.
The CLSkills prompt with placeholders for your context. Claude writes it like a specialist who actually knows the work. Publishable after one edit pass.
You paste, Claude answers, you rewrite, you paste again. Ten minutes of back-and-forth per output. Three hours across a batch of five.
Prompt loaded once. You feed the specifics, Claude returns the finished output. Two minutes per, twenty across five. Same tone, same structure, every time.
Middle-of-the-road copy that reads AI-flavoured. Recipients notice. Response rates stay low. You end up rewriting most of it anyway.
A test suite that actually catches regressions. Edge cases you wouldn't think of, descriptive names that serve as documentation, and mocks only where necessary.
Copy this, replace the placeholders, ship.
Write comprehensive tests for this code. Language: [LANGUAGE] Test framework: [JEST / PYTEST / RSPEC / etc.] Code to test: ```[language] [PASTE CODE] ``` Requirements: 1. Happy path tests (basic expected behavior) 2. Edge cases (empty inputs, null/undefined, boundary values, very large inputs) 3. Error cases (what should throw/fail and how) 4. Integration-relevant scenarios (if this interacts with other components) For each test: - Descriptive test name that explains the scenario - Arrange-Act-Assert structure - Only mock what's necessary (no over-mocking) - Add a comment explaining WHY each edge case matters
Replace the [BRACKETED] placeholders with your context.
Stack these prefixes for compound gains.
Prepend one or more of these to the prompt above. Each code is documented on its own page with before and after examples.
Every prompt, once.
The Cheat Sheet is every tested code, with a before and an after.
Nearby prompts for the same role.
React bugs are notoriously hard to debug — infinite re-renders, stale closures, hydration mismatches. Error messages point to the wrong comp…
CLAUDE FORPython's dynamic typing and silent failures make bugs hard to catch. A function returns None instead of a value, a dictionary key is missing…
CLAUDE FORThorough code reviews take time most teams don't have. Reviewers miss edge cases, security issues, and performance problems because they're …
CLAUDE FORLegacy code works but is unmaintainable. New developers can't understand it, adding features creates bugs, and nobody wants to touch it. But…