Prompting Patterns That Work

After thousands of interactions with Claude Code, certain patterns emerge that consistently produce better results. Here are the most effective ones for building software.

Pattern 1: The Step-by-Step Request

When building something complex, break it down explicitly:

Prompt:

"Let's build a todo app step by step:
1. First, create the basic HTML structure with a form and list
2. Then add CSS for a clean, modern look
3. Finally, add JavaScript to handle adding/removing todos

Start with step 1."

Pattern 2: The Example-First Request

Show Claude what you want through examples:

Prompt:

"Create a card component. Here's an example of the data it should display:

Title: 'Product Launch'
Date: 'Jan 15, 2026'
Status: 'In Progress' (yellow badge)
Description: 'Q1 product launch planning and execution'

Make it look like a Notion-style card with rounded corners and subtle shadow."

Pattern 3: The Constraint-Based Request

Set clear boundaries:

Prompt:

"Build a pricing table with these constraints:
- Exactly 3 pricing tiers
- Use only Tailwind CSS (no custom CSS)
- Must be responsive (stack on mobile)
- No external dependencies
- The middle tier should be visually highlighted as 'recommended'"

Pattern 4: The Reference-Based Request

Point to existing examples:

Prompt:

"Create a hero section similar to Linear.app's homepage - large headline, subtext, CTA button, with a subtle gradient background and floating UI elements on the sides."

Pattern 5: The Iteration Request

Build on what exists:

Prompt:

"The button looks good but I want to improve it:
- Add a hover animation (scale up slightly)
- Add a loading state with a spinner
- Add a disabled state (grayed out, no hover)

Keep all the existing styling."

Anti-Patterns to Avoid

❌ Too vague:

"Make it look nice" — Nice how? Colors? Spacing? Typography?

❌ Too many things at once:

"Build me a complete e-commerce site with auth, cart, payments, and admin" — Break this into 10 separate requests.

❌ Assuming context:

"Fix the bug" — Which bug? In which file? What's the expected behavior?

💡 The Golden Rule

If you can't explain what you want to a new team member in 30 seconds, you can't explain it to Claude. The exercise of writing clear prompts forces you to clarify your own thinking.