Skills Explorer Add Skills

claude-api

An agent skill by anthropics, from anthropics/skills. Tags: anthropic, api, debugging, developer-tools, mcp.

What it does

Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER — read BEFORE opening the target file; don't skip because it "looks like a one-liner" — whenever: the prompt names Claude/Anthropic in any form (Claude, Anthropic, Fable, Opus, Sonnet, Haiku, `anthropic`, `@anthropic-ai`, `claude-*`, `us.anthropic.*`, `[1m]`); the user asks about an LLM (pricing/model choice/limits/caching) — never answer from memory; OR the task is LLM-shaped with provider unstated (agent/MCP/tool-definition/multi-agent/RAG/LLM-judge/computer-use; generate/summarize/extract/classify/rewrite/converse over NL; debugging refusals/cutoffs/streaming/tool-calls/tokens). SKIP only when another provider is being worked on (overrides all triggers): OpenAI/GPT/Gemini/Llama/Mistral/Cohere/Ollama named in the query; OR `grep -rE 'openai|langchain_openai|google.generativeai|genai|mistralai|cohere|ollama'` over the project hits (run this grep FIRST if no provider named — don't Read the file).

Install

With the skills CLI, which installs into Claude Code, Codex, Cursor and other agents:

npx skills add anthropics/skills --skill claude-api

Or copy the skill folder into Claude Code's skills directory by hand (~/.claude/skills for every project, or .claude/skills inside one):

git clone --depth 1 https://github.com/anthropics/skills
cp -r skills/skills/claude-api ~/.claude/skills/claude-api

Safety box score

Grade D, elevated risk: 58 of 100 risk points, rated 2026-10-15. The grade rates what the skill and its scripts can reach on the machine of whoever installs it, across eight categories from shell execution to secrets access. How the score works.

This is a documentation-heavy Claude API skill: it mainly teaches how to call Anthropic APIs, manage auth, use Managed Agents, and follow live docs. The main risks are credential access, network fetching of remote docs/config, local environment changes from install/auth commands, and bundled quickstarts that can post, schedule, or open tickets in external systems; several files/scripts were not read, so the audit is incomplete.

Category levels, from 0 (none) to 3 (high)
CategoryLevelWhy
Code & shell execution1 (low)It includes runnable shell/package examples like `pip install -U "anthropic[aws]"`, `npm install @anthropic-ai/aws-sdk`, `gem install anthropic`, and `ant auth ...`, but no bundled executable payload or destructive script.
Network access2 (moderate)The skill explicitly relies on remote retrieval and APIs (`WebFetch the relevant SDK repo`, `shared/live-sources.md`, MCP URLs such as `https://mcp.notion.com/mcp`), so it can send data off-box and ingest remote content.
Filesystem reach2 (moderate)It directs changes to local state such as `ant auth login` storing a profile under `~/.config/anthropic/`, and its examples write generated artifacts to paths like `/mnt/session/outputs/`.
Secrets & credentials2 (moderate)The auth flow touches credential stores and tokens (`ANTHROPIC_API_KEY`, `ANTHROPIC_AUTH_TOKEN`, `ant auth status`, `ant auth print-credentials --access-token`), so it can read or expose existing secrets on the machine.
Privilege & persistence1 (low)It recommends package installs and auth/profile setup, which mutate the user environment, but it does not require sudo, services, or other elevated OS changes.
Instruction hijack surface2 (moderate)The repo is full of model-facing imperative text and prompt-shaped instructions like `Do not summarize the guide - execute it` and agent/system-prompt blocks in the quickstarts, which can steer a downstream agent very strongly if copied into prompts.
Irreversible actions2 (moderate)Bundled Managed Agents templates can take external actions such as `Open a Linear incident ticket`, `Post ... to the incident Slack channel`, and scheduled cron deployments, which is inherent to those quickstarts but broadens blast radius.
Transparency2 (moderate)Some shipped files were not readable in the supplied inventory, including `LICENSE.txt`, `shared/live-sources.md`, multiple README/tool-use docs, and 2 JS/TS plus 2 Python scripts, so not all behavior was auditable.

Before installing

Rated 2026-10-15 by an automated review of 35 files from the skill's repository.

Source

Repository
anthropics/skills (all skills from this repository)
Path
skills/claude-api/SKILL.md
Branch
main
Updated
2026-09-19