Prompt TipsJan 28, 20268 min

How to Write Prompts for Claude 4.5: A Practical Playbook for Getting Reliable Outputs

A developer-friendly guide to prompting Claude 4.5 with structure, guardrails, and iteration loops that actually hold up in real work.

How to Write Prompts for Claude 4.5: A Practical Playbook for Getting Reliable Outputs

The most common mistake I see with Claude 4.5 is treating it like a very smart textbox. You toss in a paragraph, you get a paragraph back, and then you spend the next 20 minutes asking "why did it ignore my format?" or "why did it drift into a different scope?"

Claude 4.5 is absolutely capable of doing disciplined work. The catch is that you have to prompt it like you're designing a mini interface, not writing a one-off request.

What I like about this framing is that it aligns with what we're seeing in recent research: systems win when they're explicit about stages, constraints, and what "good" looks like. METIS, for example, beats a Claude Sonnet 4.5 baseline most strongly in later, document-grounded stages by being stage-aware and by forcing actionable next steps plus evidence checks [1]. That's not a "Claude problem." That's a "prompting is a control surface" problem.

So here's my playbook for writing prompts that hold up with Claude 4.5, especially when you care about consistency across turns.


The Claude 4.5 prompt stack: intent, rails, and a contract

If you take one idea from this article, take this: stop writing "a prompt." Start writing a three-part contract.

First, define intent. Second, define rails (constraints and boundaries). Third, define a contract for output (format, checks, and how to handle missing info).

This mirrors what stage-aware systems do in practice. METIS doesn't just "answer." It detects the stage, asks a small set of high-impact questions, then produces actionable guidance, and it explicitly pushes the user forward to the next stage [1]. You can do a lightweight version of that in your own prompts.

Here's a pattern I've had the most success with:

You are Claude 4.5. I'm using you as a [role].

Goal:
- [one sentence outcome]

Context:
- [facts, constraints, dependencies, what's already true]
- [what "done" means]

Rules:
- Ask up to N clarifying questions only if missing info would change the output.
- If you must assume, state assumptions briefly and proceed.
- Do not change scope unless I explicitly ask.

Output contract:
- Output format: [JSON | Markdown | table | bulletless prose | etc.]
- Include: [sections]
- Exclude: [things you don't want]
- Quality check: Before finalizing, verify [criteria].

That "quality check" line looks small, but it changes behavior. You're telling Claude there's a finishing step that is not optional. In METIS, evaluation heavily rewards stage awareness and adherence to constraints (and punishes hallucinated or unverifiable claims) [1]. Your prompt should bake in the same incentives.


Write prompts like you expect multiple turns (because you should)

A lot of prompt advice is secretly single-turn advice. Real work isn't.

The thing that breaks in multi-turn Claude sessions is drift: it forgets earlier constraints, starts optimizing for "helpful," and gradually reshapes your original intent.

Power users deal with this by making constraints persistent. In Claude Code workflows, people do this by embedding "permanent memory" in a CLAUDE.md file so Claude rereads the rules every time [3]. Even if you're not using Claude Code, you can copy the concept: create a "session header" prompt that you paste at the top of a thread, and update it when requirements change.

My rule: if you care about consistent style, structure, or policy constraints, don't rely on conversational memory. Reassert it.

A simple trick: end your first message with a "Lock" section that you can reference later:

Lock:
- Always output in valid JSON with keys: ...
- Never propose paid tools.
- Keep answers under 250 words unless I say "expand".

Then, when things drift, you don't argue. You just say: "Re-run with the same Lock."


Force better questions without falling into question loops

Claude 4.5 can ask great clarifying questions, but it can also stall. METIS explicitly balances questioning with action: 30-50% questions, 50-70% actionable guidance, and it warns against "question loops" where the assistant keeps asking instead of helping [1].

You can prompt for the same behavior.

What works well is telling Claude exactly when it's allowed to ask questions, and what to do if it can't:

Ask at most 2 clarifying questions, only if the missing info would change the plan.
If you ask questions, also provide a "best-effort draft" based on stated assumptions.

This avoids the two worst modes: Claude guessing silently, or Claude turning into an intake form.


Use "stages" to get predictability

Claude is much easier to steer when you tell it what stage you're in.

That's one of the big takeaways from METIS: stage-aware routing and stage-specific expectations are where the quality gains concentrate, especially in later stages where grounding matters [1]. Even without tools, simply telling Claude "we are in Stage C: research plan" changes the shape of its response.

For product and engineering work, my go-to stage labels look like this:

  • Stage 0: clarify requirements
  • Stage 1: propose options + tradeoffs
  • Stage 2: pick one and plan
  • Stage 3: implement (or draft)
  • Stage 4: review + test + refine

Then I literally put it in the prompt: "We are in Stage 2. Do not jump to implementation."

Claude listens to that surprisingly well, because you've given it a local objective other than "be helpful."


Practical examples you can copy/paste

Now let's make this concrete. Here are prompts I'd actually use with Claude 4.5.

Example 1: A spec that doesn't wander

You are a senior product engineer.

Goal:
Write a technical spec for adding "Export to CSV" to our web app.

Context:
- Frontend: React, backend: Node/Express, DB: Postgres
- CSV export must support filters currently applied in UI
- Max dataset size: 250k rows (streaming required)
- Compliance: do not export PII fields: email, phone
- Done means: a spec engineers can implement with minimal questions

Rules:
Ask up to 2 clarifying questions only if missing info changes the design. Otherwise assume and proceed.
Do not propose a full rewrite or new architecture.

Output contract:
Write in Markdown with sections: Overview, User flow, API design, Data query approach, Streaming strategy, Security/PII handling, Edge cases, Rollout plan, Open questions.
Before finalizing, check that PII fields are explicitly excluded and that streaming is addressed.

Example 2: A "no drift" rewrite prompt (community-inspired)

People on r/PromptEngineering keep coming back to the same pain: prompts feel fragile, and outputs drift between runs [4]. My fix is to explicitly declare drift a failure mode and tell Claude how to detect it.

Rewrite the following doc for clarity and brevity.

Rules:
- Cut 30-40% of words without losing meaning
- Preserve all factual claims
- Keep headings but tighten paragraphs
- No new ideas

Drift check:
After rewriting, list any sentence where you were tempted to add information not present in the original.

Text:
<<<
[PASTE TEXT]
>>>

That "drift check" turns the rewrite into a constrained transformation, not a creative writing task.

Example 3: When you're using Claude with a tool/sandbox

If you're prompting Claude in an environment where it can run commands or manipulate files, the research on sandboxed agents is loud and clear: letting models use a "virtual computer" (execute commands, manage files, run code) can unlock big gains in instruction-following and long-context tasks [2]. The prompt needs to tell Claude to use the environment rather than hallucinate solutions.

You are operating in a sandboxed dev environment.

Task:
Fix the failing test suite.

Rules:
- Do not guess. Run the tests first.
- Make the smallest change that fixes the failures.
- After changes, rerun tests and report results.

Output contract:
1) Commands you ran
2) Files changed (with brief explanation)
3) Test results

That structure matches the "explore → observe → act → verify" loop described in LLM-in-Sandbox workflows [2]. You're basically telling Claude: act like an agent, not an essay generator.


Closing thought: prompt for the behavior you'd review in PR

When you prompt Claude 4.5, you're not just requesting content. You're specifying a workflow.

The prompts that work best read like something you'd put into a PR template: goal, context, constraints, expected output, and a checklist that must pass. That's also why stage-aware systems outperform generic chat baselines: they encode the workflow and the gates, not just the question [1].

If you want to get better fast, do the boring thing: save your best "prompt contracts," version them, and treat them like code. That's when Claude stops feeling magical and starts feeling dependable.


References

Documentation & Research

  1. METIS: Mentoring Engine for Thoughtful Inquiry & Solutions - arXiv - https://arxiv.org/abs/2601.13075
  2. LLM-in-Sandbox Elicits General Agentic Intelligence - arXiv - https://arxiv.org/abs/2601.16206

Community Examples

  1. You're Using Claude Code Wrong (And Wasting Hours Every Day) - DiamantAI - https://diamantai.substack.com/p/youre-using-claude-code-wrong-and
  2. How do you study good AI conversations? - r/PromptEngineering - https://www.reddit.com/r/PromptEngineering/comments/1qp7get/how_do_you_study_good_ai_conversations/
Ilia Ilinskii
Ilia Ilinskii

Founder of Rephrase-it. Building tools to help humans communicate with AI.

Related Articles