🧠 The Definitive Guide

The Claude Prompting
Framework

A structured 3-pillar system — Context · Role · Prompt — to get precise, expert-level outputs from Claude every single time.

① Context Layer
② Role Layer
③ Prompt Layer
④ Advanced Patterns
C1
Who You Are
User Identity · Background · Expertise Level
Claude tailors its output to who is asking. If you don’t tell it, it defaults to a generic audience. Declaring your background unlocks jargon, depth, and tone calibration that transforms generic answers into expert ones.
Example
I am a 10-year IT professional based in Mumbai, India. I’m building zero-cost AI-powered side businesses using free-tier tools. My technical level is intermediate-to-advanced — skip basic explanations.
⚡ Pro Tip
One sentence on your role, one on your goal, one on your skill level. That’s all Claude needs to shift from textbook to expert mode.
C2
The Situation / Problem Space
Current State · Constraints · What Already Exists
Describe the world Claude is stepping into. What exists? What doesn’t work? What have you already tried? This prevents Claude from suggesting things you’ve ruled out and grounds every response in your reality.
Example
Situation: I have a Gumroad product page for my digital guide “The Deep Focus Blueprint”. Conversions are below 1%. Constraints: Zero budget. Free-tier tools only. Already tried: Changed headline twice. Didn’t help.
C3
Desired End State
Goal · Success Metric · What “Done” Looks Like
Tell Claude where you want to end up — not just what you want it to do. This shifts Claude from task-executor to strategic partner. Include a measurable signal for success if possible.
Example
Goal: Conversion rate above 3% without spending money. Done when: I have final copy I can paste directly into Gumroad.
C4
Output Constraints
Format · Length · Tone · Exclusions
Claude needs to know what shape the output should take. Without this, you get prose when you wanted bullet points, or a 2000-word essay when you wanted a 5-step checklist. Be explicit.
Example
Format: Numbered list with subpoints. Use headers. Length: Under 600 words. Tone: Direct, no fluff. Write like a senior consultant. Exclude: No generic advice. No tools outside my stack.
✓ Do This
“Give me a 5-step plan in bullet points. Skip theory.”
✗ Not This
“Give me some ideas.” — Claude has no anchor; output is generic.

R1
Assign a Persona with Credentials
Expert Identity · Domain · Years of Experience
Claude adopts personas deeply. A vague “be an expert” produces generic output. A specific, credentialed persona with a distinct point of view produces opinionated, precise, specialist-level output.
Weak vs Strong Role Assignment
❌ Weak: “You are a marketing expert.” ✓ Strong: “You are a direct-response copywriter with 15 years experience writing conversion-focused landing pages for digital info-products. You are brutally honest and do not sugarcoat bad copy.”
⚡ Formula
Role = [Expert Title] + [Niche/Industry] + [Years/Scale of Experience] + [Personality/Stance]
R2
Define the Role’s Thinking Style
Approach · Decision Framework · Bias
Every expert thinks differently. A lawyer thinks in risk. An engineer thinks in systems. Tell Claude how the persona reasons — not just what they know.
Example
Thinking style: You think in systems and second-order effects. You prioritize asymmetric bets — low cost, high upside. You are skeptical of conventional advice and always look for the contrarian move that practitioners overlook.
R3
Set the Communication Contract
How Claude Should Talk to You · What It Can Assume
Define what the role is allowed to do: challenge you, skip preamble, ask clarifying questions, assume knowledge. This creates an operating agreement that governs the entire conversation.
Example Communication Contract
Contract:Do challenge my assumptions if you spot a flaw – Do skip disclaimers and “great question!” openers – Don’t hedge every statement with “it depends” – If you’re unsure, ask ONE clarifying question before proceeding
R4
Layer Multiple Roles When Needed
Hybrid Expert · Multi-Domain Tasks
Complex tasks sit at the intersection of multiple disciplines. You can instruct Claude to embody a primary role while borrowing the lens of another — unlocking cross-disciplinary thinking most prompts miss.
Multi-Role Example
Primary role: Senior product strategist, 5 SaaS launches. Secondary lens: Behavioral economist — why customers buy. Constraint: Everything must work inside India’s ecosystem.

P1
State the Core Ask — One Sentence
Clarity · Single Directive · Action Verb
After context and role, Claude needs one crystal-clear instruction. Lead with an action verb. If your ask has more than one goal, split it into multiple prompts.
Good Core Asks
Rewrite my Gumroad landing page copy to increase conversion. Build a zero-cost automation flow using Make.com + Beehiiv. Audit my business plan and identify the top 3 failure points. Compare OPC vs Sole Proprietorship for a ₹5L/yr digital business.
P2
Use XML Tags for Structured Input
XML Structure · Multi-Part Prompts · Clarity Boost
Claude responds significantly better to XML-tagged prompts. Tags create clear boundaries between different types of information — especially powerful for complex, multi-part prompts.
XML-Tagged Prompt Template
<context> Your situation here </context> <role> Expert persona here </role> <task> One clear ask here </task> <input> Raw material Claude needs </input> <constraints> Format, length, exclusions </constraints>
⚡ Why XML Works
Claude was trained on XML-heavy data. Tags parse complex prompts with near-zero ambiguity. Use <context>, <role>, <task>, <input>, <constraints>, <examples>, <output_format> consistently.
P3
Provide Examples (Few-Shot)
Positive Examples · Negative Examples · Style Anchors
Examples are the fastest way to align Claude’s output to your taste. Show what “good” looks like. Even better: show what “bad” looks like. One good example is worth 100 words of instruction.
Few-Shot Example Block
✓ Good: “Stop Losing 3 Hours a Day to Distraction — Here’s the Fix” ✗ Avoid: “Boost Your Productivity Today!” — too vague, no pain point
P4
Ask for Step-by-Step Reasoning
Chain of Thought · Show Work · Audit Trail
For complex analytical or strategic tasks, ask Claude to reason out loud before concluding. This activates deeper processing and lets you audit the thinking.
Reasoning Triggers
“Think step by step before giving your final answer.” “First identify the problem. Then diagnose. Then propose solutions.” “Before answering, list your assumptions explicitly.”
P5
Specify the Exact Output Format
Structure · Length · Section Headers · Artifacts
The most common reason Claude’s output misses the mark is not content — it’s format. Be specific: headers, word count, number of items, markdown vs plain text. This alone upgrades 80% of prompts.
Output Format Block
<output_format> Structure: Numbered sections with sub-bullets Length: 400–600 words Tone: Direct. Bold key terms. Sections: Root Cause / Quick Wins / Long-Term Fixes / Don’ts Deliver as a downloadable Artifact. </output_format>

A1
The Iterative Refinement Loop
Draft → Critique → Revise · Multi-Turn Strategy
Never accept the first output as final for high-stakes work. Use a 3-step loop: generate a draft, have Claude critique it as a different expert, then revise to final.
1
Generate Draft
“Write a first draft of [X] using the role and context above.”
2
Switch Role & Critique
“Now act as a harsh critic. List every weakness. Be specific.”
3
Revise to Final
“Now revise the draft to fix every weakness. This is the final version.”
A2
The Constraint Tightening Method
Progressive Narrowing · Specificity Ladder
Start broad to explore the solution space, then progressively add constraints to narrow to exactly what you need. Far more effective than writing the perfect prompt on the first try.
Constraint Ladder
Turn 1: “What are all ways I could monetize a productivity newsletter?” Turn 2: “Which work without upfront investment, for an Indian audience?” Turn 3: “Give me a week-by-week plan using Beehiiv + Gumroad free tiers.”
A3
The Devil’s Advocate Prompt
Pre-Mortem · Stress Testing · Anti-Fragility
Before executing any strategy, have Claude attack it. This surfaces failure modes before you invest time and money.
Devil’s Advocate Trigger
“You are a skeptical VC who has seen 1,000 plans fail. List every assumption that could be wrong, every failure point, every reason this won’t work. Be brutal. Don’t be polite.”
A4
Using Claude Projects for Persistent Context
Projects Feature · Long-Term Memory · Reuse
Use Claude Projects to save your context, role, and base instructions once. Every conversation inside that Project inherits them automatically.
  • Create a Project for each domain: “Business Strategy”, “Copywriting”, “Coding”, “Tax & Legal”.
  • Paste your full Context + Role block into the Project instructions once.
  • Attach key documents (plans, drafts) as project files — Claude references them in any conversation.
  • Each new chat skips directly to the Prompt layer — no setup needed.

🧩 Master Template — Copy & Customize

The complete framework in one reusable prompt structure. Fill in the brackets for any task.

Full Claude Prompting Framework — Master Template
<context> I am [your profession], based in [location]. My expertise level: [beginner / intermediate / advanced]. Situation: [current state, what’s broken, what you’ve tried] Constraints: Budget [X]. Tools: [list]. Cannot: [exclusions]. Goal: [outcome]. Done when: [measurable definition]. </context> <role> You are [expert title] with [X] years in [niche]. Track record: [credential]. Thinking style: [how they reason]. Do: [what Claude should always do] Don’t: [what Claude must avoid] Assume I know: [domain knowledge to skip] </role> <task> [ONE action verb + what you want] </task> <input> [Paste raw material: copy, code, plan, data] </input> <examples> Good: [example] | Bad: [example] </examples> <output_format> Structure: [list/headers/prose] | Length: [words] Tone: [direct/formal] | Deliver as: [artifact/inline] Sections: [list required sections] </output_format> Think step by step before giving your final answer.
  • C1
    Who You Are — profession, expertise level, location.
  • C2
    Situation — current state, what’s tried, what’s broken.
  • C3
    End Goal — what “done” looks like. Include a measurable signal.
  • C4
    Output Constraints — format, length, tone, exclusions.
  • R1
    Persona + Credentials — title, niche, track record, years.
  • R2
    Thinking Style — how the expert reasons, their bias.
  • R3
    Communication Contract — what Claude can/can’t do in this session.
  • R4
    Layered Roles — primary expert + secondary lens for cross-domain tasks.
  • P1
    Core Ask — one sentence, action verb first.
  • P2
    XML Structure — use <context> <role> <task> <input> <constraints> tags.
  • P3
    Examples — 1–2 good, 1 bad. More powerful than instruction text.
  • P4
    Reasoning Trigger — “Think step by step” for complex tasks.
  • P5
    Output Format — structure, length, sections, artifact vs. inline.
  • A1
    Iterative Loop — Draft → Critique (new role) → Final revision.
  • A2
    Constraint Tightening — explore broad, then narrow progressively.
  • A3
    Devil’s Advocate — pre-mortem any plan before executing.
  • A4
    Projects — save context + role once, reuse across all sessions.