🔮 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 |
|---|
| INLINECODE0 | ✅ | API key/token for Anthropic |
Quick Start
CODEBLOCK0
CODEBLOCK1
CODEBLOCK2
CODEBLOCK3
Commands
chat
Send a message to Claude.
CODEBLOCK4
chat-system
Chat with system prompt.
CODEBLOCK5
chat-image
Analyze an image.
CODEBLOCK6
stream
Stream a response.
CODEBLOCK7
batch-create
Create a batch request.
CODEBLOCK8
batch-list
List batch jobs.
CODEBLOCK9
batch-get
Get batch status.
CODEBLOCK10
batch-results
Get batch results.
CODEBLOCK11
count-tokens
Count tokens in a message.
CODEBLOCK12
models
List available models.
CODEBLOCK13
tools
Chat with tool use.
CODEBLOCK14
thinking
Extended thinking mode.
CODEBLOCK15
Output Format
All commands output JSON by default. Add --human for readable formatted output.
CODEBLOCK16
Script Reference
| Script | Description |
|---|
| INLINECODE14 | 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
YouTube |
GitHub
Part of the
AgxntSix Skill Suite for OpenClaw agents.
📅 Need help setting up OpenClaw for your business? Book a free consultation
🔮 Anthropic
Anthropic Claude API 集成——通过 Anthropic Messages API 实现聊天补全、流式传输、视觉识别、工具使用和批量处理。
功能特性
- - Messages API — Claude Opus、Sonnet、Haiku 补全
- 流式传输 — 实时令牌流式响应
- 视觉识别 — 图像分析与理解
- 工具使用 — 带结构化输出的函数调用
- 系统提示 — 自定义系统指令
- 多轮对话 — 上下文管理
- 批量 API — 批量消息处理
- 令牌计数 — 发送前预估使用量
- 扩展思考 — 深度推理模式
- 模型列表 — 可用模型及能力
环境要求
| 变量 | 必需 | 描述 |
|---|
| ANTHROPICAPIKEY | ✅ | Anthropic 的 API 密钥/令牌 |
快速开始
bash
向 Claude 发送消息
python3 {baseDir}/scripts/anthropic.py chat 生命的意义是什么? --model claude-sonnet-4-20250514
bash
使用系统提示进行对话
python3 {baseDir}/scripts/anthropic.py chat-system --system 你是一名金融分析师 分析 AAPL 股票
bash
分析图像
python3 {baseDir}/scripts/anthropic.py chat-image --image photo.jpg 你在这张图片中看到了什么?
bash
流式传输响应
python3 {baseDir}/scripts/anthropic.py stream 写一个关于机器人的短篇故事 --model claude-sonnet-4-20250514
命令
chat
向 Claude 发送消息。
bash
python3 {baseDir}/scripts/anthropic.py chat 生命的意义是什么? --model claude-sonnet-4-20250514
chat-system
使用系统提示进行对话。
bash
python3 {baseDir}/scripts/anthropic.py chat-system --system 你是一名金融分析师 分析 AAPL 股票
chat-image
分析图像。
bash
python3 {baseDir}/scripts/anthropic.py chat-image --image photo.jpg 你在这张图片中看到了什么?
stream
流式传输响应。
bash
python3 {baseDir}/scripts/anthropic.py stream 写一个关于机器人的短篇故事 --model claude-sonnet-4-20250514
batch-create
创建批量请求。
bash
python3 {baseDir}/scripts/anthropic.py batch-create requests.jsonl
batch-list
列出批量任务。
bash
python3 {baseDir}/scripts/anthropic.py batch-list
batch-get
获取批量状态。
bash
python3 {baseDir}/scripts/anthropic.py batch-get batch_abc123
batch-results
获取批量结果。
bash
python3 {baseDir}/scripts/anthropic.py batch-results batch_abc123
count-tokens
统计消息中的令牌数。
bash
python3 {baseDir}/scripts/anthropic.py count-tokens 这条消息有多少个令牌?
models
列出可用模型。
bash
python3 {baseDir}/scripts/anthropic.py models
tools
使用工具进行对话。
bash
python3 {baseDir}/scripts/anthropic.py tools --tools [{name:get
weather,description:获取天气,inputschema:{type:object,properties:{location:{type:string}}}}] 纽约的天气如何?
thinking
扩展思考模式。
bash
python3 {baseDir}/scripts/anthropic.py thinking 逐步解答这道数学题:123 * 456 等于多少? --budget 10000
输出格式
所有命令默认输出 JSON 格式。添加 --human 参数可获取可读性强的格式化输出。
bash
JSON(默认,适用于程序化使用)
python3 {baseDir}/scripts/anthropic.py chat --limit 5
人类可读格式
python3 {baseDir}/scripts/anthropic.py chat --limit 5 --human
脚本参考
| 脚本 | 描述 |
|---|
| {baseDir}/scripts/anthropic.py | 主 CLI — 所有 Anthropic 操作 |
数据政策
本技能绝不本地存储数据。所有请求直接发送至 Anthropic API,结果返回至标准输出。您的数据保留在 Anthropic 服务器上。
致谢
由
M. Abidi 构建 |
agxntsix.ai
YouTube |
GitHub
属于 OpenClaw 代理的
AgxntSix 技能套件 的一部分。
📅 需要为您的企业设置 OpenClaw 吗? 预约免费咨询