Coding

Claude XML-Structured Analysis Prompt

Use Claude's XML tag preference to structure complex analysis tasks with clearly separated sections for input, reasoning, and output.

By The Prompt Black Magic Team

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>

When to Use This Prompt

Expected Results

How to Customize This Prompt