← Cheatsheets / Prompting

Prompting Patterns for Vibecoding

Battle-tested prompt structures that actually work. Copy, paste, customize.

prompts patterns techniques llm

Patterns that work every time. Copy the structure, fill in your details.

PatternUse When
RISENComplex tasks needing structure
Few-ShotFormat conversions, style matching
Chain-of-ThoughtComplex reasoning, debugging
Structured OutputNeed consistent response format
Meta-PromptingImproving weak prompts
RevisionRefining almost-right output

The RISEN Framework

The gold standard for task prompts:

LetterMeaningExample
RRole”You are a senior TypeScript developer”
IInstructions”Refactor this function to use async/await”
SSpecifics”Keep the same function signature”
EExamples”Like this: async function fetch()...
NNotes”Don’t change the error handling logic”

RISEN Template

You are a [ROLE] with expertise in [DOMAIN].

Your task is to [INSTRUCTION].

Requirements:
- [SPECIFIC 1]
- [SPECIFIC 2]
- [SPECIFIC 3]

Example of what I want:
[EXAMPLE]

Important notes:
- [CONSTRAINT 1]
- [CONSTRAINT 2]

Few-Shot Prompting

Show, don’t tell:

Convert these function names to kebab-case:

getUserData → get-user-data
setAPIKey → set-api-key
handleFormSubmit → handle-form-submit

Now convert these:
fetchAllUsers →
updateDatabaseRecord →
validateEmailFormat →

Chain-of-Thought (CoT)

Force step-by-step reasoning:

Think through this step by step:

1. First, identify the problem
2. Then, list possible solutions
3. Evaluate trade-offs of each
4. Recommend the best approach
5. Show implementation

Problem: [YOUR PROBLEM]

Zero-Shot CoT

Just add the magic words:

[Your prompt here]

Let's think through this step by step.

Structured Output

Get consistent formats:

Analyze this code and respond in this exact format:

## Summary
[One paragraph overview]

## Issues Found
- Issue 1: [description]
- Issue 2: [description]

## Suggested Fixes
1. [Fix for issue 1]
2. [Fix for issue 2]

## Risk Assessment
Low | Medium | High

Persona Patterns

The Expert

You are a principal engineer at a FAANG company 
with 15 years of experience. You've seen every 
anti-pattern and know every best practice.

Review this code like you're mentoring a junior:

The Critic

You are a skeptical code reviewer who has been 
burned by technical debt before. Find everything 
wrong with this approach, no matter how minor:

The Optimizer

You are obsessed with performance. Every 
millisecond matters. Every byte counts.

Optimize this code for maximum speed:

Context Management

The Scoping Prompt

Focus only on the authentication module.
Ignore all other files unless they directly 
import from or export to auth/*.

Do not suggest changes to unrelated code.

The Boundary Prompt

You can read any file, but only modify files 
matching these patterns:
- src/components/**/*.tsx
- src/utils/**/*.ts

If you need to change anything else, tell me 
what to change instead of doing it.

Iteration Patterns

The Refinement Loop

This is good but not quite right.

Keep: [what's working]
Change: [what needs to change]
Add: [what's missing]
Remove: [what shouldn't be there]

The Comparison

You gave me two approaches. Compare them:

| Criteria | Approach A | Approach B |
|----------|------------|------------|
| Performance | ? | ? |
| Readability | ? | ? |
| Maintainability | ? | ? |
| Recommendation | ? | ? |

Error Recovery

The Debug Prompt

This code throws an error:

[ERROR MESSAGE]

The code that caused it:
[CODE]

What I expected:
[EXPECTED BEHAVIOR]

What actually happened:
[ACTUAL BEHAVIOR]

Walk me through debugging this.

The Stack Trace Prompt

Here's the full stack trace:

[STACK TRACE]

1. What's the root cause?
2. What file/line should I look at?
3. What's the fix?

Anti-Patterns to Avoid

❌ Don’t✅ Do
”Make it better""Improve readability by extracting helpers"
"Fix the bug""The login fails when email has a + sign"
"Write tests""Write Jest unit tests for the validate() function"
"Clean this up""Remove dead code and add TypeScript types”

Quick Wins

Add these to any prompt:

  • "Be concise" — Shorter responses
  • "Use bullet points" — Scannable output
  • "Show your reasoning" — Explainable AI
  • "Include code comments" — Self-documenting code
  • "Consider edge cases" — More robust solutions

Meta-Prompting

When you’re not sure how to prompt:

I want to [GOAL].

What questions should I answer before you can help me effectively?

Or:

Before you start coding:
1. What assumptions are you making?
2. What clarifying questions do you have?
3. What's your proposed approach?

The Revision Pattern

When output is close but not right:

That's 80% of what I need. 

Keep everything, but:
1. Change [X] to [Y]
2. Add [Z] after [A]
3. Remove [B]

Don't regenerate the whole thing—just make these changes.

🎯 Use a Pattern Now

  1. Identify your task type (building, debugging, formatting)
  2. Pick a pattern from the table above
  3. Copy the template
  4. Fill in your specifics
  5. See the difference in output quality

Start with RISEN — it works for almost everything.


Guides:

Cheatsheets:

Blog:

✓ Copied to clipboard!