Guide · Prompts · ★☆☆☆☆
How to write prompts for Claude Code (with real examples)
The most common beginner mistake is a vague one-line prompt, then keeping whatever comes back. These are my own prompts from building this site, typos and all, and what each one produced.
By Arthur Hsiao · Last updated · 6 min read
The short version. A good prompt says what to change, where, and how you'll know it worked. Every prompt below is copied from this site's Claude Code session logs, unedited, with the reply it got.
1Say what goes in, not just "make it nicer"
Before (26 Oct 2026, the site's first day):
make home page to be like will be more thing coming soon
What came back: two "coming soon" cards with titles and text Claude made up, plus this note:
The card titles and descriptions are placeholder text, so edit them to match what you actually plan to add.
Claude did its job. It guessed, then told me it guessed. If I had named the cards ("More guides" and "Projects", one line each), there would have been nothing to redo. When you know the content, put it in the prompt.
2Describe the result in detail
Before (30 Oct, About page effect):
I like twist animation. can you use same pattern and change to fairy light? like fairy light tornado cover 70% about page
What came back: 120 warm gold dots spiralling down a funnel behind the text. It matched the words, but it wasn't what I pictured.
After:
change to front-end background effect: a glowing Fairy Light Magic Circle positioned directly behind a target DOM element with 60fps performance. light color can use the one like blue light on the hero. Visuals: Include smooth rotational animation, soft ambient glow (box-shadow or SVG drop-shadow), and floating/sparkling light particles.
What came back: Claude found the hero's blue in the code (--visor: #35D4DE), put three rotating rings behind the intro, and checked it in Chrome. It also said what it didn't check: light mode, phones and the frame rate. The second prompt names the place, the colour source, the motion and the look, so there is far less to guess.
3Give numbers when you correct it
Feedback:
the light looks a distracting to readers. make it darker and transparent. also mix with cyberpunk style element to effect so it match the website style
What came back: the rings went from pulsing between 55% and 100% opacity to between 22% and 50%, with thinner lines and a smaller glow. Claude answered a vague "darker" with numbers, so I could judge it. Next time, give the numbers yourself ("half as bright") and say who the problem is for, as "distracting to readers" did.
4Ask for a plan first on big changes
Hero ascii assemble animation change to like in the center there is sucking point and suck ascii by digi into the hero. Let me know your plan in short
What came back: no code. It began Plan in short. I have not changed anything yet., then wrote how I read it (characters pulled into a point in the centre, nearest first), and which old code would go. I only had to type Sounds good.
The "how I read it" part is the point: a wrong reading costs one message to fix, not a rebuild. For bigger jobs, use plan mode, which does the same with no risk of edits.
5Paste the exact error
Issue Reported by Google console Top non-critical issues‡ Datetime property 'uploadDate' is missing a time zone Invalid datetime value for 'uploadDate' The upload date is 03/11/2026 in Brisbane
What came back: one change, uploadDate set to 2026-11-03T00:00:00+10:00, and the note that it was the only uploadDate on the site. The pasted text named the property and the problem; my last line gave the one fact Claude couldn't know (the date and city). Copy errors word for word. Don't retype them from memory.
6Use words that mean one thing
post first guide from roadmap and bumpup version to 3.5.0
"Post" can mean "write it" or "publish it". Claude chose the safe reading:
Nothing is committed or pushed, because I read "post" as "add the guide" and your notes say you push yourself.
A good outcome, but only because it asked itself the question. Say the end state you want: "add the guide, bump the version, commit, don't push".
Turn repeated prompts into rules
If you type the same instruction in every session, it belongs in a file. I kept telling Claude to close its test servers (remember when finsh test turn off all port you have been testing with), then asked: move stop-test-servers rule into claude.md in this project. Now every session gets it without asking. See CLAUDE.md best practices.
For work that spans many sessions, keep the plan in a roadmap file and prompt with one task at a time from it.
A checklist before you press Enter
- What: the change, in one sentence.
- Where: the page, file or component.
@plus a path adds a file directly. - How to check: "build passes", "looks right at phone width", "the error is gone".
- How big: one task per prompt. For anything large, ask for the plan first.
Next: use Claude Code in VS Code, where selecting code adds it to your prompt. New here? Start with Claude Code for beginners.