Prompt

A prompt is the instruction or question you give to an AI model to get a response. In vibe coding, prompts are how you tell AI what to build — from a simple 'add a dark mode toggle' to a detailed specification of an entire feature. The quality of your prompt directly determines the quality of the code you get back.

Example

Instead of prompting 'make a form,' you write 'create a contact form with name, email, and message fields, with validation that shows inline errors, using React Hook Form and Zod.' The more specific your prompt, the closer the output matches what you want.

Prompts are the fundamental unit of vibe coding. Instead of writing code character by character, you describe what you want in plain language — and AI translates that into working code.

What Makes a Good Prompt

Weak PromptStrong Prompt
"Make a button""Create a primary button component with hover and loading states using Tailwind CSS"
"Fix the bug""The form submits even when email is empty — add client-side validation"
"Add authentication""Add email/password login using NextAuth.js with a PostgreSQL adapter"

Types of Prompts in Vibe Coding

  • Generation — "Build a dashboard with these features..."
  • Modification — "Refactor this component to use server actions"
  • Debugging — "This function returns undefined when the array is empty"
  • Explanation — "Explain what this useEffect does and whether it has issues"
  • Review — "Check this code for security vulnerabilities"

Tips for Better Prompts

  1. Be specific — Include technologies, patterns, and constraints
  2. Give context — Mention the framework, existing patterns, and file structure
  3. One task at a time — Smaller, focused prompts get better results than giant ones
  4. Include examples — Show the AI what the output should look like
  5. Iterate — Refine the output with follow-up prompts rather than starting over