Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsBlogPro
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges
  • Chrome Extension
  • Skill Manager

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Anthropic Api

ASecurity

Anthropic Messages API reference. Use for POST /v1/messages, tool_use/tool_result, count_tokens, batches, streaming, prompt caching (TTL, breakpoints), anthropic-beta headers, admin API (API keys, workspaces), compliance (residency, audit logs), model IDs/deprecations/context windows. Skip: Claude Code (use claude-code), Agent SDK (use claude-agent-sdk), Agent Skills/tool guides (use anthropic-platform-features), MCP connectors (use claude-connectors), per-language SDK types (use your IDE).

17 stars
0 votes
0 copies
0 views
Added 9/30/2026
developmenttypescriptpythongojavarubyphpbashterraformgitapi

Works with

claude codecliapimcp

Security Analysis

A100/100

Pro scans all 20 files and shows the line behind each finding

Scanned 9/30/2026

$npx -y skills add xiaolai/anthropic-docs --skill anthropic-api --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Anthropic Api?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Anthropic Api
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/xiaolai-anthropic-api/badge)](https://www.skillsdirectory.com/skills/xiaolai-anthropic-api)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
Files
SKILL.md
---
name: anthropic-api
description: |
  Anthropic Messages API reference. Use for POST /v1/messages,
  tool_use/tool_result, count_tokens, batches, streaming, prompt caching
  (TTL, breakpoints), anthropic-beta headers, admin API (API keys,
  workspaces), compliance (residency, audit logs), model
  IDs/deprecations/context windows. Skip: Claude Code (use claude-code),
  Agent SDK (use claude-agent-sdk), Agent Skills/tool guides (use
  anthropic-platform-features), MCP connectors (use claude-connectors),
  per-language SDK types (use your IDE).
user-invocable: true
---

# Anthropic API Reference — Router

| Field | Value |
|---|---|
| **API base** | `https://api.anthropic.com/v1/` |
| **Source docs** | [platform.claude.com/docs/en/api](https://platform.claude.com/docs/en/api) |
| **TypeScript SDK** | [`@anthropic-ai/sdk`](https://www.npmjs.com/package/@anthropic-ai/sdk) |
| **Python SDK** | [`anthropic`](https://pypi.org/project/anthropic/) |

> **This skill is auto-updated daily.** A pipeline reads the upstream
> docs and rewrites the per-surface files below. Section structure is
> stable; content drifts to track upstream.

## When to use

Router skill for the Anthropic Messages API and adjacent surfaces
(admin endpoints, compliance, beta features, models catalog) hosted
under platform.claude.com/docs/en/api/.

Use when the user asks about: POST /v1/messages, tool_use / tool_result
blocks, count_tokens, message batches, streaming responses, prompt
caching, prompt cache TTL / breakpoints, system prompts, anthropic-beta
headers, the admin API (organizations / workspaces / API keys /
invites), compliance endpoints (data residency, audit logs, retention),
beta-only features behind a beta header, or the models catalog
(model IDs, deprecation dates, context window sizes).

Skip: questions about Claude Code (use claude-code skill), the
Claude Agent SDK (use claude-agent-sdk), platform features beyond
the raw API such as Agent Skills format or tool-use guides (use
anthropic-platform-features), MCP connector docs (claude-connectors),
or per-language auto-generated SDK reference (use anthropic-sdk's
TypeScript / Python types directly via your IDE).

## Dispatch table

| Surface file | Read when the user asks about… |
|---|---|
| [`SKILL-messages.md`](SKILL-messages.md) | `POST /v1/messages`, request/response shape, `tool_use` / `tool_result` content blocks, streaming (`stream: true`), system prompts, `count_tokens`, message batches; also legacy `/v1/complete` (text completions) |
| [`SKILL-admin.md`](SKILL-admin.md) | admin API — organizations, workspaces, API keys, invites, usage reports, cost reports |
| [`SKILL-compliance.md`](SKILL-compliance.md) | data residency, audit logs, retention policies, compliance API endpoints |
| [`SKILL-beta.md`](SKILL-beta.md) | features gated behind `anthropic-beta` header, beta endpoints, opt-in feature flags |
| [`SKILL-models.md`](SKILL-models.md) | model IDs (`claude-opus-4-7`, `claude-sonnet-4-6`, `claude-haiku-4-5-20251001`, …), context window sizes, deprecation dates, model card / capabilities |

> **Out of scope for this skill** (intentionally excluded by `docsPathFilter`):
> the auto-generated per-language SDK reference under
> `platform.claude.com/docs/en/api/{cli,csharp,go,java,php,python,ruby,terraform,typescript}/`
> (~1100 pages). Use your IDE's type-defs from `@anthropic-ai/sdk`
> (npm) or `anthropic` (PyPI) for those — they ship the authoritative
> signatures and stay in sync with the SDK release you're using.

## Auto-correction rules

| Rule file | Triggers on edits to |
|---|---|
| `rules/messages-api.md` | code calling `client.messages.create`, `POST /v1/messages`, or constructing `tool_use` / `tool_result` content blocks |

## Examples

<example>
Context: A developer is adding prompt caching to their Messages API calls.
user: "Where do I put cache_control breakpoints, and how long does the cache live?"
assistant: Uses anthropic-api and reads SKILL-messages.md for cache_control breakpoint placement and TTL options.
</example>

<example>
Context: A developer asks about a Claude Code setting.
user: "How do I stop Claude Code from asking permission for every Bash command?"
assistant: Routes to claude-code instead; permission modes are CLI configuration, not the Messages API.
</example>

---

*This skill is auto-updated daily by a maintainer-run pipeline. File
issues at [xiaolai/anthropic-docs](https://github.com/xiaolai/anthropic-docs) —
SKILL fixes flow through the next research run, not via PRs.*

Attribution

xiaolaixiaolai
View sourceSee grades on GitHubMore from xiaolai →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Clean Code

Pragmatic coding standards - concise, direct, no over-engineering, no unnecessary comments

304955 votes

Browser Extension Developer

Use this skill when developing or maintaining browser extension code in the `browser/` directory, including Chrome/Firefox/Edge compatibility, content scripts, background scripts, or i18n updates.

286712 votes

Seo Optimizer

SEO optimization with keyword analysis, readability assessment, technical validation, content quality. Use for search rankings, blog posts, content audits, or encountering keyword density, readability scores, meta tags, schema markup errors.

2222 votes

Google Official Seo Guide

Official Google SEO guide covering search optimization, best practices, Search Console, crawling, indexing, and improving website search visibility based on official Google documentation

1862 votes

Writing Plans

Use when you have a spec or requirements for a multi-step task, before touching code

2927051 votes
View all in development →