Writing effective prompts
Get better results by writing clear, detailed prompts.
The basics
Be specific
Less effective:
Make a todo app
More effective:
Build a todo app with:
- Add tasks with a text input
- Mark tasks complete with checkboxes
- Delete tasks with a trash button
- Filter by All, Active, Completed
- Count showing remaining tasks
Include UI details
Create a dashboard with:
- Sidebar navigation on the left (dark gray background)
- Main content area with white background
- Cards showing metrics (rounded corners, subtle shadow)
- Header with logo and user avatar dropdown
Specify behavior
Build a contact form where:
- All fields are required
- Email validates correct format
- Phone number accepts only digits
- Shows success message after submit
- Clears form after successful submission
Prompt patterns
Feature list
Structure complex apps as a list:
Build a project management app with these features:
1. Projects
- Create/edit/delete projects
- Add team members
- Set deadlines
2. Tasks
- Create tasks within projects
- Assign to team members
- Set priority (low/medium/high)
- Due dates with reminders
3. Dashboard
- Overview of all projects
- Tasks due this week
- Team activity feed
Reference existing apps
Build a note-taking app similar to Notion:
- Sidebar with page tree
- Block-based editor
- Support for headings, lists, code blocks
- Drag and drop to reorder blocks
Technical requirements
When you have specific needs:
Create a REST API using:
- FastAPI framework
- PostgreSQL database
- JWT authentication
- OpenAPI documentation
- Rate limiting (100 requests/minute)
What to include
Always helpful
- Feature list
- UI preferences (colors, layout, style)
- User flows (what happens when...)
- Data relationships
- Platform (web, mobile, or both)
Sometimes needed
- Specific libraries to use
- Third-party integrations
- Performance requirements
- Accessibility needs
Usually unnecessary
- Implementation details (let AI decide)
- File structure (follows conventions)
- Variable names
- Minor styling details
Iteration prompts
Adding features
Add user authentication with:
- Email/password signup
- Login with remember me option
- Password reset via email
Modifying behavior
Change the task list to:
- Show tasks grouped by due date
- Highlight overdue tasks in red
- Add sorting by priority
Fixing issues
The save button doesn't work.
It should save the form data and show a success message.
Styling changes
Update the color scheme:
- Primary: #6366f1 (indigo)
- Background: #f8fafc (light gray)
- Text: #1e293b (dark slate)
Common mistakes
Too vague
❌ Make it look better
✓ Update the design: add more whitespace between sections, use rounded corners on cards, make the font size larger
Too broad
❌ Build a complete e-commerce platform
✓ Start with: Build a product catalog page with search and filters
Then iterate: Add shopping cart functionality
Conflicting requirements
❌ Make it minimal but also feature-rich with lots of options
✓ Design a minimal interface. Show advanced options in a collapsible section
Tips for better results
- Start simple - Begin with core features, add complexity later
- One thing at a time - Focused prompts get better results
- Review and iterate - Build on what's generated
- Use the editor - Fine-tune details manually
- Save good prompts - Reuse patterns that work