using-anthropic-platform
БесплатноБез исполняемых скриптовНе проверенClaude SDK development with Messages API, Tool Use, Extended Thinking, streaming, and prompt caching
от majiayu000★ 31 звезда на GitHubОб этом скилле
Anthropic Claude SDK - Quick Reference
When to Use
Load this skill when:
anthropicpackage inrequirements.txtorpyproject.toml@anthropic-ai/sdkinpackage.jsondependenciesANTHROPIC_API_KEYenvironment variable present- User mentions "Anthropic", "Claude", or Claude models
For detailed patterns: See REFERENCE.md
Table of Contents
- Claude Models
- Quick Start
- Messages API Essentials
- Streaming
- Tool Use (Function Calling)
- Extended Thinking
- Vision
- Prompt Caching
- Error Handling
- Platform Features
- Further Reading
Claude Models (January 2026)
| Model | Context | Max Output | Thinking | Best For |
|---|---|---|---|---|
claude-opus-4-5-20251101 |
200K | 32K | Yes | Maximum intelligence |
claude-sonnet-4-20250514 |
200K | 64K | Yes | Complex reasoning, coding |
claude-3-5-sonnet-20241022 |
200K | 8K | No | Standard tasks |
claude-3-5-haiku-20241022 |
200K | 8K | No | Simple chat, Q&A (cheapest) |
Model Selection
Simple chat/Q&A -> claude-3-5-haiku (cheapest)
Standard tasks -> claude-3-5-sonnet
Complex reasoning/coding -> claude-sonnet-4 or claude-opus-4-5
Extended thinking needed -> claude-sonnet-4 or claude-opus-4-5
Batch processing -> Any model (50% cost savings)
Pricing (per 1M tokens)
| Model | Input | Output | Cache Read |
|---|---|---|---|
| claude-opus-4-5 | $15.00 | $75.00 | $1.50 |
| claude-sonnet-4 | $3.00 | $15.00 | $0.30 |
| claude-3-5-sonnet | $3.00 | $15.00 | $0.30 |
| claude-3-5-haiku | $0.80 | $4.00 | $0.08 |
Quick Start
Python
from anthropic import Anthropic
client = Anthropic() # Uses ANTHROPIC_API_KEY env var
message = client.messages.create(
model="claude-sonnet-4-20250514",
max_tokens=1024,
messages=[{"role": "user", "content": "Hello, Claude!"}]
)
print(message.content[0].text)
TypeScript
import Anthropic from '@anthropic-ai/sdk';
const client = new Anthropic();
const message = await client.messages.create({
model: 'claude-sonnet-4-20250514',
max_tokens: 1024,
messages: [{ role: 'user', content: 'Hello, Claude!' }]
});
console.log(message.content[0].text);
Async Python
import asyncio
from anthropic import AsyncAnthropic
async def main():
client = AsyncAnthropic()
message = await client.messages.create(
model="claude-sonnet-4-20250514",
max_tokens=1024,
messages=[{"role": "user", "content": "Hello!"}]
)
print(message.content[0].text)
asyncio.run(main())
Messages API Essentials
With System Prompt
message = client.messages.create(
model="claude-sonnet-4-20250514",
max_tokens=1024,
system="You are a helpful coding assistant. Be concise.",
messages=[{"role": "user", "content": "Explain async/await."}]
)
Multi-Turn Conversation
messages = [
{"role": "user", "content": "What is Python?"},
{"role": "assistant", "content": "Python is a programming language..."},
{"role": "user", "content": "How do I install it?"}
]
response = client.messages.create(
model="claude-sonnet-4-20250514",
max_tokens=1024,
messages=messages
)
Common Parameters
| Parameter | Type | Description |
|---|---|---|
model |
string | Model ID (required) |
max_tokens |
int | Max response tokens (required) |
messages |
array | Conversation messages (required) |
system |
string | System prompt |
temperature |
float (0-1) | Randomness |
tools |
array | Tool definitions |
stream |
boolean | Enable streaming |
Streaming
Basic Streaming
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)
Async Streaming
async with client.messages.stream(
model="claude-sonnet-4-20250514",
max_tokens=1024,
messages=[{"role": "user", "content": prompt}]
) as stream:
async for text in stream.text_stream:
print(text, end="", flush=True)
Tool Use (Function Calling)
Define Tools
tools = [{
"name": "get_weather",
"description": "Get weather for a location",
"input_schema": {
"type": "object",
"properties": {
"location": {"type": "string", "description": "City, e.g., San Francisco"}
},
"required": ["location"]
}
}]
Tool Use Loop
def process_with_tools(user_message: str) -> str:
me
Установить using-anthropic-platform в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл using-anthropic-platform?
Claude SDK development with Messages API, Tool Use, Extended Thinking, streaming, and prompt caching
Как установить скилл using-anthropic-platform?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл using-anthropic-platform запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic