WED, OCTOBER 14, 2026
Independent · In‑Depth · Practitioner‑Tested
Claude Code Coding

6 Prompts to Direct an AI Coding Agent on Code You Cannot Break

Linus Torvalds shipped kernel patches written with Claude Code, and the thing that made it work was not the model. It was that he picked the bottleneck, scoped the change, ran the benchmarks himself and published the open problems. These six prompts put that discipline into a coding session on code where a mistake is expensive.

⌨️ 6 prompts 🕐 Updated Oct 14, 2026
💡 How to use these prompts: Replace everything in [BRACKETS] with your specific details before sending. Click Copy to copy any prompt to your clipboard instantly.
1
Find the bottleneck before writing anything
Stops the agent optimising the wrong thing
Before you change any code, profile this path and tell me where the time actually goes. Give me the top three costs with evidence from the measurement, not from reading the code. Do not propose a fix yet. If you cannot measure it, say so and tell me what instrumentation you would need.
2
Scope the change to one mechanism
Keeps the diff reviewable
Change exactly one thing: [name the mechanism]. Do not refactor anything you pass through, do not rename, do not reformat, do not fix unrelated bugs you notice. If you find something else that looks wrong, add it to a list at the end instead of touching it.
3
Make it state its own invariants
Surfaces the risk before the merge
List every invariant this code currently relies on that your change could break. For each one, say how the existing code guarantees it and how your version does. Where you are not certain a guarantee still holds, mark it UNVERIFIED rather than assuming.
4
Demand a benchmark you can run yourself
Verification stays with the human
Write a benchmark I can run on my own machine that would show this change working, and one that would show it failing. Tell me the exact command, the hardware assumptions and what numbers would mean you were wrong. I will run them, not you.
5
Ask where it gets slower
Finds the cost the summary left out
This change helps the contended path. Now tell me every path where it adds overhead or makes things worse, with the conditions that trigger each one. Be specific about cases like cache misses, cold starts and single-threaded use.
6
Get the unresolved list before you commit
The failure list ships with the code
Write the commit message. It must include a section listing what is still unresolved: open questions, compatibility concerns, possible regressions, and anything you were unsure about while writing this. Do not leave that section out and do not soften it.