A coding agent is only as good as the task you hand it. Vague prompts lead to wandering, extra reading, and wasted tokens. Clear ones finish in a few steps.
What makes a prompt finishable?
- A goal you can check: "the login test passes" beats "improve login".
- Where to look: name the file, folder or function.
- Limits: "do not change the public API" or "only touch this folder".
- How to verify: the command to run afterwards.
Weak and strong, side by side
Weak: make the app faster
Strong: the /search endpoint takes 2s. Find why in src/search/,
propose the smallest fix, and run npm test afterwards.
Should I ask for a plan first?
For anything bigger than a small fix, yes. Ask for a short plan, read it, then say go. Catching a wrong direction in the plan is far cheaper than in a finished diff.
Does a better prompt save tokens?
Yes. A specific request means less searching and fewer retries. That is one of the simplest ways to reduce token usage.
Put it into practice with a real task: create an account.
Toknary