# Claude Cookbooks

Claude AI cookbooks - code examples, tutorials, and best practices for using Claude API.

- Repository: https://github.com/2025Emma/vibe-coding-cn (23122 stars)
- Category: AI and agents
- License: MIT
- Last updated: 2025-12-17
- Runs scripts: yes, review before use

## Install

Claude Code: `npx skills add 2025Emma/vibe-coding-cn --skill claude-cookbooks -g -a claude-code -y`
Codex: `npx skills add 2025Emma/vibe-coding-cn --skill claude-cookbooks -g -a codex -y`
Cursor: `npx skills add 2025Emma/vibe-coding-cn --skill claude-cookbooks -g -a cursor -y`
Gemini CLI: `npx skills add 2025Emma/vibe-coding-cn --skill claude-cookbooks -g -a gemini-cli -y`

## Description

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.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# 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

```python
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)

```python
# 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)

The rest: https://github.com/2025Emma/vibe-coding-cn/blob/HEAD/i18n/zh/skills/claude-cookbooks/SKILL.md
