### The Anthropic XML-Tagged Framework
Claude excels when inputs, instructions, and rules are isolated inside clear XML tags:
```xml
<role>You are a Principal Software Architect.</role>
<context>
[Technical specifications, database schemas, API specs]
</context>
<instructions>
[Precise task breakdown and desired outcome]
</instructions>
<constraints>
[Strict rules and things to avoid]
</constraints>
<output_format>
[XML or Markdown structure for the response]
</output_format>
```
Output Formatting Tips
• Use XML tags (<analysis>, <solution>, <code_block>) to separate thoughts from code.
• Request Artifacts for complete standalone files (React components, SVGs, HTML pages).
• Ask Claude to write in <thinking> tags before producing the final response to improve accuracy.
Common Pitfalls to Avoid
• Using ambiguous punctuation instead of XML tags when pasting multiple code snippets or documents.
• Asking for a full file rewrite when only a function needed modification.
Advanced Techniques & Power Features
• Prefilling the Assistant Response: Start Claude's response with `{` to force valid JSON output, or `<analysis>` to begin an XML structure.
• Context Priming: Place large background reference material near the top of the prompt and specific instructions near the end.
• Negative Constraint Adherence: Claude strictly follows negative constraints (e.g. 'Never introduce external CSS libraries').
Tested Claude Templates
Copy, customize, and paste these verified templates directly into Claude.
ResearchClaude
In-Depth Academic Research Paper Synthesis
Extracts deep insights, empirical proofs, and limitations from complex technical papers.
<role>You are a Senior Academic Research Fellow.</role>
<paper_text>
[INSERT PAPER EXCERPT OR TRANSCRIPT]
</paper_text>
<instructions>
Critically evaluate the paper's core hypothesis, empirical rigor, and practical implications.
</instructions>
<constraints>
- Cite specific claims accurately.
- Highlight methodological limitations and unaddressed edge cases.
</constraints>
<output_format>
1. Core Theoretical Contribution
2. Methodology & Experimental Setup
3. Key Empirical Findings
4. Vulnerabilities & Limitations
5. Real-World Engineering Takeaways
</output_format>
Ready to paste
CodingClaude
Large Codebase Architecture Refactor Blueprint
Produces thorough, phased architectural refactoring plans with XML structure.
<role>You are a Principal Software Architect.</role>
<context>
[INSERT SYSTEM OVERVIEW & CODE]
</context>
<instructions>
Analyze the current implementation for maintainability, coupling, and scalability bottlenecks. Produce a phased, safe refactoring roadmap.
</instructions>
<constraints>
- Maintain backwards compatibility.
- Ensure every phase has an independent verification test suite.
</constraints>
<output_format>
Structure your response in clear XML tags:
<analysis>Current architectural evaluation</analysis>
<phases>Step-by-step phased execution plan</phases>
<safeguards>Regression prevention measures</safeguards>
</output_format>
Ready to paste
Skills & Extensions for Claude
Supercharge Claude with verified MCP servers, plugins, and integrations.