Main Site ↗

anthropic-sdk

by bobmatnyc282GitHub

Official Anthropic SDK for Claude AI with chat, streaming, function calling, and vision capabilities

Unlock Deep Analysis

Use AI to visualize the workflow and generate a realistic output preview for this skill.

Powered by Fastest LLM

Development
Compatible Agents
Claude Code
Claude Code
~/.claude/skills/
Codex CLI
Codex CLI
~/.codex/skills/
Gemini CLI
Gemini CLI
~/.gemini/skills/
O
OpenCode
~/.opencode/skills/
O
OpenClaw
~/.openclaw/skills/
GitHub Copilot
GitHub Copilot
~/.copilot/skills/
Cursor
Cursor
~/.cursor/skills/
W
Windsurf
~/.codeium/windsurf/skills/
C
Cline
~/.cline/skills/
R
Roo Code
~/.roo/skills/
K
Kiro
~/.kiro/skills/
J
Junie
~/.junie/skills/
A
Augment Code
~/.augment/skills/
W
Warp
~/.warp/skills/
G
Goose
~/.config/goose/skills/
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

VariableRequiredDescription
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-20250514

Commands

chat

Send a message to Claude.

python3 {baseDir}/scripts/anthropic.py chat "What is the meaning of life?" --model claude-sonnet-4-20250514

chat-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-20250514

batch-create

Create a batch request.

python3 {baseDir}/scripts/anthropic.py batch-create requests.jsonl

batch-list

List batch jobs.

python3 {baseDir}/scripts/anthropic.py batch-list

batch-get

Get batch status.

python3 {baseDir}/scripts/anthropic.py batch-get batch_abc123

batch-results

Get batch results.

python3 {baseDir}/scripts/anthropic.py batch-results batch_abc123

count-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 models

tools

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 10000

Output 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 --human

Script Reference

ScriptDescription
{baseDir}/scripts/anthropic.pyMain 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

Source: https://github.com/bobmatnyc/claude-mpm-skills#toolchains-ai-sdks-anthropic

Content curated from original sources, copyright belongs to authors

Grade B
-AI Score
Best Practices
Checking...
Try this Skill

User Rating

USER RATING

0UP
0DOWN
Loading files...

WORKS WITH

Claude Code
Claude
Codex CLI
Codex
Gemini CLI
Gemini
O
OpenCode
O
OpenClaw
GitHub Copilot
Copilot
Cursor
Cursor
W
Windsurf
C
Cline
R
Roo
K
Kiro
J
Junie
A
Augment
W
Warp
G
Goose