快速判断
Anthropic Claude API 集成 — 通过 Anthropic Messages API 实现聊天补全、流式输出、视觉、工具调用和批量处理。使用 Claude 生成文本...
适合任务
- 按 SkillHub 收录说明复用成熟任务流程。
- 通过下载包离线阅读完整 Skill 内容。
- 结合热度指标优先评估常用 Skill。
输入与输出
输入:任务目标、上下文材料、文件路径、约束条件或需要处理的内容。
输出:按 Skill 说明生成的文档、代码、检查结果、计划、建议或操作步骤。
示例任务
- 使用 Anthropic 帮我处理当前任务,并说明需要准备哪些输入。
- 根据 Anthropic 的说明,先列出使用前的安全检查项。
安装方式
- 下载本站提供的 Skill ZIP 并解压。
- 把解压后的 Skill 目录放入当前 AI 工具支持的
skills目录。 - 如需在线查看原始内容,可打开 GitHub 的
SKILL.md。
在线原始地址:skillhub-anthropic/SKILL.md
风险边界
SkillHub 提供了源站安全报告入口,但本站不替代人工审查。使用前仍需检查权限、外部依赖和敏感数据边界。
SKILL.md 文档介绍
🔮 Anthropic
Anthropic Claude API integration — chat completions, streaming, vision, tool use, and batch processing via the Anthropic Messages API.
Features
- Messages API — Claude Opus, Sonnet, Haiku completions
- Streaming — real-time token streaming responses
- Vision — image analysis and understanding
- Tool use — function calling with structured output
- System prompts — custom system instructions
- Multi-turn conversations — context management
- Batch API — bulk message processing
- Token counting — estimate usage before sending
- Extended thinking — deep reasoning mode
- Model listing — available models and capabilities
Requirements
| Variable | Required | Description |
|----------|----------|-------------|
| ANTHROPIC_API_KEY | ✅ | API key/token for Anthropic |
Quick Start
# Send a message to Claude
python3 {baseDir}/scripts/anthropic.py chat "What is the meaning of life?" --model claude-sonnet-4-20250514# Chat with system prompt
python3 {baseDir}/scripts/anthropic.py chat-system --system "You are a financial analyst" "Analyze AAPL stock"# Analyze an image
python3 {baseDir}/scripts/anthropic.py chat-image --image photo.jpg 'What do you see in this image?'# Stream a response
python3 {baseDir}/scripts/anthropic.py stream "Write a short story about a robot" --model claude-sonnet-4-20250514Commands
chat
Send a message to Claude.
python3 {baseDir}/scripts/anthropic.py chat "What is the meaning of life?" --model claude-sonnet-4-20250514chat-system
Chat with system prompt.
python3 {baseDir}/scripts/anthropic.py chat-system --system "You are a financial analyst" "Analyze AAPL stock"chat-image
Analyze an image.
python3 {baseDir}/scripts/anthropic.py chat-image --image photo.jpg 'What do you see in this image?'stream
Stream a response.
python3 {baseDir}/scripts/anthropic.py stream "Write a short story about a robot" --model claude-sonnet-4-20250514batch-create
Create a batch request.
python3 {baseDir}/scripts/anthropic.py batch-create requests.jsonlbatch-list
List batch jobs.
python3 {baseDir}/scripts/anthropic.py batch-listbatch-get
Get batch status.
python3 {baseDir}/scripts/anthropic.py batch-get batch_abc123batch-results
Get batch results.
python3 {baseDir}/scripts/anthropic.py batch-results batch_abc123count-tokens
Count tokens in a message.
python3 {baseDir}/scripts/anthropic.py count-tokens "How many tokens is this message?"models
List available models.
python3 {baseDir}/scripts/anthropic.py modelstools
Chat with tool use.
python3 {baseDir}/scripts/anthropic.py tools --tools '[{"name":"get_weather","description":"Get weather","input_schema":{"type":"object","properties":{"location":{"type":"string"}}}}]' "What is the weather in NYC?"thinking
Extended thinking mode.
python3 {baseDir}/scripts/anthropic.py thinking "Solve this math problem step by step: what is 123 * 456?" --budget 10000Output Format
All commands output JSON by default. Add --human for readable formatted output.
# JSON (default, for programmatic use)
python3 {baseDir}/scripts/anthropic.py chat --limit 5
# Human-readable
python3 {baseDir}/scripts/anthropic.py chat --limit 5 --humanScript Reference
| Script | Description |
|--------|-------------|
| {baseDir}/scripts/anthropic.py | Main CLI — all Anthropic operations |
Data Policy
This skill never stores data locally. All requests go directly to the Anthropic API and results are returned to stdout. Your data stays on Anthropic servers.
Credits
---
Built by M. Abidi | agxntsix.ai
Part of the AgxntSix Skill Suite for OpenClaw agents.
📅 Need help setting up OpenClaw for your business? Book a free consultation