# Anthropic Prompt Engineering Guide — Official Best Practices
> Official prompting guide from Anthropic for Claude. System prompts, chain-of-thought, few-shot, XML tags, tool use, and advanced techniques.
## Install
Paste the prompt below into your AI tool:
## Quick Use
Apply these techniques in any Claude conversation or API call.
---
## Intro
The official Anthropic guide to getting the best results from Claude. Covers foundational techniques, advanced patterns, and real-world examples for prompt engineering.
**Best for**: Developers building with Claude API, prompt engineers, AI application builders
**Works with**: Claude (all models)
---
## Key Techniques
### 1. Be Specific and Direct
Bad: "Help me with code"
Good: "Write a Python function that takes a list of integers and returns the top 3 most frequent elements. Use type hints and include docstring."
### 2. Use XML Tags for Structure
```
Analyze the following code for security vulnerabilities.
Focus on: SQL injection, XSS, authentication bypass.
{user_code}
```
### 3. Chain of Thought
"Think step by step before answering. First identify the problem, then consider approaches, then implement the best one."
### 4. Few-Shot Examples
Provide 2-3 input/output examples before the actual task.
### 5. Role Prompting
"You are a senior security researcher with 15 years of experience in web application penetration testing."
### 6. Prefilled Responses
Start Claude's response with the format you want.
---
### FAQ
**Q: What is Anthropic Prompt Engineering Guide?**
A: Official prompting guide from Anthropic for Claude. System prompts, chain-of-thought, few-shot, XML tags, tool use, and advanced techniques.
**Q: How do I install Anthropic Prompt Engineering Guide?**
A: Check the Quick Use section above for step-by-step installation instructions. Most assets can be set up in under 2 minutes.
## Source & Thanks
> Created by [Anthropic](https://docs.anthropic.com/en/docs/build-with-claude/prompt-engineering/overview).
> [Anthropic Documentation](https://docs.anthropic.com)
---
Source: https://tokrepo.com/en/workflows/8fdb8111-8d8a-4dfd-aea2-797eb1db6cea
Author: Prompt Lab