claude-cookbooks
Claude AI cookbooks - code examples, tutorials, and best practices for using Claude API. Use when learning Claude API integration, building Claude-powered…

Установить claude-cookbooks в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Claude Cookbooks Skill
Comprehensive code examples and guides for building with Claude AI, sourced from the official Anthropic cookbooks repository.
When to Use This Skill
This skill should be triggered when:
- Learning how to use Claude API
- Implementing Claude integrations
- Building applications with Claude
- Working with tool use and function calling
- Implementing multimodal features (vision, image analysis)
- Setting up RAG (Retrieval Augmented Generation)
- Integrating Claude with third-party services
- Building AI agents with Claude
- Optimizing prompts for Claude
- Implementing advanced patterns (caching, sub-agents, etc.)
Quick Reference
Basic API Usage
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!"
}]
)
Tool Use (Function Calling)
# 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?"}]
)
Vision (Image Analysis)
# 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"}
]
}]
)
Prompt Caching
# 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"}]
)
Key Capabilities Covered
1. Classification
- Text classification techniques
- Sentiment analysis
- Content categorization
- Multi-label classification
2. Retrieval Augmented Generation (RAG)
- Vector database integration
- Semantic search
- Context retrieval
- Knowledge base queries
3. Summarization
- Document summarization
- Meeting notes
- Article condensing
- Multi-document synthesis
4. Text-to-SQL
- Natural language to SQL queries
- Database schema understanding
- Query optimization
- Result interpretation
5. Tool Use & Function Calling
- Tool definition and schema
- Parameter validation
- Multi-tool workflows
- Error handling
6. Multimodal
- Image analysis and OCR
- Chart/graph interpretation
- Visual question answering
- Image generation integration
7. Advanced Patterns
- Agent architectures
- Sub-agent delegation
- Prompt optimization
- Cost optimization with caching
Repository Structure
The cookbooks are organized into these main categories:
- capabilities/ - Core AI capabilities (classification, RAG, summarization, text-to-SQL)
- tool_use/ - Function calling and tool integration examples
- multimodal/ - Vision and image-related examples
- patterns/ - Advanced patterns like agents and workflows
- third_party/ - Integrations with external services (Pinecone, LlamaIndex, etc.)
- claude_agent_sdk/ - Agent SDK examples and templates
- misc/ - Additional utilities (PDF upload, JSON mode, evaluations, etc.)
Reference Files
This skill includes comprehensive documentation in references/:
- main_readme.md - Main repository overview
- capabilities.md - Core capabilities documentation
- tool_use.md - Tool use and function calling guides
- multimodal.md - Vision and multimodal capabilities
- third_party.md - Third-party integrations
- patterns.md - Advanced patterns and agents
- index.md - Complete reference index
Common Use Cases
Building a Customer Service Agent
- Define tools for CRM access, ticket creation, knowledge base search
- Use tool use API to handle function calls
- Implement conversation memory
- Add fallback mechanisms
See: references/tool_use.md#customer-service
Implementing RAG
- Create embeddings of your documents
- Store in vector database (Pinecone, etc.)
- Retrieve relevant context on query
- Augment Claude's response with context
See: references/capabilities.md#rag
Processing Documents with Vision
- Convert document to images or PDF
- Use vision API
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- references/CONTRIBUTING.md
- references/README.md
- references/capabilities.md
- references/index.md
- references/main_readme.md
- references/multimodal.md
- references/patterns.md
- references/third_party.md
- references/tool_use.md
- scripts/memory_tool.py
FAQ
Что делает скилл claude-cookbooks?
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.
Как установить скилл claude-cookbooks?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл claude-cookbooks запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
mcp-builder
AnthropicGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
claude-api
AnthropicReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
algorithmic-art
AnthropicCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
mcp-integration
AnthropicThis skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
