RepoDaily · 2026-07-13 · Learning / Curriculum

anthropics/claude-cookbooks: A Hands-On Curriculum for Building With the Claude API

#4 Learning / Curriculum Jupyter Notebook +464 anthropics/claude-cookbooks Open repository

Anthropic's official notebook collection teaches Claude API patterns through runnable recipes: classification, tool use, RAG, vision, and third-party integrations like Pinecone and Voyage AI.

Repo typeLearning / Curriculum
Best forPython developers integrating Claude who want copy-pasteable notebook recipes and a documented local validation workflow
Risk levelLow for learning; medium for production — you must supply your own Anthropic API key and pay for usage
Time to evaluate30–60 minutes to clone, install dependencies, and execute the first notebook

Primary question: Do these notebooks teach me Claude API patterns I can immediately adapt into my own projects?

92/100

RepoDaily adoption score

RepoDaily rates this as 92/100 (strong) for adoption: evidence, installation path, production risk, differentiation, license clarity, and AI/agent fit are scored from the article sources and adoption notes.

Directional score from RepoDaily sources and adoption notes, not a benchmark.Risk: Low
96Evidence quality

4 source(s) across 3 source category/categories, plus a RepoDaily-specific evidence module when available.

100Installability

6 workflow step(s), 5 next-action step(s), and 8 command/install signal(s) were detected.

71Maintenance confidence

Trending momentum is +464 stars, with maintenance/release/issue signals counted when present.

100Production readiness

Risk is marked low, with 5 security note(s) and 4 explicit skip condition(s).

100Differentiation

3 opportunity lens item(s), 4 alternative(s), and 4 type-specific section(s) support differentiation.

82License clarity

License source or license wording is present.

84Agent / AI fit

6 AI/agent-related signal(s) were detected in the article text and metadata.

Project overview

anthropics/claude-cookbooks is Anthropic's official repository of Jupyter notebooks that demonstrate how to build with Claude. The README describes it as providing code and guides with copy-able snippets that developers can integrate into their own projects. It is explicitly a learning resource, not a framework or runtime — every recipe is a notebook you read, run, and adapt.

The repository is Python-centric but the concepts translate to any language that can call the Claude API. The README points newcomers to Anthropic's Claude API Fundamentals course as the conceptual prerequisite, then walks through a table of recipes organized into Capabilities, Tool Use and Integration, Third-Party Integrations, and Multimodal Capabilities.

What makes this repo notable is the polish around the notebook development loop. CONTRIBUTING.md documents a full validation stack — nbconvert for execution, ruff for linting and formatting with native Jupyter support, and a Claude-powered code review — along with three Claude Code slash commands (`/link-review`, `/model-check`, `/notebook-review`) that run the same checks locally that CI runs. This gives contributors and learners a concrete way to reproduce quality rather than guessing at conventions.

The project is MIT-licensed (Copyright 2023 Anthropic) and targets Python 3.11 through 3.13. Its pyproject.toml pins a real dependency surface: `anthropic>=0.109.0`, `claude-agent-sdk>=0.1.50`, `voyageai>=0.3.5`, `pandas`, `numpy`, `networkx`, `matplotlib`, `rich`, and `python-dotenv`. Those choices signal which ecosystem Anthropic expects Claude builders to live in.

Problem it solves

  • Official SDK documentation explains endpoints, but rarely shows end-to-end patterns combining prompting, tool use, and retrieval in a single runnable file.
  • Teams adopting Claude often duplicate the same scaffolding (API key loading, retry, output parsing) across projects because no canonical examples existed.
  • New Claude model releases change recommended prompting patterns, so static blog posts go stale quickly while a versioned repository can stay current.
  • Integrating Claude with external systems — Pinecone, Voyage AI, Wikipedia, SQL, calculators — requires gluing multiple APIs together, which is exactly where most beginners stall.
  • Notebook quality is inconsistent across the open-source ecosystem; Anthropic's validation stack (ruff + nbconvert + Claude review) provides a referenceable quality bar.

How it works

  1. Sign up at anthropic.com and obtain a Claude API key — this is the single hard prerequisite listed in the README.
  2. Clone the repository and install Python 3.11 or higher; the pyproject.toml constrains Python to `>=3.11,<3.13`.
  3. Install dependencies with `uv sync --all-extras` (recommended) or `pip install -e ".[dev]"`, which pulls the anthropic SDK, claude-agent-sdk, voyageai, pandas, numpy, and others.
  4. Copy `.env.example` to `.env` and add `ANTHROPIC_API_KEY` so notebooks can load it through python-dotenv.
  5. Open a recipe notebook — for example `tool_use/customer_service_agent.ipynb` or `multimodal/getting_started_with_vision.ipynb` — and execute cells top to bottom.
  6. To extend or contribute, install pre-commit hooks with `uv run pre-commit install` and run `uv run python scripts/validate_notebooks.py` before pushing; use `/notebook-review`, `/model-check`, and `/link-review` in Claude Code to mirror CI.

RepoDaily Try-It Path: From Clone to First Executed Notebook

  • Prerequisite: a Claude API key from anthropic.com and Python 3.11–3.12 (the pyproject.toml upper bound excludes 3.13).
  • Recommended install path uses the `uv` package manager: `curl -LsSf https://astral.sh/uv/install.sh | sh` or `brew install uv`.
  • Repository clone target in CONTRIBUTING.md is `https://github.com/anthropics/anthropic-cookbook.git` (the canonical development URL), after which `uv sync --all-extras` creates the virtualenv.
  • API key setup is file-based: `cp .env.example .env` then edit — notebooks read `os.environ.get("ANTHROPIC_API_KEY")`.
  • A minimal end-to-end smoke test uses nbconvert: `uv run jupyter nbconvert --to notebook --execute skills/classification/guide.ipynb --ExecutePreprocessor.kernel_name=python3 --output test_output.ipynb`.
  • Pre-commit runs ruff format + notebook structure validation; CONTRIBUTING.md instructs contributors to run `uv run ruff check skills/ --fix` and `uv run ruff format skills/` before committing.

Integration Surface: What the pyproject.toml Tells You

The dependency list in pyproject.toml is a reliable signal of which technologies the recipes touch. Runtime dependencies include `anthropic>=0.109.0`, `claude-agent-sdk>=0.1.50`, `voyageai>=0.3.5`, `pandas>=2.3.3`, `numpy>=2.3.4`, `networkx>=3.6.1`, `matplotlib>=3.10.8`, `requests>=2.32.5`, `rich>=14.2.0`, and `python-dotenv>=1.2.1`.

The dev dependency group is equally telling: `ruff>=0.14.2`, `pytest>=8.3.3`, `nbval>=0.11.0`, `nbconvert>=7.16.0`, `pre-commit>=3.8.0`, `tox>=4.32.0`, and `tox-uv>=1.29.0`. This combination tells contributors that notebooks are treated as test artifacts (nbval/nbconvert) and that lint rules extend to `*.ipynb` files explicitly via `[tool.ruff] extend-include`.

The README's recipe table aligns with this surface: third-party examples include Pinecone (vector DB RAG), Wikipedia search, web page extraction with Haiku, and Voyage AI embeddings. These map directly to the voyageai, requests, and pandas dependencies rather than being abstract aspirations.

Adoption Checklist Before You Build on These Recipes

  • Confirm your Anthropic plan and rate limits can absorb the API calls each notebook makes — CONTRIBUTING.md explicitly asks contributors to use minimal tokens for example calls, which is a hint about cost.
  • Pin your Python environment to 3.11 or 3.12; pyproject.toml's `requires-python = ">=3.11,<3.13"` will refuse 3.13.
  • Verify the model aliases you use are current: CONTRIBUTING.md references `claude-haiku-4-5` (Haiku 4.5) and points to https://docs.claude.com/en/docs/about-claude/models/overview as the source of truth.
  • Run `uv run python scripts/validate_notebooks.py` after any local edit; notebooks with broken execution will fail this check.
  • Read the ruff per-file ignores in pyproject.toml — `*.ipynb` files relax rules like E402 (imports mid-file) and F811 (redefinition) because notebook semantics differ from scripts.

Recipe Catalog at a Glance

  • Capabilities: classification, retrieval-augmented generation, summarization.
  • Tool use: customer service agent (`tool_use/customer_service_agent.ipynb`), calculator integration (`tool_use/calculator_tool.ipynb`), SQL queries (`misc/how_to_make_sql_queries.ipynb`).
  • Third-party: Pinecone vector RAG, Wikipedia search, web page reading with Haiku, Voyage AI embeddings.
  • Multimodal: getting started with images, best practices for vision, interpreting charts and graphs.
  • Foundation: README links to Anthropic's Claude API Fundamentals course at github.com/anthropics/courses/tree/master/anthropic_api_fundamentals for newcomers.

Who should pay attention?

Good fit if

  • A Python developer who wants executable Claude API patterns rather than conceptual blog posts
  • A team lead evaluating Claude for classification, RAG, or tool use and needing referenceable examples to show engineers
  • A contributor who wants to extend the cookbook and benefits from the pre-commit + ruff + nbconvert validation pipeline
  • A learner who prefers reading committed notebook outputs before deciding whether to execute cells that cost API credits

Skip for now if

  • Anyone without an Anthropic API key or a budget for metered Claude calls — every non-trivial notebook requires one
  • Teams that need TypeScript or Go examples; the README states concepts are transferable but the code is Python
  • Builders looking for a hosted Claude application or a deployable runtime — this is a curriculum, not a product
  • Users on Python 3.13 or newer; pyproject.toml's upper bound will block installation

Risks and cautions

Low

Code quality risk is low because Anthropic ships a documented validation stack and committed notebook outputs; the real cost exposure is API usage on your Anthropic account.

  • MIT-licensed with Copyright (c) 2023 Anthropic, so commercial adaptation is permitted without legal friction.
  • Contributing pipeline enforces ruff linting, formatting, and notebook structure validation through pre-commit hooks.
  • Notebooks keep their outputs in-repo intentionally, so readers can verify expected behavior without executing anything.
  • The only runtime cost sink is the Anthropic API key the reader supplies — the repository itself does not bill anything.
  • Python is constrained to `>=3.11,<3.13`, which excludes some users but prevents version drift inside the recipes.
  • API keys are loaded from environment variables via `os.environ.get("ANTHROPIC_API_KEY")` and a `.env` file — no hardcoded credentials appear in the recipes.
  • The `.env.example` pattern is the documented setup step, which keeps real keys out of git by convention.
  • pyproject.toml ruff config enables rule set `S` (bandit-style security checks) with explicit ignores for demo-friendly patterns like `S101` (assert), `S301` (pickle), `S311` (pseudo-random), and `S608` (SQL string construction in educational code).
  • Third-party notebooks call external services (Pinecone, Voyage AI, Wikipedia) and developers should review those data flows before running recipes against sensitive inputs.
  • Contributors are expected to review existing issues and pull requests before submitting, which reduces the chance of duplicate or unvetted code entering the repo.

Alternatives to compare

ApproachWhen to useTrade-off
Anthropic Claude API Fundamentals course
You are new to the Claude API and want a structured foundation before tackling cookbook recipesFree
Anthropic developer documentation
You need authoritative endpoint references and prompt engineering guidance rather than runnable notebooksFree
LangChain LLM application framework
You want a broader abstraction layer over many model providers, not just Claude-specific recipesFree, MIT-licensed
LlamaIndex
Your primary use case is retrieval-augmented generation pipelines and document indexingFree, MIT-licensed

What this trend reveals

Internal enablement curriculum for engineering orgs

Because each notebook is MIT-licensed and self-contained, an engineering enablement team can fork specific recipes — customer service agent, calculator tool, SQL queries — into an internal training track without negotiating licensing.

Confirm your fork plan with legal against the MIT notice, then run `uv run python scripts/validate_notebooks.py` on each notebook you import to ensure it still executes.

Reference implementation for RAG with Pinecone or Voyage AI

The third-party section already ships notebooks for vector database RAG with Pinecone and embeddings with Voyage AI, giving a known-good starting point that can be adapted to enterprise data.

Reproduce `third_party/Pinecone/rag_using_pinecone.ipynb` and `third_party/VoyageAI/how_to_create_embeddings.md` against your own corpus and measure retrieval quality before promoting to production.

Contributor pathway into Anthropic's open ecosystem

The CONTRIBUTING.md slash command set (`/notebook-review`, `/model-check`, `/link-review`) gives outside contributors the same checks CI runs, lowering the barrier for high-quality accepted PRs.

Read existing issues and PRs as instructed, pick a missing capability, and run `uv run pre-commit install` so local hooks catch issues before review.

Best next action

Run one multimodal or tool-use notebook end-to-end today

The fastest way to assess the cookbook is to execute one notebook that exercises a non-trivial Claude capability, observe the committed outputs, and compare them to your own results.

  1. Sign up at anthropic.com and create an API key.
  2. Clone the repository and run `uv sync --all-extras` on Python 3.11 or 3.12.
  3. Copy `.env.example` to `.env` and set `ANTHROPIC_API_KEY`.
  4. Open `tool_use/customer_service_agent.ipynb` or `multimodal/getting_started_with_vision.ipynb` and execute all cells.
  5. Run `uv run python scripts/validate_notebooks.py` to confirm your environment matches the documented quality bar.

RepoDaily verdict

anthropics/claude-cookbooks is the most credible starting point for developers who want to learn Claude by running real Python notebooks rather than reading prose. The MIT license, the documented validation stack, and the breadth of recipes — from classification to multimodal vision — make it a curriculum worth cloning before writing your first production Claude integration.

Sources