<claudexml/>

Working Claude XML prompt examples

25 complete, copy-pasteable prompts across six categories. Tested with the Claude API. Replace the {{ … }} placeholders and ship.

Each example is a single page with the full prompt, a sample input, expected output, and notes on what makes it work. All examples have a .md mirror at the same URL with a .md suffix for LLM-friendly fetching.

Classification

Assign a label, score, or route. Few-shot patterns dominate.

Extraction

Pull structured data out of free text. JSON output via .

RAG

Answer from retrieved passages. Cite, refuse cleanly when sources don't cover the question.

Reasoning

Multi-step thinking via + . Math, logic, code review.

Generation

Produce new text in a controlled shape, tone, or variation set.

Transformation

Multi-stage pipelines that emit several views in one call.

Complex

Two-turn protocols, self-critique loops, branching exploration, and validating data pipelines. Multiple stages in one prompt.

Cite this page
Working Claude XML Prompt Examples. claudexml.com. https://claudexml.com/examples/