Beginner8 min

Writing a Prompt the Agent Can Act On

The most common beginner mistake is being vague. "Make a website" gives the agent a thousand choices, so it picks for you and you are surprised by the result. A good first prompt names what to build, where, and how you will know it worked. Think goal, constraints, and check.

Step 1: State the goal, not the method

Tell the agent the outcome you want and let it choose the implementation. You are the product owner, not the typist.

good-prompt.txt
Build a single-page to-do list in plain HTML, CSS, and JavaScript.
I should be able to add a task, mark it done, and delete it.
Keep it in one index.html file. Open it in my browser when you are done.

Step 2: Let it work, then read the diff

The agent will create files and may run commands. Watch what it changes. Both Claude Code and Cursor show you a diff (the exact lines added and removed) before or after each edit. Reading diffs is the core beginner skill, even if you do not understand every line yet.

zsh - todo-app
$claude
> build a single-page to-do list in one index.html file
Created index.html (84 lines)
Opened index.html in your default browser.
You can add, complete, and delete tasks. Anything else?
$

Step 3: Refine in small turns

Do not rewrite your whole request when something is off. Give one small follow-up: "The delete button is hard to see, make it red and move it to the right." Small turns keep the agent on track and make it easy to spot what changed.

The check is the secret
Always end a prompt with how success is measured. "Run it and confirm the three buttons work" turns a hopeful guess into a verified result. The agent will keep going until that check passes.
Browser - index.html
[ My Tasks ]
+ Add a task ........................ [ Add ]
[x] Buy groceries [ done ] [ delete ]
[ ] Finish the course [ done ] [ delete ]
A working to-do list built from one plain-language prompt.

Hands-on tasks