Most AI outputs fail for the exact same reason: users describe what they want vaguely instead of defining the rules, constraints, and structure the AI needs to succeed.

Whether you are debugging code, writing high-converting copy, analyzing spreadsheets, generating images, or preparing for interviews, matching your prompt framework to your goal transforms mediocre results into publish-ready work. For foundational prompt composition rules, see our guide on how to write a good AI prompt.

Below are five complete, ready-to-use frameworks covering the most searched AI prompt categories on the web—each equipped with copy-paste templates and a quick selection comparison.


Category 1: Coding & Debugging Prompts

Best for: Software Engineers, Web Developers, and Code Authors (Cursor, Claude Code, ChatGPT, Windsurf)

Why Vague Coding Prompts Fail

Asking an AI to "fix this bug" or "optimize my function" often leads to hallucinated imports, broken edge cases, or over-engineered rewrites. Coding models perform best when you isolate the root cause, specify your tech stack, and demand verification steps.

  • Saying "my code doesn't work" forces the AI to guess the environment. Providing the exact error message, runtime version, and expected output pins down the bug immediately.
  • Saying "refactor this" risks changing business logic. Specifying time and space complexity goals and requiring unit tests preserves behavior while improving performance.

1. The Root-Cause Debugging Framework (Structured)

Best for: Tricky runtime errors, API failures, and broken state logic.

Prompt Template
Role & Context: Act as a Staff Software Engineer specializing in [Language/Framework, e.g., TypeScript / Next.js]. I am encountering a bug in the code below.

1. The Problem:
• Expected Behavior: [Describe what should happen]
• Actual Behavior: [Describe what is happening instead]
• Error Message / Logs: [Paste exact error]

2. Constraints:
• Do not introduce new external libraries unless strictly necessary.
• Preserve all existing function signatures and types.
• Handle edge cases (null inputs, empty arrays, network timeouts).

3. Required Output:
1. Root Cause: Explain why this bug is occurring in two sentences.
2. Fixed Code: Provide the complete, corrected code block.
3. Verification: Write 2–3 unit tests proving the bug is resolved.

Code:
[Paste code here]

2. The Agentic Repo-Wide Refactor Framework

Best for: IDE & CLI Agents (Claude Code, Cursor, Windsurf) with codebase access.

Prompt Template
Audit [file/folder path] to identify performance bottlenecks, security vulnerabilities, and anti-patterns.

Execution Plan:
1. Analyze: Trace data flow and identify redundant re-renders, N+1 queries, or unhandled promise rejections.
2. Refactor: Clean up the code following SOLID principles and our project's existing conventions.
3. Verify: Run the existing test suite and linter to ensure zero regressions. Summarize all modified files and explain the impact of each change.

3. The Quick Rubber-Duck Fix (Fast Iteration)

Best for: Rapid inline troubleshooting.

Prompt Template
This [language] snippet throws [Error Name] when [specific trigger]. Explain the exact line causing the failure, show the minimal patch to fix it, and tell me how to prevent it in the future.

[Paste snippet]

Quick Comparison: Coding Prompts

If your goal is...Use this promptWhy it works
Solving a complex bug without breaking logic1. Root-Cause DebuggingLocks down constraints, types, and edge cases before generating code.
Cleaning up multi-file architecture2. Agentic Repo-WideTriggers full-codebase auditing and automated test verification.
Getting a fast inline explanation3. Quick Rubber-DuckDelivers a minimal patch without rewriting your entire file.

For more specialized web debugging, consult our guide on how to prompt AI for better web design.


Category 2: Copywriting & Content Prompts

Best for: Marketers, Founders, Bloggers, and Content Creators

Why Vague Writing Prompts Fail

Asking AI to "write a blog post about X" or "write sales copy for my product" triggers recognizable AI clichés ("tapestry," "synergy," "cutting-edge," "in this modern landscape"). High-converting copy requires audience psychology, strict tone rules, and structural formatting.

  • Saying "make it engaging" produces fluff. Defining the target reader's exact pain point and desired outcome creates instant relevance.
  • Saying "optimize for search" leads to keyword stuffing. Specifying search intent, heading hierarchy, and natural semantic keywords builds rank-ready structure.

1. The High-Converting Landing Page Framework (Structured)

Best for: SaaS homepages, product launches, and sales pages.

Prompt Template
Role & Objective: Act as a Direct-Response Conversion Copywriter. Write landing page copy for [Product Name], which helps [Target Audience] achieve [Primary Outcome] without [Major Pain Point].

1. Voice & Style Rules:
• Write at an 8th-grade reading level using active verbs and short sentences.
• Forbidden words: Do not use unleash, elevate, seamless, cutting-edge, or tapestry.
• Focus on concrete benefits over technical features.

2. Required Sections:
• Hero Headline (Max 10 words): Hook the reader with a clear value proposition.
• Subheadline (Max 20 words): Explain how it works in plain English.
• Primary CTA Button: Action-oriented text (3–4 words).
• 3 Pain-to-Solution Blocks: Identify a specific frustration and show how the product solves it.
• Social Proof Framing: Suggest 3 trust-building metrics or testimonial angles.

2. The Search-Intent Content Framework

Best for: Long-form blog posts, guides, and organic traffic content.

Prompt Template
Write a comprehensive, search-optimized article targeting the primary keyword: "[Target Keyword]".

Content Parameters:
• Search Intent: [Informational / Commercial Comparison / How-To Tutorial]
• Target Audience: [e.g., Non-technical startup founders]
• Word Count: ~1,200–1,500 words.

Structural Requirements:
• Start with a 3-sentence hook that validates the reader's problem and promises a clear solution.
• Use descriptive H2 and H3 subheadings phrased around real user questions.
• Include bulleted takeaways, a markdown comparison table, and actionable examples in every section.
• End with a concise FAQ section answering 3 related long-tail queries.

3. The Punchy Social & Email Hook Rewriter (Fast Iteration)

Best for: LinkedIn posts, newsletters, and email subject lines.

Prompt Template
Rewrite the draft below into 5 distinct variations tailored for [Platform, e.g., LinkedIn / Cold Email].

Give me: (1) a contrarian hook, (2) a data/result-driven hook, (3) a relatable mistake story, (4) a step-by-step tactical list, and (5) a short, punchy 3-sentence version. Keep every line scannable with zero corporate jargon.

Draft: [Paste text]

Quick Comparison: Copywriting Prompts

If your goal is...Use this promptWhy it works
Writing persuasive website or product copy1. High-Converting Landing PageBans AI buzzwords and ties every section to user pain points.
Ranking on Google with helpful guides2. Search-Intent ContentEnforces scannable H2/H3 hierarchy, tables, and FAQ coverage.
Testing viral hooks or email angles3. Punchy Hook RewriterGenerates 5 distinct psychological angles in seconds.

Category 3: Data Analysis & Spreadsheet Prompts

Best for: Business Analysts, Operations Managers, Founders, and Finance Teams

Why Vague Data Prompts Fail

Uploading a CSV or pasting metrics and asking "what does this data mean?" results in surface-level summaries that state the obvious. Effective data prompts define the business KPI, ask for anomaly detection, and demand actionable recommendations.

  • Saying "analyze these numbers" gives you basic averages. Asking for cohort trends, outliers, and correlation hypotheses uncovers hidden revenue leaks or growth levers.
  • Saying "give me an Excel formula" often breaks on edge cases. Specifying your spreadsheet platform (Excel vs. Google Sheets) and exact column letters guarantees a working formula.

1. The Executive KPI & Anomaly Audit Framework (Structured)

Best for: CSV uploads, monthly performance reports, and financial datasets.

Prompt Template
Role & Objective: Act as a Senior Data Analyst. Analyze the attached dataset focusing on [Primary Metric, e.g., Customer Churn / ROAS / Monthly Revenue].

1. Diagnostic Breakdown:
• Top Trends: Identify the 3 most significant upward or downward trends over the timeframe.
• Anomalies & Outliers: Flag any sudden spikes, drops, or statistical outliers and hypothesize what caused them.
• Segment Comparison: Compare performance across [Dimensions, e.g., Region, Acquisition Channel, Plan Tier].

2. Output Format:
• Present findings in a crisp Executive Summary (bullet points with exact numbers and percentage changes).
• Include a Markdown Summary Table comparing top and bottom performers.
• Conclude with 3 Prioritized Recommendations ranked by potential business impact and ease of implementation.

2. The Bulletproof Formula & SQL Builder

Best for: Complex Excel/Google Sheets formulas, regex, and database queries.

Prompt Template
Write a [Excel / Google Sheets / PostgreSQL] formula/query to achieve the following logic:

Data Structure:
• Column A ([Name]): [Data type, e.g., Date YYYY-MM-DD]
• Column B ([Name]): [Data type, e.g., Status text]
• Column C ([Name]): [Data type, e.g., Revenue currency]

Goal: [Describe exact calculation, e.g., Sum Column C only if Column A is in Q3 2026 and Column B is "Paid", ignoring blank cells].

Requirements: Wrap the formula in error handling (IFERROR or COALESCE), explain how each nested function works step-by-step, and provide a sample test case.

3. The Quick Data Cleaning & Formatting Prompt (Fast Iteration)

Best for: Messy text lists, inconsistent dates, and raw exports.

Prompt Template
Clean and standardize the raw data below into a structured CSV / Markdown Table with columns: [Col 1, Col 2, Col 3]. Fix inconsistent capitalization, standardize all dates to YYYY-MM-DD, remove duplicate entries, and flag any rows with missing values in a separate Notes column.

Raw Data: [Paste messy data]

Quick Comparison: Data & Spreadsheet Prompts

If your goal is...Use this promptWhy it works
Turning raw spreadsheets into strategy1. Executive KPI AuditForces anomaly detection, percentage deltas, and ranked next steps.
Building complex formulas or SQL queries2. Bulletproof Formula BuilderMaps exact column types and includes built-in error handling.
Cleaning messy exports quickly3. Quick Data CleaningStandardizes formats and flags incomplete rows automatically.

Category 4: AI Image Generation Prompts

Best for: Designers, Marketers, and Content Creators (Midjourney, Flux, GPT Image, Imagen)

Why Vague Image Prompts Fail

Typing "a futuristic office with people working, realistic, 4k" produces cluttered, plastic-looking AI art. Image models respond to photography mechanics, lighting setups, composition framing, and material textures rather than empty quality buzzwords.

  • Saying "photorealistic" rarely looks real. Specifying lens focal length (e.g., 35mm or 85mm), lighting direction, and natural imperfections mimics real camera physics.
  • Saying "nice background" creates visual noise. Defining depth of field (f/1.8 bokeh) and color palette keeps the focal subject sharp.

1. The Commercial Photography & Product Framework (Structured)

Best for: Hero banners, product mockups, lifestyle branding, and editorial portraits.

Prompt Template
Subject: [Detailed description of main subject, pose, clothing, or product materials].
Environment: [Specific setting, background elements, and spatial depth].
Composition: [Camera angle, e.g., Eye-level medium shot / Low-angle wide shot], rule of thirds, clean negative space on the left for text overlay.
Lighting: [Lighting setup, e.g., Soft diffused morning window light from the side, warm rim lighting, subtle natural shadows].
Camera & Style: Shot on 35mm lens, f/2.8 aperture, shallow depth of field, authentic film grain, natural skin/surface textures, editorial photography style.
Color Palette: [2–3 cohesive colors, e.g., Warm terracotta, matte charcoal, and soft cream].

2. The UI Mockup & Brand Illustration Framework

Best for: Website spot illustrations, app icons, isometric graphics, and pitch deck visuals.

Prompt Template
Create a modern [3D isometric illustration / flat vector graphic / clean glassmorphism UI icon] representing [Concept, e.g., cloud security and real-time analytics].

Visual Rules:
• Background: Solid, clean [Hex color or off-white/dark slate] background with zero clutter.
• Materials & Finish: [e.g., Matte frosted glass, brushed anodized aluminum, soft clay textures].
• Color Restraint: Strictly limit palette to [Primary Brand Color] and [Secondary Accent] on a neutral base.
• Framing: Centered composition with generous padding around all edges. No embedded gibberish text.

3. The Quick Style & Variation Prompt (Fast Iteration)

Best for: Rapidly exploring visual directions.

Prompt Template
[Subject + Action] in a [Specific Art/Photo Style, e.g., minimalist architectural photography / Bauhaus geometric poster] style, illuminated by [Lighting, e.g., dramatic golden hour backlighting], composed with [Framing, e.g., symmetrical wide shot], muted earth-tone palette, high contrast, crisp details.

Quick Comparison: Image Generation Prompts

If your goal is...Use this promptWhy it works
Creating realistic brand or product photos1. Commercial PhotographyReplaces generic buzzwords with real lens, aperture, and lighting specs.
Generating clean web graphics and icons2. UI & Brand IllustrationEnforces solid backgrounds, color limits, and padding for easy web use.
Brainstorming visual concepts fast3. Quick Style VariationBalances subject, style, lighting, and framing in one compact line.

Category 5: Learning, Career & Interview Prep Prompts

Best for: Job Seekers, Students, Executives, and Lifelong Learners

Why Vague Learning Prompts Fail

Asking AI to "help me prepare for an interview" or "explain quantum computing" leads to passive walls of text you forget five minutes later. The best learning prompts turn the AI into an active simulator or Socratic tutor that tests your understanding one step at a time.

  • Saying "ask me interview questions" dumps 20 questions at once. Instructing the AI to ask one question at a time, wait for your answer, and grade it simulates real pressure.
  • Saying "summarize this topic" gives surface facts. Requesting mental models, real-world analogies, and diagnostic quizzes builds deep retention.

1. The Realistic Mock Interview Simulator (Structured)

Best for: Job interviews, salary negotiations, and investor pitch prep.

Prompt Template
Role & Objective: Act as a Hiring Manager interviewing me for a [Job Title] role at a [Company Type, e.g., Series B Fintech Startup].

Simulation Rules:
1. Ask me one interview question at a time (mix behavioral, situational, and role-specific technical questions).
2. Stop and wait for my response before moving on.
3. After I answer, provide structured feedback:
   • Score (1–10) based on clarity, impact, and STAR method alignment.
   • What worked well (1 bullet).
   • How to make it stronger (1 concrete improvement + a rewritten sample snippet).
4. Once feedback is given, immediately ask the next question. Start with Question #1 now.

2. The Feynman Deep-Learning Tutor Framework

Best for: Mastering complex technical subjects, books, or new industries quickly.

Prompt Template
Teach me [Complex Topic] using the Feynman Technique.

Step-by-Step Structure:
1. Plain-English Explanation: Explain the core concept as if I am smart, curious, and completely new to the field—use one concrete real-world analogy.
2. How It Works Under the Hood: Break down the 3–4 key mechanics or building blocks without academic jargon.
3. Common Misconceptions: List 2 things beginners usually get wrong about this topic.
4. Active Check: Ask me one conceptual question to test if I truly understand it, and wait for my reply before continuing.

3. The Resume & Bullet-Point Impact Upgrader (Fast Iteration)

Best for: Tailoring resumes and professional profiles to specific job descriptions.

Prompt Template
Rewrite my resume bullet points below to match the attached Job Description. Use the Action Verb + Task + Measurable Result formula, integrate relevant keywords naturally without lying, and cut weak phrases like "responsible for" or "helped with."

My Current Bullets: [Paste bullets]
Target Job Description: [Paste JD]

Quick Comparison: Learning & Career Prompts

If your goal is...Use this promptWhy it works
Practicing for a high-stakes interview1. Mock Interview SimulatorForces turn-by-turn practice with instant STAR scoring and rewrites.
Understanding a difficult topic deeply2. Feynman Learning TutorCombines analogies, misconception checks, and active recall testing.
Upgrading resume bullets for a role3. Resume Impact UpgraderAligns experience with job keywords using measurable outcome framing.

Universal Prompting Rulebook

Across all five categories, high-performing prompts share three core traits:

  1. Constraint Over Creativity: Tell the AI what not to do (banned buzzwords, no external libraries, color limits, one question at a time).
  2. Structure Over Prose: Use numbered rules, clear headings, and explicit output formats (tables, code blocks, bullet lists).
  3. Context Over Assumptions: Give the AI your exact tech stack, target audience, column names, or camera lens so it never has to guess.

If your outputs still miss the mark after setting constraints, see our diagnostic guide on how to improve AI responses to troubleshoot weak drafts.

Prompts that put this into practice

beginner★ Editor's Pick

Bug Diagnosis Prompt

Give the model the error, the code and what you expected. It ranks likely causes by evidence, tells you how to confirm each, and proposes a minimal fix.

# Role
You are an experienced engineer helping me find the cause of a bug. Diagnose first and fix second. Do not rewrite code that is not part of the problem.…
intermediate

Conversion Copywriting Prompt

Works out what a page must make the reader believe, then writes the copy in that order using only the proof you supply.

# Role
You are a conversion copywriter. You decide what a page has to say before you decide how to say it, and you treat every claim as something a skeptical bu…
beginner★ Editor's Pick

Image Prompt Writer

A prompt that writes prompts: describe the image you need and get three detailed, copy-ready image-generator prompts plus notes for iterating.

You write prompts for AI image generators. Turn the request below into precise visual descriptions an image model can act on. You are writing text, not creating…
intermediate

Pitch Deck Outline Prompt

Produces a slide-by-slide deck outline with a one-sentence claim per slide, the proof behind it, and the questions your audience is likely to ask.

# Role
You coach founders on fundraising and partnership pitches. You have sat on the receiving side of many decks and you know that the audience skims: each sl…

Keep reading

Sources and references

  1. Prompt engineering overview — Anthropic
  2. Prompt engineering guide — OpenAI
  3. Prompt design strategies — Google AI for Developers