Skip to main content
UFOZoo

Claude Prompt Generator: System Prompts & XML Examples

Claude prompt generator online: build system prompts with roles, rules, and XML examples for Claude and other LLM applications.

Updated 2026-08-16

Related Tools

Features

  • Claude-native XML structure: role, task, rules, output_format, and examples are wrapped in XML tags, the prompt layout recommended in Anthropic's own documentation
  • Thinking mode: off, brief, or detailed; when enabled, the prompt asks Claude to reason step by step before answering
  • Style control: concise, balanced, or detailed, expressed as natural-language instructions instead of a temperature slider Claude's web chat does not expose
  • Output format options: plain text, JSON, Markdown, or a fully custom format you describe yourself
  • Rule list support: write one rule per line and each becomes a clean bullet inside <rules>
  • Example support: paste sample lines to show Claude exactly what you expect
  • Empty fields are skipped automatically: sections you leave blank simply don't appear in the output
  • Local history: the last 10 generated prompts are stored in your browser (localStorage) and can be restored or deleted anytime
  • One-click copy and save: copy the finished prompt to your clipboard or save it to history instantly

How to Use

  1. 1Fill in the Role field first (for example 'Senior Code Reviewer' or 'Product Documentation Writer') so Claude knows who it is playing.
  2. 2Describe the task in the Task field: what should Claude do, with what input and under what constraints.
  3. 3Add rules one per line, such as 'Never invent facts' or 'Report issues by severity'; each line becomes a bullet in <rules>.
  4. 4Pick an output format: JSON for structured data, Markdown for readable documents, text for conversation, or custom for your own spec.
  5. 5Optionally add examples one per line to show the expected behavior.
  6. 6Enable thinking mode for complex work: brief for a quick check, detailed for full step-by-step reasoning.
  7. 7Choose a style (concise, balanced, or detailed), then click Generate to assemble the prompt in the right panel.
  8. 8Copy the prompt with one click and paste it as the first message in Claude.
  9. 9Building a documentation assistant: give it the role of Product Documentation Writer, add rules like 'Use the user's terminology', and pick the Markdown output format.
  10. 10Creating a code review prompt with a reasoning chain: enable detailed thinking mode, add severity-based rules, and combine JSON or Markdown output with examples.
  11. 11Converting an existing prompt to Claude XML structure: paste your current prompt into the Task field, split the constraints into the Rules field, and regenerate; the XML tags give Claude clearer boundaries.
  12. 12Iterate: change any field and click Generate again; the prompt rebuilds instantly, so treat the result as a starting point.

Frequently Asked Questions

Why use XML tags in prompts for Claude?

XML tags are the structure Anthropic itself recommends in its documentation: wrapping role, task, rules, and output format in tags like <role> or <output_format> makes each instruction block explicit and easy for the model to separate. To be honest, it is a strong convention rather than a hard requirement; Claude works fine without tags, but structured prompts tend to produce more reliable results.

What is the difference between this tool and the System Prompt Generator?

The System Prompt Generator produces a model-agnostic Markdown prompt for any chat AI, while this tool is built around Claude's conventions: XML tags, thinking-mode guidance, and natural-language style constraints. If you mostly use Claude, this structure matches how its documentation recommends writing prompts.

What does thinking mode do?

It adds a <thinking_mode> section that asks Claude to reason step by step before answering. For complex tasks (math, code review, multi-step planning), that extra reasoning often improves quality. The honest trade-off: it consumes more output tokens and makes responses slower, so it is worth turning off for simple questions.

Can I use the result with other AI models?

Yes, the XML structure is just text and most models understand it. However, it is optimized for Claude; the convention comes from Anthropic's documentation, and Claude has been heavily trained on XML-structured prompts. For other models, a plain Markdown system prompt may work just as well.

Can I set the temperature for Claude here?

No, and that is intentional. The Claude API exposes a temperature parameter, but the web chat does not, and this tool produces prompts rather than API calls. Instead, the style setting writes a natural-language instruction like 'Keep responses concise' into the prompt, which steers verbosity in a way every Claude interface honors.

How do I use a Claude prompt generator for better responses?

Treat the generated prompt as a starting point and iterate: test it with a real task, and if the output misses the mark, tighten the rules or add examples and regenerate. Two or three rounds of refinement usually make a big difference, and because the Claude prompt generator rebuilds the prompt instantly, each round takes only a few seconds.

Will my saved prompts be lost?

Saved prompts live in your browser's localStorage, so they survive page refreshes and browser restarts. However, they disappear if you clear your browser data (cache/cookies/site data) or open the tool in a different browser or device. For important prompts, copy them out and keep them somewhere safe.

Why should rules be written one per line?

Each line becomes its own bullet inside <rules>, and models follow short, separate instructions more reliably than long run-on sentences. Keep each rule to a single clear requirement, and pair a 'never do X' rule with what to do instead.

What happens to empty fields?

They are skipped. The output only contains the sections you filled in; a prompt with just a task and a role stays minimal, and the XML structure remains clean.

Why are output format instructions inside <output_format>?

Putting the format requirement in its own tag creates a hard boundary for the model, especially with JSON, where stray text outside the object breaks parsing. Combine it with an example in <examples> for the most reliable structured output.

How long should a Claude prompt be?

As long as it needs to be and no longer. A good prompt covers the role, the task, a handful of non-negotiable rules, the output format, and maybe one or two examples. If your prompt feels bloated, cut redundant phrasing; focused instructions beat long ones.

Why does Claude sometimes ignore parts of my generated prompt?

Long prompts dilute attention; models weigh instructions near the top and in dedicated tags more heavily. If a rule is being ignored, move it into the Task field or the <rules> tag, keep the rule count low, and make each rule a single specific requirement. XML tags help Claude separate sections, but they do not guarantee every line is followed.

Can I use this to build prompts for Claude Code (CLAUDE.md)?

Partly. The tool targets chat prompts with XML structure. Claude Code reads a CLAUDE.md file of plain markdown instructions, so the generated rules and task text transfer well if you strip the XML tags and paste the content as markdown bullets. Fields like output_format translate less directly; CLAUDE.md guidance is about workflow conventions rather than a single reply's format.