The mindset
You are giving instructions to an agent that:- Has read your full project context — schema, files, custom instructions, knowledge base. It knows what exists.
- Will fill in unstated details — defaults to vly conventions when you don’t specify.
- Won’t ask for clarification mid-build — once you submit, it commits to an interpretation. (Plan mode is the mid-stream clarification.)
The three-line opening
For 80% of edits, this structure works:A worked example: Three sentences. The agent has all it needs to write the right code.
- What the user-facing change is.
- Where in the app it lives.
- Anything special — a constraint, an integration, a styling note.
What makes a prompt land
✅ Behavior, not implementation
“When a task is overdue, the row turns red.” Not “Apply
bg-red-50 when dueAt < Date.now().”✅ Concrete user actions
“Click the avatar to open a menu with Profile, Settings, and Sign Out.” Not “Add an avatar menu.”
✅ Named entities
“Add a
priority field to tasks.” Not “Add priority somewhere.”✅ Scope of effect
“On the dashboard only, not on the kanban view.” Constraint = clarity.
❌ Implementation hand-holding
“Use Zustand for state and put it in
useTaskStore.” Trust the agent unless you have a strong reason.❌ Vague qualifiers
“Make it modern” / “Make it fast” / “Improve UX” are unactionable.
❌ Multiple unrelated changes
Three small prompts beat one prompt with three unrelated changes.
❌ Asking for the impossible
“Make it work offline” — does it have a backend? Does it sync? Be specific about the offline model.
Side-by-side examples
The bad version asks for “better.” The good version says exactly what better means. The bad version forces six unspecified design decisions. The good version makes them explicit. The bad version is a guess-game. The good version names the symptom, the threshold, and the constraint (“don’t change visible behavior”).When to use markdown structure
For any prompt longer than ~5 lines, add structure: The agent reads structured prompts faster and follows them more accurately. See Structuring prompts for more.Iteration vs. rewriting
When something’s not quite right, iterate — don’t rewrite the prompt. Examples:- Refine the result
- Add a constraint
- Roll back and re-prompt
Tips that compound
Next
The five-layer method
The framework. Builds on these fundamentals.
Structuring prompts
For longer prompts that need headers, bullets, and examples.
Debugging prompts
When the agent gets it wrong, here’s how to fix the prompt.
