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 guanyang

Reference skill for building applications with the Claude API and Anthropic SDK. It covers model ids, pricing, streaming, tool use, MCP, caching and model migration. Aimed at developers who write or maintain Claude API code.

  • Score 93
  • 1k stars
  • MIT
  • 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/guanyang/open-agent-hub /tmp/open-agent-hub && mkdir -p ~/.claude/skills && cp -r /tmp/open-agent-hub/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

The claude-api skill is a reference for building LLM-powered applications with Claude. Its description covers model ids, pricing, parameters, streaming, tool use, MCP, agents, caching, token counting and model migration. It tells the assistant to choose the right Claude surface, detect the project language, and read the language-specific documentation before writing code.

Code written with this skill must call Claude through the official Anthropic SDK for the project's language. Raw HTTP is used only when the user asks for it, the project is a shell or cURL project, or no SDK exists. The skill sets defaults of claude-opus-5-5 with adaptive thinking and streaming for long requests. It also provides subcommands such as migrate, prompt-audit, upgrade, api-version and cost-optimize. It is aimed at developers who write or maintain Claude API code.

Written from the project's SKILL.md and checked against it.

What it can do

  • migrateMigrates existing Claude API code to a newer model, starting by confirming the files in scope.
  • prompt-auditAudits prompts, tool descriptions and agent configuration files for outdated patterns.
  • upgradeUpgrades the project's Anthropic SDK dependency across a major version.
  • api-versionMoves code to a newer Anthropic API version using the anthropic-version header.
  • cost-optimizeReduces what existing Claude API code costs to run without sacrificing output quality.

What you need

  • Anthropic SDK for the project's language, or raw HTTP where no SDK exists

Try asking

  • Migrate my project's Claude API code to claude-opus-5-5
  • Audit my prompts and CLAUDE.md files for outdated patterns
  • Reduce what my Claude API code costs to run without losing quality

Good to know

  • Stops and asks before editing a file that uses another provider's SDK, such as OpenAI.
  • Does not edit non-Anthropic files with Anthropic SDK calls.
  • Function names and import paths must come from documentation, so code may need fetching from the SDK repositories.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: skills/claude-api/SKILL.md, skills/claude-api/shared/evals/report/build-report-lite.mjs, skills/claude-api/shared/evals/report/runner-scaffold.mjs, skills/claude-api/shared/latency-optimization/latency_probe.py, 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

  • LICENSE.txt11 KB
  • SKILL.md112 KB
  • csharp/claude-api.md15 KB
  • csharp/claude-api/README.md19 KB
  • csharp/claude-api/batches.md1 KB
Show all 129 files
  • csharp/claude-api/content-and-headers.md7 KB
  • csharp/claude-api/files-api.md3 KB
  • csharp/claude-api/opentelemetry.md2 KB
  • csharp/claude-api/streaming.md784 B
  • csharp/claude-api/tool-use.md17 KB
  • curl/examples.md10 KB
  • curl/managed-agents.md11 KB
  • go/claude-api.md14 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.md19 KB
  • go/managed-agents/README.md20 KB
  • java/claude-api.md15 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.md18 KB
  • java/managed-agents/README.md19 KB
  • php/claude-api.md12 KB
  • php/claude-api/README.md7 KB

And 99 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

Does claude-api work with OpenAI or other providers?

No. The skill produces Claude and Anthropic SDK code and stops when it finds non-Anthropic provider markers in the target file.

Which Claude model does the skill use by default?

Unless the user requests otherwise, the skill defaults to Claude Opus 5.5 with the model string claude-opus-5-5.

Does it use the raw HTTP API or the official SDK?

It uses the official Anthropic SDK for the project's language by default. Raw HTTP is used only when requested, for shell or cURL projects, or when the language has no SDK.

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 MIT licence. The service it connects to may have its own pricing.

Is claude-api safe to use?

It scores 93 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.