Guide

beginner

How to write prompts that coding agents understand

Updated 2026-10-15. Sourced from vendor docs · verified 15 Oct 2026 · hands-on test pending wherever a sentence depends on a vendor page.

Agents follow constraints better than vibes. Ask for one change, name the files, and say what must not happen.

Answer

A prompt an agent can follow names the outcome, the files it may touch, and the things it must not add. Short prompts beat a paragraph of taste. The copyable ones on this page are starters, not magic.

Beginner path

The shape of a prompt

Use four lines, in this order:

  1. What should exist when you are done.
  2. Which files or pages it may change.
  3. What it must not add.
  4. How you will check.
A change, not a vibe
Update the homepage headline to "Tip the band".
Only edit the homepage file.
Do not add a new font, a new package, or a login form.
I will check by reloading the page.

"Make it pop" is not a check. "The headline reads Tip the band" is a check.

When it did the wrong thing

Quote the wrong behavior. Do not insult the model, and do not paste secrets into the apology.

A correction
The homepage still shows the old headline.
Look at the homepage file only.
Set the visible heading to "Tip the band".
Tell me the file you changed.

More starters live in the prompt library, grouped by task.

Advanced path

Constraints that belong in a file

If you repeat a rule every session, move it. AGENTS.md is the open format several agents already look for, including Cursor and the Windsurf lineage now called Devin Desktop. The agents.md site describes it as a README for agents: build commands, test commands, and conventions.

A strong rule is executable: "run pnpm test before you finish." A weak rule is "write clean code."

Also name the model when the vendor's plan changes what you can call. Cursor Plus is Grok-only. Copilot Free is auto model selection. Those are plan facts, and they matter more than a prompt adjective like "think harder."

Next step

Questions

Should I paste my whole codebase into the chat?

No. Point the agent at the repo, or paste the one error and the one file. A giant paste burns the context window and still misses files.

Why did it ignore my style note?

Style notes at the end of a long prompt get lost. Put constraints first, or put them in AGENTS.md so every session sees them.

Sources