Guide · 2026-10-02

Claude-native structured (XML) prompts

Claude responds reliably to structured prompts that separate role, context, instructions, examples, and output schema—often with XML-style tags. That structure reduces missed constraints and makes long tasks auditable. Below are paste-ready Claude XML patterns; use BestPromptFinder to rank more structured prompts for your specific workflow.

Next step: describe your goal and get ranked prompts with quality, match & confidence scores.

Rank Claude structured prompts →

Opens the homepage goal box with a starter query you can edit.

Copy-paste prompt templates

Replace bracketed fields. Run stages in order where noted.

1. Universal Claude XML scaffold Starter
<role>
You are [expert role] focused on [outcome].
</role>

<context>
[Background the model needs: product, audience, constraints, data]
</context>

<task>
[Single clear task statement]
</task>

<instructions>
1. [Rule]
2. [Rule]
3. [Rule]
</instructions>

<constraints>
- [Hard constraint]
- [Hard constraint]
- If information is missing, ask up to 3 clarifying questions instead of guessing.
</constraints>

<output_format>
[Exact structure you want: headings, JSON keys, table columns]
</output_format>

<quality_bar>
Success looks like: [criteria].
Failure modes to avoid: [list].
</quality_bar>
2. Analysis with citations-to-context Research
<role>Senior analyst. Prefer evidence over eloquence.</role>

<documents>
<doc id="1" title="[title]">
[paste]
</doc>
<doc id="2" title="[title]">
[paste]
</doc>
</documents>

<task>
Answer: [question]
</task>

<instructions>
- Cite claims with doc ids like [1].
- Separate Facts, Inferences, and Unknowns.
- List contradictions across documents.
- Do not invent sources outside <documents>.
</instructions>

<output_format>
## Direct answer
## Evidence (bullet + [doc id])
## Inferences
## Unknowns / gaps
## Risks if wrong
</output_format>
3. Few-shot extraction to JSON Data
<role>Information extraction engine. Output JSON only.</role>

<schema>
{
  "company": string,
  "product": string,
  "pricing_model": "free" | "subscription" | "usage" | "one_time" | "unknown",
  "key_features": string[],
  "risks": string[]
}
</schema>

<examples>
<example>
<input>[short sample text]</input>
<output>{"company":"...","product":"...","pricing_model":"subscription","key_features":["..."],"risks":["..."]}</output>
</example>
</examples>

<input>
[TEXT TO EXTRACT]
</input>

<constraints>
- Follow <schema> exactly.
- Use "unknown" rather than guessing.
- No markdown fences, no commentary—JSON only.
</constraints>
4. Multi-step agent with checkpoints Agents
<role>Methodical operator. You work in stages and wait for approval gates.</role>

<goal>[user goal]</goal>

<tools_available>
[list tools / actions you can take in this environment]
</tools_available>

<protocol>
1. <stage name="understand">Restate goal + success criteria. Ask questions if blocked.</stage>
2. <stage name="plan">Produce a numbered plan. STOP and wait for approval.</stage>
3. <stage name="execute">Run only the approved step. Report evidence.</stage>
4. <stage name="verify">Check success criteria. Propose next step or DONE.</stage>
</protocol>

<response_contract>
Always label the current stage.
Never skip the plan approval gate.
If a tool fails, diagnose once, then propose an alternative.
</response_contract>

Start at stage understand.
5. Rewriter with preserved constraints Editing
<role>Editor who improves clarity without changing meaning.</role>

<input_text>
[paste]
</input_text>

<must_preserve>
- Facts, numbers, names, and promises
- Legal/disclaimer language if present
- Brand voice: [voice notes]
</must_preserve>

<change_goals>
- Cut fluff
- Improve scannability (short paragraphs, headings if needed)
- Strengthen verbs; remove hedging unless uncertainty is real
</change_goals>

<output_format>
## Revised text
## Change log (bullets)
## Risks (anything that might have drifted in meaning)
</output_format>
6. Rubric grader (prompt or output QA) Eval
<role>Strict evaluator. Score with evidence.</role>

<rubric>
1. Clarity (1-5)
2. Completeness vs task (1-5)
3. Constraint obedience (1-5)
4. Factual caution (1-5)
5. Reusability (1-5)
</rubric>

<task_spec>
[original instructions]
</task_spec>

<candidate>
[prompt or model output to grade]
</candidate>

<instructions>
- Score each rubric dimension with a one-sentence justification.
- List concrete failure examples.
- Propose the smallest edit that would raise the weakest score.
- Do not inflate scores; average work is a 3.
</instructions>

<output_format>
## Scores
## Failures
## Smallest fix
## Verdict: ship / revise / reject
</output_format>

Why BestPromptFinder (not just another template list)

Most prompt sites are plain template catalogs. BestPromptFinder is a free decision engine: describe what you need Claude to do, and it ranks structured prompts with quality, match, and confidence scores before you paste them into Claude.

Describe your goal → get ranked prompts →

Related guides & categories

FAQ

Why use XML tags in Claude prompts?

XML-style tags help Claude separate role, context, rules, examples, and output format, which improves constraint following on long or multi-part tasks.

Do XML tags work only on Claude?

Other models can follow similar structure, but these templates are tuned for Claude’s documented preference for clear sectional markup. Retest if you port them elsewhere.

How do I get more Claude prompts ranked for my use case?

Describe the goal on BestPromptFinder and compare quality, match, and confidence scores—then copy the winning structured prompt into Claude.

Ready to go beyond templates? Tell BestPromptFinder what you need.

Rank Claude structured prompts →