Prompting for Beginners
The 3 parts
Section titled “The 3 parts”- Goal: what you want to build
- Context: tools, constraints, current state
- Output: what you need next (plan, code, review)
Good example
Section titled “Good example”“Goal: build a simple form with validation. Context: Astro + TypeScript, no UI library. Output: show the component code and explain the validation logic.”
Ask for checks
Section titled “Ask for checks”- “What could go wrong?”
- “What tests or manual checks?”
- “Explain trade-offs in 2-3 sentences.”
Avoid pitfalls
Section titled “Avoid pitfalls”- Don’t ask for everything at once.
- Keep steps small and verifiable.
- Paste the exact error message when stuck.