10 May 2026

دليل · Guide6 min read

صيغة الأربع كتل: كيف تكتب أوامر Claude بدقة وتحصل على نتائج احترافيةThe Four Block Prompt Formula for Precise Claude Outputs

A four block structure for any Claude prompt: a clear role, specific context, a direct task and explicit constraints. Use it and you get the output you want on the first reply.

Who this guide is for

Developers, teams and creators who use Claude every day

Key terms

Prompt
The text you write to ask Claude for something. Its quality sets the quality of the answer.
Role
The expertise you ask Claude to work from in this conversation, such as engineer, editor or analyst.
Context
What Claude needs to understand your situation: the project, the audience, what is done and the material you have.
Constraints
The limits the answer must respect: length, format, language and what you do not want at all.

The steps

  1. Step 1

    See why outputs miss the mark

    Most people write Claude prompts at random, then wonder why the output misses.

    The problem is not Claude. It is the structure of the prompt. When the role, context or constraints are missing, the model fills the gap with its own assumptions.

    The fix is one fixed structure of four blocks, written in the same order every time: role, context, task, constraints.

  2. Step 2

    Set the role in one line

    Open the prompt with one line that tells Claude who it is in this conversation.

    The role sets the level of expertise, the vocabulary and the angle. "You are a senior backend engineer" gets a very different answer from a question with no role.

    Make the role specific to a field and a level, not generic.

    PromptRole block
    You are a [ROLE: for example a senior Node.js backend engineer, an Arabic content editor, a data analyst] helping me with [PROJECT OR TASK].

    Tip: One clear role beats three roles merged into one line.

  3. Step 3

    Give specific context

    Context is what a new teammate would need to know before starting.

    Write only what Claude needs: the project, the audience, the current phase and the decisions already made. Extra unstructured context hurts as much as it helps.

    If you have the material, such as code, text or data, paste it into the prompt instead of describing it.

    PromptContext block
    Context:
    Project: [ONE SENTENCE DESCRIPTION]
    Audience: [WHO WILL USE THE OUTPUT]
    Current phase: [WHERE YOU ARE NOW]
    Locked decisions, not open for debate: [DECISIONS]
    Material: [PASTE THE CODE OR TEXT HERE]
  4. Step 4

    Write the task directly

    The task is one or two sentences that say exactly what you want. A clear verb and a clear result.

    Instead of "help me with this code", write "Rewrite this function to handle errors explicitly and keep its external behavior the same".

    If the task is big, split it. One task per prompt gives a sharper result.

    PromptTask block
    Task: [CLEAR VERB + THE EXACT RESULT, for example: write three versions of the landing page headline aimed at [AUDIENCE]].
  5. Step 5

    Add explicit constraints

    Constraints are the block most people skip, and the one that saves you revision rounds.

    State the format, the length, the language and what you do not want. Claude fills any empty space with its own assumptions. Explicit constraints point it exactly where you need it.

    One concrete example of the output you want is worth ten sentences of description.

    PromptConstraints block
    Constraints:
    Format: [TABLE, BULLETS, CODE ONLY, ONE PARAGRAPH]
    Length: [for example no more than 150 words]
    Language: [ENGLISH OR ARABIC]
    Do not: [WHAT YOU DO NOT WANT, for example no intro and no conclusion]
    If you are unsure about anything, ask me one question before you start.
  6. Step 6

    Combine the four blocks into one template

    Now put the four blocks together in order: role, context, task, constraints.

    Save this template in a file or a note and paste it at the start of every important conversation. After a while you write it without thinking.

    Apply it in every conversation and the difference shows from the first line.

    PromptFull template
    You are a [ROLE] helping me with [PROJECT].
    
    Context:
    [PROJECT, AUDIENCE, CURRENT PHASE, LOCKED DECISIONS, MATERIAL]
    
    Task:
    [EXACTLY WHAT YOU WANT IN ONE OR TWO SENTENCES]
    
    Constraints:
    Format: [FORMAT]
    Length: [LENGTH]
    Language: [LANGUAGE]
    Do not: [WHAT YOU DO NOT WANT]
    If you need missing information, ask me one question before you start.

    Tip: If the answer misses, fix the weak block in the same conversation instead of starting over.

Ready prompts to copy

PromptTurn my request into four blocks
Here is a request I wrote quickly: [PASTE YOUR REQUEST]

Rewrite it in the four block format: role, context, task, constraints. Where a block is missing information, put a placeholder in square brackets for me to fill. Do not carry out the request itself.

The takeaway

Role, context, task, constraints. Use them in your next prompt and compare the answer with what you got before.

Most value

Start building with me now

We sit together, break down your problem, and I build the AI solution with you step by step

60minutes
  • A private session with you
  • Real building during the session
  • Results you take with you when we finish
Book a build session

100% free

A free consultation about your problem

Start

The full path · Monthly subscription

Full access to every guide (29) for 249 AED/month