Skip to content
Development
Skill

/claude-cookbooks

TRANSLATED CONTENT: --- name: claude-cookbooks 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. ---

From plugin
vibe-coding-cn
23k14 skills

Claude Code

$ npx -y skills add 2025emma/vibe-coding-cn --skill claude-cookbooks --agent claude-code

SKILL.md

claude-cookbooks.SKILL.md

TRANSLATED CONTENT: --- name: claude-cookbooks 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. ---

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

1. Define tools for CRM access, ticket creation, knowledge base search 2. Use tool use API to handle function calls 3. Implement conversation memory 4. Add fallback mechanisms

See: `references/tool_use.md#customer-service`

Implementing RAG

1. Create embeddings of your documents 2. Store in vector database (Pinecone, etc.) 3. Retrieve relevant context on query 4. Augment Claude's response with context

See: `references/capabilities.md#rag`

Processing Documents with Vision

1. Convert document to images or PDF 2. Use vision API to extract content 3. Structure the extracted data 4. Validate and post-process

See: `references/multimodal.md#vision`

Building Multi-Agent Systems

1. Define specialized agents for different tasks 2. Implement routing logic 3. Use sub-agents for delegation 4. Aggregate results

See: `references/patterns.md#agents`

Best Practices

API Usage

  • Use appropriate model for task (Sonnet for balance, Haiku for speed, Opus for complex tasks)
  • Implement retry logic with exponential backoff
  • Handle rate limits gracefully
  • Monitor token usage for cost optimization

Prompt Engineering

  • Be specific and clear in instructions
  • Provide examples when needed
  • Use system prompts for consistent behavior
  • Structure outp
Read more
@2025emma
Ships withvibe-coding-cn

一个通过与 AI 结对编程,将想法变为现实的终极工作站 徽章区域 (BADGES) --> 本仓库的 AI 解读链接:zread.ai/tukuaiai/vibe-coding-cn

Stars on GitHub

Momentum

stars in total
23.2k
Star history of 2025emma/vibe-coding-cn on GitHub, a chart by star-history.com

Other skills on vibe-coding-cn.

ccxt

ccxt

TRANSLATED CONTENT: --- name: ccxt description: CCXT cryptocurrency trading library. Use for cryptocurrency exchange APIs,…

claude-code-guide

claude-code-guide

TRANSLATED CONTENT: --- name: claude-code-guide description: Claude Code 高级开发指南 - 全面的中文教程,涵盖工具使用、REPL 环境、开发工作流、MCP…

coingecko

coingecko

TRANSLATED CONTENT: --- name: coingecko description: CoinGecko API documentation - cryptocurrency market data API, price feeds,…

cryptofeed

cryptofeed

TRANSLATED CONTENT: --- name: cryptofeed description: Cryptofeed - Real-time cryptocurrency market data feeds from 40+ exchanges.…

hummingbot

hummingbot

TRANSLATED CONTENT: --- name: hummingbot description: Hummingbot trading bot framework - automated trading strategies, market…

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills2w309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc2w293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react5d252k
@facebook@facebookInstall Skill

Questions about claude-cookbooks.

Which coding agents can use claude-cookbooks?
claude-cookbooks installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.