CCM
/Skills
SkillsMCPMarketplacesDigestToolsAdvertise

This week in Claude

Every Monday: Claude Code, Agent SDK, MCP, and the Anthropic platform moves worth your time.

Skills by Category
Frontend DevelopmentBackend & APIsTesting & QASecurityDevOps & CI/CDGit & Pull RequestsDocumentationCode Review & QualityAI & Agent BuildingSkill Development
MCP Servers by Category
Sales & MarketingWeb & Browser AutomationDatabasesAI & LLM ToolsCloud & InfrastructureCommunication & MessagingDeveloper ToolsDesign & CreativeDocuments & KnowledgeSearch & Web Crawling
Marketplaces by Category
AI Agents & OrchestrationLLM IntegrationDevelopment ToolsFrontend & UIBackend & APIsDatabasesTesting & Code QualityDevOps & CloudSecurity & ComplianceGit & Version Control

Claude Code Marketplaces

Discover Claude Code plugins, extensions, and tools. Automatically updated directory of Anthropic Claude AI marketplaces with development tools, productivity plugins, and integrations.

Resources

  • Browse Skills
  • Browse MCP Servers
  • Browse Marketplaces
  • Skill index
  • MCP index
  • Marketplace index
  • Plugins Reference

Community

  • About
  • Tools
  • Feedback
  • Privacy Policy
  • Advertise

Built for the Claude Code community with Claude Code by mertbuilds.com

Independent project, not affiliated with Anthropic
mindrally avatar

Anthropic Claude Development

mindrally/skills
640 installs223 stars
Summary

This is a comprehensive reference for building with Anthropic's Claude API, covering everything from basic Messages API calls to advanced features like tool use, vision capabilities, and prompt caching. It's heavy on Python examples with proper type hints and error handling, which means you can copy and adapt most of the code directly. The tool use section is especially thorough, showing the full request and response cycle for function calling. What stands out is the practical focus on production concerns like retry logic, API key management, and caching strategies for frequently used context. If you're moving beyond basic Claude integration and need patterns for streaming, multimodal inputs, or batch processing, this gives you the blueprints.

Install to Claude Code

npx -y skills add mindrally/skills --skill anthropic-claude-development --agent claude-code

Installs into .claude/skills of the current project.

CodeRabbit
CodeRabbit
AI writes the code. CodeRabbit catches the slop.
Try For Free →
MCP-ready Email SendingMCP-ready Email Sending
MCP-ready Email Sending
Plug Mailtrap into your AI workflow and let it handle the email.
Connect Mailtrap MCP →
Make your agent a DeFi expert
Make your agent a DeFi expert
Agent, run crypto. Access onchain data & trade routes via 1inch.
Install now →
Capacitor - Shared memory for your team’s coding agents.
Capacitor - Shared memory for your team’s coding agents.
Make coding agent sessions - Searchable, Shareable, Vendor-neutral & Scored.
Try For Free →
CodeScene MCP ServerCodeScene MCP Server
CodeScene MCP Server
Your agent targets a perfect 10 Code Health score. Deterministic. Every commit.
Try For Free →
Give your AI the whole web as clean markdownGive your AI the whole web as clean markdown
Give your AI the whole web as clean markdown
Integrate web data into your AI product. One API to scrape website & brand data.
Get API Key Now →
belt - the only tool your agent needs
belt - the only tool your agent needs
belt cli automatically finds the best tools and skills for your agent. image, video, music, tts...
one prompt install →
inference shell
inference shell
create and run specialised agents in minutes
build now →
CodeRabbit
CodeRabbit
AI writes the code. CodeRabbit catches the slop.
Try For Free →
MCP-ready Email SendingMCP-ready Email Sending
MCP-ready Email Sending
Plug Mailtrap into your AI workflow and let it handle the email.
Connect Mailtrap MCP →
Make your agent a DeFi expert
Make your agent a DeFi expert
Agent, run crypto. Access onchain data & trade routes via 1inch.
Install now →
Capacitor - Shared memory for your team’s coding agents.
Capacitor - Shared memory for your team’s coding agents.
Make coding agent sessions - Searchable, Shareable, Vendor-neutral & Scored.
Try For Free →
CodeScene MCP ServerCodeScene MCP Server
CodeScene MCP Server
Your agent targets a perfect 10 Code Health score. Deterministic. Every commit.
Try For Free →
Give your AI the whole web as clean markdownGive your AI the whole web as clean markdown
Give your AI the whole web as clean markdown
Integrate web data into your AI product. One API to scrape website & brand data.
Get API Key Now →
belt - the only tool your agent needs
belt - the only tool your agent needs
belt cli automatically finds the best tools and skills for your agent. image, video, music, tts...
one prompt install →
inference shell
inference shell
create and run specialised agents in minutes
build now →
Files
SKILL.mdView on GitHub

Anthropic Claude API Development

You are an expert in Anthropic Claude API development, including the Messages API, tool use, prompt engineering, and building production-ready applications with Claude models.

Key Principles

  • Write concise, technical responses with accurate Python examples
  • Use type hints for all function signatures
  • Follow Claude's usage policies and guidelines
  • Implement proper error handling and retry logic
  • Never hardcode API keys; use environment variables

Setup and Configuration

Environment Setup

import os
from anthropic import Anthropic

# Always use environment variables for API keys
client = Anthropic(api_key=os.environ.get("ANTHROPIC_API_KEY"))

Best Practices

  • Store API keys in .env files, never commit them
  • Use python-dotenv for local development
  • Set up separate keys for development and production
  • Configure proper timeout settings for your use case

Messages API

Basic Usage

from anthropic import Anthropic

client = Anthropic()

message = client.messages.create(
    model="claude-sonnet-4-20250514",
    max_tokens=1024,
    system="You are a helpful assistant.",
    messages=[
        {"role": "user", "content": "Hello, Claude!"}
    ]
)

print(message.content[0].text)

Streaming Responses

with client.messages.stream(
    model="claude-sonnet-4-20250514",
    max_tokens=1024,
    messages=[{"role": "user", "content": "Write a story"}]
) as stream:
    for text in stream.text_stream:
        print(text, end="", flush=True)

Model Selection

  • Use claude-opus-4-20250514 for complex reasoning and analysis
  • Use claude-sonnet-4-20250514 for balanced performance and cost
  • Use claude-3-5-haiku-20241022 for fast, efficient responses
  • Consider task complexity when selecting models

Tool Use (Function Calling)

Defining Tools

tools = [
    {
        "name": "get_weather",
        "description": "Get the current weather in a given location",
        "input_schema": {
            "type": "object",
            "properties": {
                "location": {
                    "type": "string",
                    "description": "The city and state, e.g., San Francisco, CA"
                },
                "unit": {
                    "type": "string",
                    "enum": ["celsius", "fahrenheit"],
                    "description": "The unit of temperature"
                }
            },
            "required": ["location"]
        }
    }
]

response = client.messages.create(
    model="claude-sonnet-4-20250514",
    max_tokens=1024,
    tools=tools,
    messages=[{"role": "user", "content": "What's the weather in London?"}]
)

Handling Tool Calls

import json

def process_tool_use(response, messages, tools):
    # Check if Claude wants to use a tool
    if response.stop_reason == "tool_use":
        tool_use_block = next(
            block for block in response.content
            if block.type == "tool_use"
        )

        tool_name = tool_use_block.name
        tool_input = tool_use_block.input

        # Execute the tool
        tool_result = execute_tool(tool_name, tool_input)

        # Continue the conversation
        messages.append({"role": "assistant", "content": response.content})
        messages.append({
            "role": "user",
            "content": [{
                "type": "tool_result",
                "tool_use_id": tool_use_block.id,
                "content": json.dumps(tool_result)
            }]
        })

        # Get final response
        return client.messages.create(
            model="claude-sonnet-4-20250514",
            max_tokens=1024,
            tools=tools,
            messages=messages
        )

    return response

Vision and Multimodal

Image Analysis

import base64

# From URL
message = client.messages.create(
    model="claude-sonnet-4-20250514",
    max_tokens=1024,
    messages=[{
        "role": "user",
        "content": [
            {
                "type": "image",
                "source": {
                    "type": "url",
                    "url": "https://example.com/image.jpg"
                }
            },
            {
                "type": "text",
                "text": "Describe this image in detail."
            }
        ]
    }]
)

# From base64
with open("image.png", "rb") as f:
    image_data = base64.standard_b64encode(f.read()).decode("utf-8")

message = client.messages.create(
    model="claude-sonnet-4-20250514",
    max_tokens=1024,
    messages=[{
        "role": "user",
        "content": [
            {
                "type": "image",
                "source": {
                    "type": "base64",
                    "media_type": "image/png",
                    "data": image_data
                }
            },
            {
                "type": "text",
                "text": "What do you see?"
            }
        ]
    }]
)

Prompt Engineering for Claude

System Prompts

  • Be clear and specific about the assistant's role
  • Include relevant context and constraints
  • Specify output format when needed
  • Use XML tags for structured instructions
system_prompt = """You are a technical documentation writer.

<guidelines>
- Write clear, concise documentation
- Use proper markdown formatting
- Include code examples where appropriate
- Follow the Google developer documentation style guide
</guidelines>

<output_format>
Always structure your response with:
1. Overview
2. Prerequisites
3. Step-by-step instructions
4. Examples
5. Troubleshooting
</output_format>
"""

Prompting Best Practices

  • Use XML tags to structure complex prompts
  • Provide examples for few-shot learning
  • Be explicit about what you want and don't want
  • Use chain-of-thought prompting for complex reasoning
  • Specify the desired output format clearly

Error Handling

Retry Logic

from anthropic import RateLimitError, APIError
import time

def call_with_retry(func, max_retries=3, base_delay=1):
    for attempt in range(max_retries):
        try:
            return func()
        except RateLimitError:
            delay = base_delay * (2 ** attempt)
            print(f"Rate limited. Retrying in {delay}s...")
            time.sleep(delay)
        except APIError as e:
            if attempt == max_retries - 1:
                raise
            time.sleep(base_delay)
    raise Exception("Max retries exceeded")

Common Error Types

  • RateLimitError: Implement exponential backoff
  • APIError: Check API status, retry with backoff
  • AuthenticationError: Verify API key
  • BadRequestError: Validate input parameters

Prompt Caching

Using Caching

# Enable caching for frequently used context
response = client.messages.create(
    model="claude-sonnet-4-20250514",
    max_tokens=1024,
    system=[{
        "type": "text",
        "text": "Large context that should be cached...",
        "cache_control": {"type": "ephemeral"}
    }],
    messages=[{"role": "user", "content": "Question about the context"}]
)

Caching Best Practices

  • Cache large, static content like documentation
  • Place cached content at the beginning of the prompt
  • Monitor cache hit rates for optimization
  • Use caching for repeated similar queries

Message Batches API

Batch Processing

# Create a batch for non-time-sensitive requests
batch = client.messages.batches.create(
    requests=[
        {
            "custom_id": "request-1",
            "params": {
                "model": "claude-sonnet-4-20250514",
                "max_tokens": 1024,
                "messages": [{"role": "user", "content": "Question 1"}]
            }
        },
        {
            "custom_id": "request-2",
            "params": {
                "model": "claude-sonnet-4-20250514",
                "max_tokens": 1024,
                "messages": [{"role": "user", "content": "Question 2"}]
            }
        }
    ]
)

Cost Optimization

  • Use appropriate models for task complexity
  • Implement prompt caching for repeated context
  • Use batches for non-urgent requests
  • Set reasonable max_tokens limits
  • Cache responses when appropriate
  • Monitor token usage patterns

Security Best Practices

  • Never expose API keys in client-side code
  • Implement rate limiting on your endpoints
  • Validate and sanitize user inputs
  • Log API usage for monitoring and auditing
  • Follow Anthropic's acceptable use policy

Dependencies

  • anthropic
  • python-dotenv
  • pydantic (for input validation)
  • tenacity (for retry logic)
Featured
CodeRabbit
CodeRabbit
AI writes the code. CodeRabbit catches the slop.
Try For Free →
MCP-ready Email SendingMCP-ready Email Sending
MCP-ready Email Sending
Plug Mailtrap into your AI workflow and let it handle the email.
Connect Mailtrap MCP →
Make your agent a DeFi expert
Make your agent a DeFi expert
Agent, run crypto. Access onchain data & trade routes via 1inch.
Install now →
Capacitor - Shared memory for your team’s coding agents.
Capacitor - Shared memory for your team’s coding agents.
Make coding agent sessions - Searchable, Shareable, Vendor-neutral & Scored.
Try For Free →
CodeScene MCP ServerCodeScene MCP Server
CodeScene MCP Server
Your agent targets a perfect 10 Code Health score. Deterministic. Every commit.
Try For Free →
Give your AI the whole web as clean markdownGive your AI the whole web as clean markdown
Give your AI the whole web as clean markdown
Integrate web data into your AI product. One API to scrape website & brand data.
Get API Key Now →
belt - the only tool your agent needs
belt - the only tool your agent needs
belt cli automatically finds the best tools and skills for your agent. image, video, music, tts...
one prompt install →
inference shell
inference shell
create and run specialised agents in minutes
build now →
Categories
Backend & APIsAI & Agent Building
First SeenJun 3, 2026
View on GitHub

More from mindrally/skills

All 240 skills →
  • Sanity640
  • Anime Js639
  • Ruby637
  • Fastapi Microservices Serverless636
  • Figma Integration636
  • Llm635
  • Pnpm634
  • Spring Framework633
  • Blockchain632
  • Microservices632
  • Autogen Development631
  • Phoenix630
  • Nodejs Development629
  • Shopify629
  • Vercel Development629
  • Postcss Best Practices627
  • Dotnet625
  • Cypress622
  • Rspec622
  • Go Api Development621
  • Solidity620
  • Koa Typescript619
  • Kotlin Development619
  • Rest Api Django619

Recommended

More Backend & APIs →
uni-helper avatar
vue

uni-helper/skills

Vue.js progressive JavaScript framework. Use when building Vue components, working with reactivity (ref, reactive, computed, watch), or implementing Vue Composition API patterns.
639
94
vtex avatar
payment-provider-framework

vtex/skills

Apply when designing or implementing a Payment Connector in VTEX IO. Covers PPF implementation, TypeScript 3.9.7 builder-hub constraints and safe dependency resolutions, configuration.json schema validation, PaymentProviderService clients wiring, Secure Proxy scope (authorize-only), ExternalClient vs SecureExternalClient patterns, IOContext access, PPF response helpers, PSP integration checklist, and vtex link debugging. Use for any implementation of a Payment Connector hosted in VTEX IO.
638
39
minimax-ai avatar
minimax-multimodal-toolkit

minimax-ai/skills

Use mmx to generate text, images, video, speech, and music via the MiniMax AI platform. Use when the user wants to create media content, chat with MiniMax models, perform web search, or manage MiniMax API resources from the terminal.
637
13.3k
neo4j-contrib avatar
neo4j-modeling-skill

neo4j-contrib/neo4j-skills

Design, review, and refactor Neo4j graph data models. Use when choosing node labels vs relationship types vs properties, migrating relational/document schemas to graph, detecting anti-patterns (generic labels, supernodes, missing constraints), designing intermediate nodes for n-ary relationships, enforcing schema with constraints and indexes, or assessing an existing model against graph modeling best practices. Does NOT handle Cypher query authoring — use neo4j-cypher-skill. Does NOT handle Spring Data Neo4j entity mapping — use neo4j-spring-data-skill. Does NOT handle GraphQL type definitions — use neo4j-graphql-skill. Does NOT handle data import — use neo4j-import-skill.
637
101
mindrally avatar
spring-framework

mindrally/skills

Expert guidance for Spring Framework and Spring Boot development with Java best practices, dependency injection, and RESTful API design
633
223
skyworkai avatar
Skywork-ppt

skyworkai/skywork-skills

Use this skill when the user wants to work with PowerPoint presentations. Triggers include: - Generating a new PPT from a topic: 'generate a PPT' / '帮我做个PPT' / 'PPTを作って' / 'PPT 만들어줘', 'create a presentation about X' / '生成关于X的演示文稿' / 'Xについてのプレゼンを作って' / 'X에 대한 발표 자료 만들어줘', 'help me make slides' / '帮我做幻灯片' / 'スライドを作って' / '슬라이드 만들어줘' - Imitating an existing .pptx style/template: 'use this template' / '用这个模板' / 'このテンプレートを使って' / '이 템플릿을 써줘', 'imitate this PPT' / '仿照这个PPT' / 'このPPTを真似して' / '이 PPT를 따라 해줘', 'imitate this style' / '仿照这个风格' / 'このスタイルを真似して' / '이 스타일을 따라 해줘' - Editing an existing PPT via natural language: 'modify slide N' / '修改第N页' / 'N枚目のスライドを修正して' / 'N번 슬라이드 수정해줘', 'change the background' / '更换背景' / '背景を変えて' / '배경 바꿔줘', 'add a slide' / '新增一页幻灯片' / 'スライドを追加して' / '슬라이드 추가해줘', 'make it more beautiful' / '美化一下PPT' / 'もっときれいにして' / '더 예쁘게 다듬어줘', 'edit this PPT' / '改一下这个PPT' / 'このPPTを編集して' / '이 PPT 수정해줘' - Local file operations on .pptx (no backend): 'delete slide N' / '删除第N页' / 'N枚目のスラ
632
196