/docs:claude-cookbooksfrom docs
Claude AI cookbooks - code examples, tutorials, and best practices for using Claude API. Use when learning Claude API integration, building Claude-powered applications, or exploring Claude capabilities.
Ships in docs. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Comprehensive code examples and guides for building with Claude AI, sourced from the official Anthropic cookbooks repository.
This skill should be triggered when:
import anthropic
client = anthropic.Anthropic(api_key="your-api-key")
# Simple message
response = client.messages.create(
model="claude-3-5-sonnet-20241022",
max_tokens=1024,
messages=[{
"role": "user",
"content": "Hello, Claude!"
}]
)
# Define a tool
tools = [{
"name": "get_weather",
"description": "Get current weather for a location",
"input_schema": {
"type": "object",
"properties": {
"location": {"type": "string", "description": "City name"}
},
"required": ["location"]
}
}]
# Use the tool
response = client.messages.create(
model="claude-3-5-sonnet-20241022",
max_tokens=1024,
tools=tools,
messages=[{"role": "user", "content": "What's the weather in San Francisco?"}]
)
# Analyze an image
response = client.messages.create(
model="claude-3-5-sonnet-20241022",
max_tokens=1024,
messages=[{
"role": "user",
"content": [
{
"type": "image",
"source": {
"type": "base64",
"media_type": "image/jpeg",
"data": base64_image
}
},
{"type": "text", "text": "Describe this image"}
]
}]
)
# Use prompt caching for efficiency
response = client.messages.create(
model="claude-3-5-sonnet-20241022",
max_tokens=1024,
system=[{
"type": "text",
"text": "Large system prompt here...",
"cache_control": {"type": "ephemeral"}
}],
messages=[{"role": "user", "content": "Your question"}]
)
The cookbooks are organized into these main categories:
This skill includes comprehensive documentation in references/:
See: references/tool_use.md#customer-service
See: references/capabilities.md#rag
See: references/multimodal.md#vision
See: references/patterns.md#agents
Start with references/main_readme.md and explore basic examples in references/capabilities.md
references/tool_use.mdreferences/multimodal.mdreferences/capabilities.md#ragreferences/patterns.md#agentsEach reference file contains practical, copy-pasteable code examples
The cookbook includes 50+ practical examples including:
This skill was created from the official Anthropic Claude Cookbooks repository: https://github.com/anthropics/claude-cookbooks
Repository cloned and processed on: 2025-10-29
references/CONTRIBUTING.md (opens in a new tab)references/README.md (opens in a new tab)references/capabilities.md (opens in a new tab)references/index.md (opens in a new tab)references/main_readme.md (opens in a new tab)references/multimodal.md (opens in a new tab)references/patterns.md (opens in a new tab)references/third_party.md (opens in a new tab)references/tool_use.md (opens in a new tab)scripts/memory_tool.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
4 skills in this plugin
npx claudepluginhub tianzecn/myclaudecode --plugin docsOther plugins' skills for the same job