Prompt engineering guidance for Claude (Anthropic) model. Use when crafting prompts for Claude to leverage XML-style tags, long-context capabilities, extended thinking, and strong instruction following.
View on GitHubprompt-engineering/skills/claude-prompting/SKILL.md
February 1, 2026
Select agents to install to:
npx add-skill https://github.com/duyet/claude-plugins/blob/main/prompt-engineering/skills/claude-prompting/SKILL.md -a claude-code --skill claude-promptingInstallation paths:
.claude/skills/claude-prompting/# Claude Prompt Engineering
Claude is Anthropic's AI assistant designed to be helpful, harmless, and honest. It excels at long-context tasks, follows complex instructions precisely, and works best with well-structured prompts using XML-style tags.
## When to Invoke This Skill
Use this skill when:
- Crafting prompts specifically for Claude/Anthropic models (default: Claude Sonnet 4.5)
- Working with long documents or large context (up to 1M tokens with Sonnet 4.5 beta)
- Using structured prompts with XML-style tags
- Implementing extended thinking for complex reasoning
- Requiring precise instruction following
- Building agentic workflows with parallel tool use
## Claude's Identity & Characteristics
| Attribute | Description |
|-----------|-------------|
| **Personality** | Helpful, harmless, honest |
| **Constitutional AI** | Built-in safety and ethical guidelines |
| **Context Window** | Up to 1M tokens (Sonnet 4.5 beta), 200K standard |
| **Strengths** | Long-context analysis, instruction following, document understanding, agentic tasks |
| **Prompt Style** | Structured, clear, XML-style formatting |
| **Extended Thinking** | Optional reasoning trace feature with tool use |
## Universal Prompting Techniques (Claude-Adapted)
### 1. Zero-Shot Prompting
Claude responds well to clear, direct zero-shot prompts.
**Good Example:**
```
Extract the key dates and events from the following text:
<text>
[paste text]
</text>
Output format: JSON with keys "date", "event", "description"
```
**Less Effective:**
```
Can you tell me what dates are in this text?
```
### 2. Few-Shot Prompting (Multishot)
Use well-formatted examples with XML structure.
```
<examples>
<example>
<input>
The conference is scheduled for March 15, 2025 in San Francisco.
</input>
<output>
{
"date": "2025-03-15",
"event": "conference",
"location": "San Francisco"
}
</output>
</example>
<example>
<input>
Our next board meeting is on June 22nd.
</input>
<output>
{
"date": "2025-06-22",