Published: September 22, 2025
15
15
140

Claude > ChatGPT Claude > Grok Claude > Gemini But 99.9% of the users don't know how to get 100% accurate results from Claude. To fix this you need to learn how to write prompts Claude. Here's a complete guide on how to prompts for Claude using XML tags to get best results:

Image in tweet by Chris Laub

XML tags work because Claude was trained on tons of structured data. When you wrap instructions in <tags>, Claude treats them as separate, weighted components instead of one messy blob. Think of it like giving Claude a filing system for your request.

Basic structure that changes everything: XML: <role>You are an expert data analyst</role> <task> Analyze this dataset and find the top 3 insights </task> <context> This is quarterly sales data from a SaaS company </context> <output_format> - Insight 1: [finding] - Insight 2:

The power tags that actually work: <thinking> - Shows reasoning steps <examples> - Provides reference patterns <constraints> - Sets hard boundaries <tone> - Controls writing style <audience> - Targets specific readers Each tag isolates one instruction type. No bleeding between

Example: Compare these two prompts ❌ Basic: "Write a technical blog post about APIs that's engaging but not too technical for beginners" ✅ XML version: <audience>Software beginners with 0-6 months experience</audience> <tone>Conversational but authoritative</tone>

The <thinking> tag is pure magic: <thinking> Walk through your reasoning step by step before answering </thinking> <task>Should I invest in Bitcoin right now?</task> Claude will literally show you its thought process. Like having a reasoning copilot instead of a black box.

For complex tasks, use nested structure: <analysis> <step_1>Identify the core problem</step_1> <step_2>Research current solutions</step_2> <step_3>Propose alternatives</step_3> </analysis> <output> <format>Executive summary + detailed breakdown</format>

Real example I use for code reviews: <role>Senior software engineer reviewing junior code</role> <criteria> - Code clarity and readability - Performance implications - Security vulnerabilities - Best practice adherence </criteria> <output_format> ## Strengths [List 2-3 things

The secret most people miss: XML tags work because they separate WHAT you want from HOW you want it. Without tags: Claude guesses your intent. With tags: Claude executes your blueprint. It's the difference between "make me dinner" and a recipe with ingredients, steps, and

Start with this template for any complex task: <role>[Who should Claude be?]</role> <task>[What exactly do you want?]</task> <context>[Background Claude needs]</context> <constraints>[Hard boundaries]</constraints> <output_format>[Exactly how to respond]</output_format> Copy

P.S. Want help automating your marketing and sales tasks with advanced prompts and automation? If so, I invite you to join the free Sentient AI Automations community: https://whop.com/sentient-ai-a...

I hope you've found this thread helpful. Follow me @ChrisLaubAI for more. Like/Repost the quote below if you can:

@ChrisLaubAI It's almost like a plan-to-execute agent in one prompt. If only Claude's context window wasn't so pathetically small; gets worse when process requires tool use. I recommend putting such complex prompt in Notion, linking it to Claude.

@ChrisLaubAI xml formatting legit works been layering it with this 10-component framework from the Claude team.

Image in tweet by Chris Laub

@ChrisLaubAI I agree its the best, but your suggested prompting is cumbersome. Even with a template. Never had issues with just “blob” prompting.

@lillegendd Should be using GPTs for all prompting, then modifying where needed

@ChrisLaubAI If someone thinks groks better than Claude is it the users fault or the models for not being able to satiate the user

@ChrisLaubAI Great share

@ChrisLaubAI Claude is amazing. We need prompt techniques like this to unlock its full potential

@ChrisLaubAI Learning proper prompts makes all the difference.

@ChrisLaubAI XML tags prompt writing makes Claude become a dope researcher.

@ChrisLaubAI Claude is super powerful, just need to get a bit familiar with to harness its full potential.

@ChrisLaubAI That's a smart take XML tags really do leverage Claude's structured thinking, turning good prompts into great ones. Thanks for the reminder that mastery beats model hype!

@ChrisLaubAI Yeah ...no

Image in tweet by Chris Laub

@ChrisLaubAI Most people miss Claude’s full potential! XML prompting unlocks the accuracy gap that makes it outperform rivals.

Share this thread

Read on Twitter

View original thread

Navigate thread

1/26