Some developers treat Claude like autocomplete: paste some code, get some code back, iterate blindly. The gap between a mediocre response and a genuinely great one usually isn't the model — it's how you're prompting it. Here are six concrete techniques, each with a real before/after you can use in the API, Claude Code, or claude.ai.

1. Give explicit success criteria, not just a task

Vague prompts get vague code, because Claude has to guess what "done" means — and it'll guess conservatively.

Before: "Write a function to validate emails."

After: