Use Claude's XML tag preference to structure complex analysis tasks with clearly separated sections for input, reasoning, and output.
This prompt leverages Claude's native XML parsing strength. Replace the tags and content with your specific analysis task. Works best with Claude Opus or Sonnet.
<task> Analyze the following [CODE/DOCUMENT/DATA] and provide a structured assessment. </task> <input> [PASTE YOUR CODE, DOCUMENT, OR DATA HERE] </input> <context> - Purpose: [WHAT THIS CODE/DOCUMENT IS FOR] - Audience: [WHO WILL READ YOUR ANALYSIS] - Priority: [WHAT MATTERS MOST - SECURITY, PERFORMANCE, CLARITY, CORRECTNESS] </context> <instructions> 1. Read the input thoroughly before starting your analysis 2. Organize your response using these sections: <summary> Provide a 2-3 sentence overview of what you found </summary> <strengths> List what is done well, with specific line references </strengths> <issues> List problems ranked by severity (critical, major, minor), with specific locations and fixes </issues> <recommendations> Provide actionable next steps in priority order </recommendations> 3. Be specific - reference exact locations, not vague descriptions 4. For each issue, provide both the problem and the solution </instructions>
"Claude XML-Structured Analysis Prompt" succeeds because it mirrors how AI models are trained to respond - with clear instructions, specific constraints, and defined success criteria. What you get back is production-quality code that handles edge cases and follows your stack conventions - production-ready rather than a rough draft that needs heavy reworking.
These coding tips will help you get stronger results when using "Claude XML-Structured Analysis Prompt" and similar prompts in this category.
"Claude XML-Structured Analysis Prompt" is particularly useful in these situations. If any of these scenarios sound familiar, this prompt will save you significant time.
When you use "Claude XML-Structured Analysis Prompt" with ChatGPT, Claude, or Gemini, here is what to expect in the AI output.
Adapt "Claude XML-Structured Analysis Prompt" to your specific situation by modifying these key areas. The more context you add, the better the results.