agentleFS
AnthropicKnown publisheranthropics/claude-cookbooks/CLAUDE.md

claude-cookbooks

CLAUDE.md53k starsChanged 10 months agoMITView on GitHub

A collection of Jupyter notebooks and Python examples for building with the Claude API. Or directly with uv: Notebooks have relaxed rules for mid-file imports (E402), redefinitions (F811), and variable naming (N803, N806). Branch naming: <username>/<feature-description> Commit format (conventional commits): These commands are available in Claude Code and CI:

  • Reads credentials

Adopted by

Steady: 0 new projects took it in the last 4 weeks, none the 4 weeks before.thin data

Week of Sep 27: 0 new projectsWeek of Oct 4: 0 new projectsWeek of Oct 11: 0 new projectsWeek of Oct 18: 0 new projectsWeek of Oct 25: 0 new projectsWeek of Nov 1: 0 new projectsWeek of Nov 8: 0 new projectsWeek of Nov 15: 0 new projects
Sep 2026Oct 2026Nov 2026
New projects taking a version of this file each week, over the 8 weeks our latest run read: only 0 in all, so this is a hint, not a trend.

Who's talking about anthropics/claude-cookbooks

The biggest 5 of 55 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 55

Talked about on GitHub, Bluesky and Hacker News (55 times).

On GitHub · 50

45 more on GitHub

On Bluesky · 4

On Hacker News · 1

The file

We split this CLAUDE.md into the rules it gives an agent

11 rules. About 0 are common, 6 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Very specific:

    API Keys: Never commit .env files. Use dotenv.load_dotenv() then access keys via os.environ or os.getenv()

    line 60
  2. Very specific:

    Dependencies: Use uv add <package> or uv add --dev <package>.

    line 62
  3. Distinctive:

    Models: Use current Claude models.

    line 64
  4. Distinctive:

    Bedrock model IDs: follow a different format.

    line 69
  5. Distinctive:

    Keep outputs in notebooks (intentional for demonstration)

    line 77
  6. Distinctive:

    Test that notebooks run top-to-bottom without errors

    line 79
  7. Very specific:

    Quality checks: Run make check before committing.

    line 81
  8. Distinctive:

    Create notebook in the appropriate directory

    line 108
  9. Very specific:

    Add entry to registry.yaml with title, description, path, authors, categories

    line 109
  10. Very specific:

    Add author info to authors.yaml if new contributor

    line 110
  11. Distinctive:

    Run quality checks and submit PR

    line 111

≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

Claude Cookbooks

A collection of Jupyter notebooks and Python examples for building with the Claude API.

Quick Start

# Install dependencies
uv sync --all-extras

# Install pre-commit hooks
uv run pre-commit install

# Set up API key
cp .env.example .env
# Edit .env and add your ANTHROPIC_API_KEY

Development Commands

make format        # Format code with ruff
make lint          # Run linting
make check         # Run format-check + lint
make fix           # Auto-fix issues + format
make test          # Run pytest

Or directly with uv:

uv run ruff format .           # Format
uv run ruff check .            # Lint
uv run ruff check --fix .      # Auto-fix
uv run pre-commit run --all-files

Code Style

  • Line length: 100 characters
  • Quotes: Double quotes
  • Formatter: Ruff

Notebooks have relaxed rules for mid-file imports (E402), redefinitions (F811), and variable naming (N803, N806).

Git Workflow

Branch naming: <username>/<feature-description>

Commit format (conventional commits):

feat(scope): add new feature
fix(scope): fix bug
docs(scope): update documentation
style: lint/format

Key Rules

  1. API Keys: Never commit .env files. Use dotenv.load_dotenv() then access keys via os.environ or os.getenv()
  2. Dependencies: Use uv add <package> or uv add --dev <package>. Never edit pyproject.toml directly.
  3. Models: Use current Claude models. Check docs.anthropic.com for latest versions.
    • Sonnet: claude-sonnet-5
    • Haiku: claude-haiku-4-5
    • Opus: claude-opus-4-8
    • Never use dated model IDs (e.g., claude-sonnet-4-6-20250514). Always use the non-dated alias.
    • Bedrock model IDs follow a different format. Use the base Bedrock model ID from the docs:
      • Opus 4.8: anthropic.claude-opus-4-8
      • Sonnet 5: anthropic.claude-sonnet-5
      • Haiku 4.5: anthropic.claude-haiku-4-5-20251001-v1:0
      • Prepend global. for global endpoints (recommended): global.anthropic.claude-opus-4-8
      • Note: older Bedrock models use a dated -YYYYMMDD-v1:0 suffix (e.g., Haiku 4.5 above); newer ones use the suffix-less anthropic.claude-<model> format.
  4. Notebooks:
    • Keep outputs in notebooks (intentional for demonstration)
    • One concept per notebook
    • Test that notebooks run top-to-bottom without errors
  5. Quality checks: Run make check before committing. Pre-commit hooks validate formatting and notebook structure.

Slash Commands

These commands are available in Claude Code and CI:

  • /notebook-review - Review notebook quality
  • /model-check - Validate Claude model references
  • /link-review - Check links in changed files

Project Structure

capabilities/      # Core Claude capabilities (RAG, classification, etc.)
evals/             # Model evaluation patterns and benchmarks
skills/            # Advanced skill-based notebooks
tool_use/          # Tool use and integration patterns
multimodal/        # Vision and image processing
misc/              # Batch processing, caching, utilities
third_party/       # Pinecone, Voyage, Wikipedia integrations
extended_thinking/ # Extended reasoning patterns
scripts/           # Validation scripts
.claude/           # Claude Code commands and skills

Adding a New Cookbook

  1. Create notebook in the appropriate directory
  2. Add entry to registry.yaml with title, description, path, authors, categories
  3. Add author info to authors.yaml if new contributor
  4. Run quality checks and submit PR

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.