claude-api
Skill by asgeirtj
Reference skill for building apps with the Claude API and Anthropic SDK. It covers models, streaming, tool use, MCP, caching and migration, plus audit and upgrade subcommands for developers.
Install claude-api
Built from the published package, never by AI.
git clone --depth 1 https://github.com/asgeirtj/system_prompts_leaks /tmp/system_prompts_leaks && mkdir -p ~/.claude/skills && cp -r /tmp/system_prompts_leaks/Anthropic/claude-code/skills/claude-api ~/.claude/skills/claude-apiRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/asgeirtj/system_prompts_leaks /tmp/system_prompts_leaks && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/system_prompts_leaks/Anthropic/claude-code/skills/claude-api ~/.gemini/antigravity-cli/skills/claude-apiAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
Claude API is an agent skill that gives an AI assistant reference material for the Claude API and the Anthropic SDK. The source covers model ids, pricing, parameters, streaming, tool use, MCP, agents, caching, token counting and model migration. It tells the assistant to read the skill before answering questions about Claude or Anthropic models, and to write Claude code with the official Anthropic SDK for the project's language.
The skill also provides the subcommands migrate, prompt-audit, harness-audit and upgrade. These cover migrating code to a newer model, auditing prompts and agent configuration, auditing agent harnesses, and upgrading the SDK dependency. It is aimed at developers building LLM-powered applications with Claude. It stops when the project works with another provider such as OpenAI or Gemini.
Written from the project's SKILL.md and checked against it.
What it can do
- Model migrationMigrates existing Claude API code to a newer model, starting with a scope check.
- Prompt auditFinds dated prompts, tool descriptions and agent config files written for older models.
- Harness auditAudits agent loop limits, tool results, context management and request settings.
- SDK upgradeUpgrades the Anthropic SDK dependency across a major version.
- Streaming and tool useCovers streaming requests and client tool use, including eager input streaming.
- API drift checksCompares common Claude API patterns with current documentation before writing code.
- Credential setupDescribes browser sign-in with ant auth login or an API key.
What you need
- Anthropic SDK for the project's language
- Claude Console account or Anthropic API key
- ant CLI, if browser sign-in is used
Try asking
- Migrate my Python Claude code to the latest model
- Audit my prompts and agent config for outdated patterns
- Add streaming and tool use to my Anthropic SDK app
Good to know
- Skips projects that work with another provider such as OpenAI or Gemini.
- Does not write OpenAI-compatible shims.
- If live documentation fetches fail, code is written from the skill's bundled patterns.
- Calls for Ruby, Java, Go, PHP and C# SDKs must be checked against documentation rather than guessed.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: Anthropic/claude-code/skills/claude-api/SKILL.md, Anthropic/claude-code/skills/claude-api/shared/evals/report/build-report-lite.mjs, Anthropic/claude-code/skills/claude-api/shared/evals/report/runner-scaffold.mjs, Anthropic/claude-code/skills/claude-api/shared/latency-optimization/latency_probe.py, Anthropic/claude-code/skills/claude-api/shared/preserved-thinking-migration/drop_block_probe.py. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md114 KB -
csharp/claude-api/README.md19 KB -
csharp/claude-api/batches.md1 KB -
csharp/claude-api/content-and-headers.md7 KB -
csharp/claude-api/files-api.md3 KB
Show all 119 files
-
csharp/claude-api/opentelemetry.md2 KB -
csharp/claude-api/streaming.md784 B -
csharp/claude-api/tool-use.md16 KB -
curl/examples.md10 KB -
curl/managed-agents.md11 KB -
go/claude-api/README.md10 KB -
go/claude-api/batches.md4 KB -
go/claude-api/files-api.md2 KB -
go/claude-api/opentelemetry.md2 KB -
go/claude-api/streaming.md1 KB -
go/claude-api/tool-use.md17 KB -
go/managed-agents/README.md20 KB -
java/claude-api/README.md14 KB -
java/claude-api/batches.md3 KB -
java/claude-api/files-api.md2 KB -
java/claude-api/opentelemetry.md3 KB -
java/claude-api/streaming.md655 B -
java/claude-api/tool-use.md17 KB -
java/managed-agents/README.md19 KB -
php/claude-api/README.md7 KB -
php/claude-api/batches.md1 KB -
php/claude-api/client-options.md3 KB -
php/claude-api/files-api.md2 KB -
php/claude-api/opentelemetry.md3 KB -
php/claude-api/streaming.md2 KB
And 89 more files on GitHub.
Alternatives to claude-api
All alternatives →Aligns a Qwen Code feature with a Codex or Claude Code reference agent. It runs both under the same scenario, captures HTTP and terminal traces, and compares them until behavior matches.
Searches, views, creates, updates, and deletes the user's Google Contacts from an AI assistant. It is for people who want to manage their address book through conversation. A one-time Google connect is required before it returns data.
Guides an AI assistant on error handling choices. It covers when to use Result, Option, ? propagation, unwrap, expect and panic, plus anyhow and thiserror.
Caveman is an agent skill that makes an AI assistant reply in a terse style. It cuts filler and keeps technical facts, code, commands and errors exact. It is built for users who want shorter, cheaper replies.
docs-sync audits or updates English SDK documentation against the requested implementation scope. It is for maintainers who want docs to match main branch features, configuration options, and defaults.
Guides an AI assistant through setting up and running monorepos with pnpm workspaces, Turborepo and Nx. Aimed at developers who need faster builds, shared code and managed dependencies across multiple packages.
Compare with agent-reproduce-align, google_contacts or m06-error-handling
claude-api: common questions
What does the Claude API skill cover?
The source says it covers model ids, pricing, parameters, streaming, tool use, MCP, agents, caching, token counting and model migration.
Can it work on an OpenAI or Gemini project?
No. The source says it is skipped when another provider such as OpenAI, Gemini, Llama, Mistral, Cohere or Ollama is being worked on.
How does the skill handle authentication?
By default it suggests browser sign-in with ant auth login, with an API key as the second option. The source says an existing working key or sign-in is kept.
How do I install claude-api?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is claude-api free?
The code is published under the CC0-1.0 licence. The service it connects to may have its own pricing.
Is claude-api safe to use?
It scores 92 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to claude-api?
Similar skills: agent-reproduce-align, google_contacts, m06-error-handling, caveman.
