Prompt engineering for coding agents
Claude Code, Cursor, and the terminal

Before your agent writes a line, give it what it cannot read in the code.

Download for MacmacOSSend it to your Mac
Prompt engineering for coding agents: Claude Code, Cursor, and the terminal
  • Your agent can read your code, not your reasons.
  • Tell it the goal, what is decided and what must not change.
  • The constraint you skip is the change you undo later.

You ask for one fix and get back a confident guess. Your agent has your repository and none of your reasons.

What an agent cannot see

  • No: Which files are settled and which are scratch.
  • No: Why the odd-looking workaround is there. It will get “cleaned up”.
  • No: What you already tried. You get the fix you ruled out.
  • No: What “done” means: a flag, a test, a doc in the same commit.

Every one is a sentence you could have written and did not.

Write the brief, not the instruction

an instruction

add caching to the API layer

a brief

Goal. Cut the dashboard’s p95 by caching its three read endpoints.

Context. They hit Postgres directly; the data changes a few times an hour.

Constraints. No new dependencies. Don’t touch the write path.

Done when. A second load serves from cache and the tests pass unchanged.

The constraints change the outcome. Without them you get a new library and a refactored write path.

Each surface needs one thing

Terminal agentsScope and permission. “Read-only until I say so.” Name the directory.
Editor panesWhich files are in scope. The selection is right about half the time.
Plain chatThe version you are on and a real snippet of your code.

Saying the brief instead of typing it

The constraints you skip when typing come out when you talk. Here is the same ask, said once.

“um so the export is broken on safari, it throws over ten megabytes, make the banner blue, no wait, red, and maybe add a CSV option”
Claude Code /voice
claude
> um so the export is broken on safari, it throws over ten megabytes, make the banner blue, no wait, red, and maybe add a CSV option
Its docs claim no clean-up
Wispr Flow
claude
> The export is broken on Safari. It throws over ten megabytes. Make the banner red, and maybe add a CSV option.
Tidies it
claude
> The export is broken on Safari. It throws over ten megabytes. Make the banner red.

Maybe add a CSV option.
Shapes it for your agent

Running several at once? Yappr Agents shows which one needs you.

Ask for depth only where it pays

  • Yes: Worth it: an intermittent bug, two designs you will live with, a migration plan.
  • No: Not worth it: one obvious path. You pay in latency every time.

The test: could a colleague answer without pausing? Then skip it.

The standing rules go in one file the agent reads every session: what to put in CLAUDE.md.

Dictating the brief instead of typing it? How Superwhisper compares.

Written 6 September 2026. Every fact about another product is from its own pages, checked that day.