It’s more and more common to ask the agent for a feature and let it write everything: the code and, while it’s at it, the tests. You run the suite, everything goes green and you move on. The catch is that those tests were written by whoever wrote the code, so they check exactly what it already had in mind. The case it didn’t think of isn’t anywhere, and it’s usually the one that shows up in production.
Asking it to review doesn’t help much either: it’ll read it with the same eyes and tell you it looks fine.
What you need is something with one job: finding the input that breaks your code. That’s an adversarial skill.
What “adversarial” means
It comes from adversary. Something adversarial plays against you on purpose: instead of helping your code work, it tries to make it fail. It’s not bad faith, it’s the role nobody else is covering.
You’ll see similar words in skill names and prompts:
| Word | What it means |
|---|---|
| Red team | Attacking your system the way an outsider would. It comes from security. |
| Edge cases | Values at the edge of what’s allowed (empty, the maximum, one more). |
| Fuzzing | Throwing thousands of generated inputs, many random, to see which one crashes the program. |
| Stress test | Testing with extreme load or data to see where it gives. |
| Grill | Questioning a plan or an idea, one question after another, until it holds up. |
| Devil’s advocate | Arguing the opposite position to find the holes. |
They all share one idea: giving the model a role against you, because by default it plays on your side. The skill in this article mixes red team and edge cases. It isn’t fuzzing: it uses realistic cases, not random ones.
What a skill is
A folder with a SKILL.md file. At the top, a name and a description of when to use it; below, the instructions. You save it in .claude/skills/<name>/ and call it with /<name>.
What makes it work
The idea comes from break-ui, by Emil Kowalski, which does the same thing for UI components. It boils down to four rules:
- It knows which side it’s on. Not “review this”, but “you’re the user who’s going to break this”.
- Real cases, not garbage. Five thousand “a”s prove nothing. A genuinely long email does.
- It breaks, it doesn’t fix. If it fixes while it searches, it stops at the first failure.
- Every break is a failing test. No arguing, and the test stays in the repo.
The template
---
name: break-it
description: Try to break a function, endpoint or module with realistic but hostile inputs and deliver every break as a failing test. Use with "break this", "find edge cases" or before calling something done.
---
You are the least kind user this code will ever meet.
You are not trying to confirm it works: you are looking for the input
that breaks it.
Rules:
1. Only cases a real user could send, or the exact limit from the
schema or the database.
2. Change the input, never the code.
3. Every break is a failing test, using the project's existing runner.
4. Don't fix anything. Report and stop.
Steps:
1. List everything the code receives: parameters, body, user, dates,
responses from other services.
2. Read CATALOG.md and pick the cases that apply to each input.
3. Write the tests and run them.
4. Deliver a table: what broke, with which value, why it happens
(file:line) and how to fix it. At the end, what held up.The catalog
It goes in a separate file, next to SKILL.md. It’s a list of what usually breaks. Start short and add a line every time something slips into production.
- Text: empty, whitespace only, max length and one more, emoji, accents.
- Numbers: 0, -1, decimals where integers go, "10" instead of 10.
- Lists: empty, one item, duplicates, thousands of items.
- Dates: February 29, DST change, start after end.
- Repetition: the same request twice (double click, retry).
- Permissions: asking for another user's resource by changing only the id.
- External services: slow, failing or returning nothing.Two tips
Run it in a fresh session. The conversation that wrote the code is already convinced it works.
Keep the tests. The ones that failed and you then fixed are the most valuable part of the run.
That’s it: a posture, four rules and a list that grows with you.