Cookbook

Claude Cookbook

Practical guides and examples for using Claude effectively

All Cookbooks

Title
Programmatic tool calling (PTC)
Nov 2025
Tools

Reduce latency and token consumption by letting Claude write code that calls tools programmatically in the code execution environment.

Tool search with embeddings
Nov 2025
ToolsRAG & Retrieval

Scale Claude applications to thousands of tools using semantic embeddings for dynamic tool discovery.

Automatic context compaction
Nov 2025
ToolsAgent Patterns

Manage context limits in long-running agentic workflows by automatically compressing conversation history.

Low latency voice assistant with ElevenLabs
Nov 2025
Integrations

Build a low-latency voice assistant using ElevenLabs for speech-to-text and text-to-speech combined with Claude.

Giving Claude a crop tool for better image analysis
Nov 2025
MultimodalTools

Give Claude a crop tool to zoom into image regions for detailed analysis of charts, documents, and diagrams.

Prompting for frontend aesthetics
Oct 2025
ResponsesSkills

Guide to prompting Claude for distinctive, polished frontend designs avoiding generic aesthetics.

Claude Skills for financial applications
Oct 2025
Skills

Build financial dashboards and portfolio analytics using Claude's Excel, PowerPoint, PDF skills.

Building custom Skills for Claude
Oct 2025
Skills

Create, deploy, and manage custom skills extending Claude with specialized organizational workflows.

Introduction to Claude Skills
Oct 2025
Skills

Create documents, analyze data, automate workflows with Claude's Excel, PowerPoint, PDF skills.

The one-liner research agent
Sep 2025
Claude Agent SDKAgent Patterns

Build a research agent using Claude Code SDK with WebSearch for autonomous research.

The chief of staff agent
Sep 2025
Claude Agent SDKAgent Patterns

Build multi-agent systems with subagents, hooks, output styles, and plan mode features.

The observability agent
Sep 2025
Claude Agent SDKAgent Patterns

Connect agents to external systems via MCP servers for GitHub monitoring and CI workflows.

Tool evaluation
Sep 2025
Evals

Run parallel agent evaluations on tools independently from evaluation task files.

Usage & cost Admin API cookbook
Aug 2025
Observability

Programmatically access and analyze your Claude API usage and cost data via Admin API.

Memory & context management with Claude Sonnet 4.5
May 2025
ToolsAgent Patterns

Build AI agents with persistent memory using Claude's memory tool and context editing.

Speculative prompt caching
May 2025
Responses

Reduce time-to-first-token by warming cache speculatively while users formulate their queries.

Parallel tool calls on Claude 3.7 Sonnet
Mar 2025
Tools

Enable parallel tool calls on Claude 3.7 Sonnet using batch tool meta-pattern workaround.

Extended thinking
Feb 2025
Thinking

Use Claude's extended thinking for transparent step-by-step reasoning with budget management.

Extended thinking with tool use
Feb 2025
ThinkingTools

Combine extended thinking with tools for transparent reasoning during multi-step workflows.

Basic workflows
Dec 2024
Agent Patterns

Three simple multi-LLM workflow patterns trading cost or latency for improved performance.

Evaluator optimizer
Dec 2024
Agent PatternsEvals

Workflow pattern using one LLM for generation and another for evaluation feedback loop.

Orchestrator workers
Dec 2024
Agent Patterns

Central LLM dynamically delegates tasks to worker LLMs and synthesizes their combined results.

Batch processing with Message Batches API
Oct 2024
Responses

Process large volumes of Claude requests asynchronously with 50% cost reduction using batches.

Text to SQL with Claude
Sep 2024
RAG & Retrieval

Convert natural language queries to SQL using RAG, chain-of-thought, and self-improvement techniques.

Enhancing RAG with contextual retrieval
Sep 2024
RAG & Retrieval

Improve RAG accuracy by adding context to chunks before embedding with prompt caching.

Finetuning Claude 3 Haiku on Bedrock
Aug 2024
Fine-Tuning

Step-by-step guide to finetuning Claude 3 Haiku on Amazon Bedrock for custom tasks.

Generate synthetic test data for your prompt template
Aug 2024
Evals

Generate synthetic test cases to evaluate and improve your Claude prompt templates effectively.

Prompt caching through the Claude API
Aug 2024
Responses

Cache and reuse prompt context for cost savings and faster responses with detailed instructions.

Summarization with Claude
Aug 2024
RAG & RetrievalResponses

Comprehensive guide to summarizing legal documents with evaluation and advanced techniques.

Retrieval augmented generation
Jul 2024
RAG & Retrieval

Build and optimize RAG systems with Claude using summary indexing and reranking techniques.

Classification with Claude
May 2024
RAG & Retrieval

Build classification systems with Claude using RAG and chain-of-thought for insurance tickets.

Tool choice
May 2024
Tools

Control how Claude selects tools using tool_choice parameter for forced or auto selection.

Using vision with tools
May 2024
MultimodalTools

Combine Claude's vision with tools to extract structured data from images like nutrition labels.

Sampling responses from Claude beyond the max tokens limit
May 2024
Responses

Generate longer responses beyond max_tokens limit using prefill technique with message continuation.

Best practices for using vision with Claude
May 2024
Multimodal

Tips and techniques for optimal image processing performance with Claude's vision capabilities.

Note-saving tool with Pydantic and Anthropic tool use
Apr 2024
Tools

Create validated tools using Pydantic models for type-safe Claude tool use interactions.

Transcribe an audio file with Deepgram & use Anthropic to prepare interview questions!
Apr 2024
IntegrationsMultimodal

Transcribe audio with Deepgram and generate interview questions using Claude for preparation.

Using the Wolfram Alpha LLM API as a tool with Claude
Apr 2024
IntegrationsTools

Integrate Wolfram Alpha LLM API as Claude tool for computational queries and answers.

Using a calculator tool with Claude
Apr 2024
Tools

Provide Claude with calculator tool for arithmetic operations and mathematical problem solving.

Creating a customer service agent with client-side tools
Apr 2024
ToolsAgent Patterns

Build customer service chatbot with Claude using tools for customer lookup and order management.

Extracting structured JSON using Claude and tool use
Apr 2024
ResponsesTools

Extract structured JSON data from various inputs using Claude's tool use capabilities.

Metaprompt
Mar 2024
Responses

Prompt engineering tool that generates starting prompts for your tasks to solve blank-page problem.

Citations
Mar 2024
ResponsesRAG & Retrieval

Enable Claude to provide detailed source citations when answering document-based questions for verification.

Claude 3 RAG agents with LangChain v1
Mar 2024
IntegrationsRAG & RetrievalAgent Patterns

Build RAG agents with Claude 3 using LangChain v1's updated agent framework patterns.

Summarizing web page content with Claude 3 Haiku
Mar 2024
RAG & Retrieval

Fetch and summarize web page content using Claude 3 Haiku via URL extraction.

Using Haiku as a sub-agent
Mar 2024
Agent Patterns

Analyze financial reports using Haiku sub-agents for extraction and Opus for synthesis.

Multi-modal
Mar 2024
IntegrationsMultimodal

Use LlamaIndex's Anthropic MultiModal LLM abstraction for image understanding and reasoning.

How to build a RAG system using Claude 3 and MongoDB
Mar 2024
IntegrationsRAG & Retrieval

Build chatbot RAG system with Claude and MongoDB using tech news as knowledge base.

Building evals
Mar 2024
Evals

Build robust evaluation systems to measure and improve Claude's performance on key metrics.

Building a moderation filter with Claude
Mar 2024
Responses

Build customizable content moderation filters by defining rules and categories in prompts.

Prompting Claude for "JSON mode"
Mar 2024
Responses

Get reliable JSON output from Claude using effective prompting techniques without constrained sampling.

How to make SQL queries with Claude
Mar 2024
RAG & Retrieval

Generate SQL queries from natural language questions using Claude with database schema context.

Getting started - how to pass images into Claude
Mar 2024
Multimodal

Tutorial on passing images to Claude 3 API for vision-based text analysis.

How to transcribe documents with Claude
Mar 2024
Multimodal

Extract and structure unstructured text from images and PDFs using Claude 3's vision.

Working with charts, graphs, and slide decks
Mar 2024
Multimodal

Extract insights from charts, graphs, and presentations using Claude's vision analysis capabilities.

Multi-document agents
Mar 2024
IntegrationsRAG & RetrievalAgent Patterns

Build RAG for large document collections using DocumentAgents with ReAct Agent pattern.

ReAct agent
Mar 2024
IntegrationsAgent PatternsTools

Create ReAct agents with LlamaIndex for tool-based reasoning and action workflows.

RAG pipeline with LlamaIndex
Mar 2024
IntegrationsRAG & Retrieval

Build basic RAG pipeline with LlamaIndex for document retrieval and question answering.

RouterQuery engine
Mar 2024
IntegrationsRAG & Retrieval

Route queries to different indices using LlamaIndex RouterQueryEngine for multi-document search.

SubQuestionQueryEngine
Mar 2024
IntegrationsRAG & Retrieval

Decompose complex queries into sub-questions across multiple documents using LlamaIndex engine.

Retrieval-augmented generation using Pinecone
Feb 2024
IntegrationsRAG & Retrieval

Connect Claude with Pinecone vector database for retrieval-augmented generation and semantic search.

"Uploading" PDFs to Claude via the API
Aug 2023
RAG & Retrieval

Process and summarize PDF documents using Claude API with text extraction and encoding.

Iteratively searching Wikipedia with Claude
Aug 2023
Integrations

Legacy notebook showing iterative Wikipedia searches with Claude 2 for research workflows.