Ethan Ha

Prompts1 min read

The One Question I Ask AI Before Trusting Any Generated Code

By Ethan Ha

One question, asked every single time, before anything AI just wrote goes anywhere near production:

Prompt · copy & paste

What's the one thing about this that would break in production but not in testing, and how would I know if it did?

That's it. That's the whole prompt.

It works because it forces a specific answer instead of a reassurance. "Is this safe?" gets you "yes, this looks good." This question gets you an actual failure mode — a race condition under load, an environment variable that's set locally but not on the deploy target, a silent catch block swallowing an error instead of surfacing it.

Two real answers this question has actually surfaced for me: a scheduled job that existed in code but wasn't registered anywhere to actually run (found before it shipped, not a day and a half after), and a database client that worked fine locally but wasn't built for a serverless environment's connection limits.

Ask it after every meaningful piece of generated code, not just before launch. It's fast, it's specific, and it catches the exact category of bug that "looks done" hides best.

This is the check I run before Insidr code ships — see it live.

Try Insidr →

Brands: partner with me

Keep reading

← Back to Resources