CLSkills
💻/testit

Writes tests for the code in context — including the edge cases the original author forgot.

Category: Coding & Technical

Before / After

Without /testit

Write tests for this function.

With /testit

/testit [paste function]

What changes in Claude's response

Beyond happy-path tests, /testit explicitly tests: empty input, null input, max-size input, off-by-one boundaries, concurrent access if relevant, and the 'this should error' cases. It also names tests descriptively — `should_return_empty_array_when_input_is_null` instead of `test1`. You can read the test file and understand what the function does without reading the function.

When NOT to use /testit

Don't /testit code you're about to refactor. You'll write tests against the wrong shape and have to redo them.

Codes that stack with /testit

/testit is one of 120 tested prompt prefixes. The full cheat sheet has before/after examples, warnings, combos, and 10 workflow playbooks.

See the full cheat sheet — from $5

More Coding & Technical codes