Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

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.

  • Score 92
  • 73k stars
  • CC0-1.0
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

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-api

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install claude-api in Claude Code

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

A

No 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 →

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.

claude-api Install

Add to stack

Loading.