Skip to content
claude-prompt-guide logo

SKILL: Claude Prompt Guide

claude-prompt-guide

Anthropic official XML tag patterns and prompt engineering best practices. Document behavior control tags, system prompt internals, and the 10-Component Framework for effective Claude prompts.

SKILL.md

Full skill instructions

SKILL: Claude Prompt Guide

Purpose: Document Anthropic XML tag patterns and prompt engineering best practices Target: All agents creating or modifying system prompts, commands, and skills


Quick Start

When to Use This Skill

  • Creating new system prompts or agent instructions
  • Modifying existing command or skill behavior
  • Debugging prompt-related issues

Quick Reference

<do_not_act_before_instructions>Defer action until conditions met</​do_not_act_before_instructions>
<default_to_action>Prefer tool use over chat responses</​default_to_action>
<use_parallel_tool_calls>Execute independent tools simultaneously</​use_parallel_tool_calls>
<investigate_before_answering>Research before responding</​investigate_before_answering>
<avoid_excessive_markdown_and_bullet_points>Prefer prose over lists</​avoid_excessive_markdown_and_bullet_points>

What This Skill Covers

In Scope

  • Anthropic official behavior control XML patterns
  • System prompt internal tag structure
  • 10-Component Framework for effective prompts
  • Best practices (DO/​DON'T)

Out of Scope

  • Model-specific tuning → @.claude/​skills/​coding-standards/​SKILL.md
  • Agent role definitions → @.claude/​agents/​CONTEXT.md

Core Concepts

CRITICAL: Tag Names Are Customizable

XML tag names are NOT magic - the content/​instructions matter, not the tag name.


Official Behavior Control Tags

<do_not_act_before_instructions> - Control When to Defer Action

Purpose: Prevent premature tool use or implementation When to Use: Read-only phases, planning stages

<do_not_act_before_instructions>
This is a READ-ONLY planning phase. Do not use Edit tool or modify any files.
Only proceed with implementation when the user explicitly runs `/​01_confirm` → `/​02_execute`.
</​do_not_act_before_instructions>

<default_to_action> - Encourage Proactive Tool Use

Purpose: Prefer tool execution over chat-only responses

<default_to_action>
Prefer taking action through tool use rather than providing lengthy explanations.
</​default_to_action>

<use_parallel_tool_calls> - Optimize for Parallel Execution

Purpose: Execute independent operations simultaneously

<use_parallel_tool_calls>
Execute independent operations in parallel using separate tool calls.
</​use_parallel_tool_calls>

<investigate_before_answering> - Research Before Responding

Purpose: Ensure thorough context gathering before response generation

<investigate_before_answering>
Before providing recommendations, thoroughly investigate the codebase:
1. Read relevant source files
2. Search for related patterns
3. Check existing tests and documentation
</​investigate_before_answering>

<avoid_excessive_markdown_and_bullet_points> - Control Output Format

Purpose: Prefer concise prose over structured lists

<avoid_excessive_markdown_and_bullet_points>
Prefer natural language prose over excessive bullet points and markdown formatting.
</​avoid_excessive_markdown_and_bullet_points>

System Prompt Internal Tags

<!-- Behavior control -->
<behavior_instructions>Core behavioral guidelines</​behavior_instructions>
<system-reminder>Context injection during conversation</​system-reminder>

<!-- Tool use control -->
<tool_use_instructions>Guidelines for tool invocation</​tool_use_instructions>

<!-- Context injection -->
<claudeMd>Codebase and user instructions</​claudeMd>
<skill-format>true</​skill-format>

10-Component Framework

  1. Role Definition: Who is the AI acting as?
  2. Context & Scope: What is covered and excluded?
  3. Quick Start: How to get started immediately?
  4. Core Concepts: Why does this approach work?
  5. Behavioral Instructions: What should the AI do (or not do)?
  6. Tool Use Guidelines: How should tools be invoked?
  7. Output Format: What should responses look like?
  8. Examples & Patterns: What do good implementations look like?
  9. Error Handling: What to do when things fail?
  10. Further Reading: Where to find more information?

Best Practices (DO/​DON'T)

DO

✅ Use XML tags for structure - Provides clear delimiters for instructions ✅ Focus on content, not tag names - Clear instructions matter more than naming ✅ Combine complementary tags - Multiple tags for nuanced control ✅ Provide examples - Show good vs. bad patterns ✅ Specify scope clearly - In Scope vs. Out of Scope sections

DON'T

❌ Rely on tag name magic - <custom_tag> works as well as <official_tag> ❌ Over-specify edge cases - Let Claude reason within guidelines ❌ Use tags for simple formatting - Markdown is sufficient ❌ Nest XML tags deeply - Keep structure flat (1-2 levels max) ❌ Duplicate instructions - One clear statement > multiple vague ones


Common Patterns

Phase-Gated Workflow

<do_not_act_before_instructions>
Phase 1 (Planning): Read-only, no file modifications
Phase 2 (Execution): Requires `/​01_confirm` command
</​do_not_act_before_instructions>

Autonomous Execution

<default_to_action>Execute immediately when user request maps to clear tool usage.</​default_to_action>
<use_parallel_tool_calls>Execute independent operations simultaneously.</​use_parallel_tool_calls>

Quality Assurance

<investigate_before_answering>
Before analysis: Read files, search patterns, check documentation.
</​investigate_before_answering>

Further Reading

Internal: @.claude/​skills/​claude-prompt-guide/​REFERENCE.md - Detailed tag documentation, customization guide | @.claude/​skills/​claude-prompt-guide/​EXAMPLES.md - Common patterns and 10-component framework examples | @.claude/​skills/​coding-standards/​SKILL.md - Code quality standards | @.claude/​agents/​CONTEXT.md - Agent ecosystem | @.claude/​commands/​CONTEXT.md - Command workflows

External: Prompting best practices - Claude Docs | Use XML tags - Claude Docs | Claude Code Best Practices - Anthropic | Piebald-AI/​claude-code-system-prompts - 40+ system prompt examples


Version: claude-pilot 4.4.43

More skills from majiayu000

xiaohongshu logo
majiayu000/claude-arsenal

xiaohongshu

xiaohongshu

286 148
View
agent-task-conductor logo
majiayu000/claude-skill-registry

agent-task-conductor

Conduct multi-agent task orchestration and workflow coordination.

663 1
View
conductor-setup logo
majiayu000/claude-skill-registry

conductor-setup

Initialize project with Conductor artifacts (product definition,

663 1
View
animation-designer logo
majiayu000/claude-skill-registry

animation-designer

Expert in web animations, transitions, and motion design using Framer Motion and CSS

663 1
View
diagramming logo
majiayu000/claude-skill-registry

diagramming

Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...

663 1
View
h3-pg logo
majiayu000/claude-skill-registry-data

h3-pg

PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.

23 1
View
conductor-development logo
majiayu000/claude-skill-registry

conductor-development

Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...

663 1
View
conductor-status logo
majiayu000/claude-skill-registry

conductor-status

Display project status, active tracks, and next actions

663 1
View
dockerization logo
majiayu000/claude-skill-registry

dockerization

Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.

663 1
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View