Skip to content
Back to skills

Summaries

ASecurity

The top-level `claude-api` skill — a routing/orchestration document for building Claude API / Anthropic SDK applications. Triggers when code imports `anthropic`/`@anthropic-ai/sdk`, user asks for the Claude API or Managed Agents, or modifies Claude features (caching, thinking, compaction, tool use, batch, files, citations, memory) or models. SKIPS when file imports OpenAI/other-provider SDKs. **Default model**: ALWAYS `claude-opus-4-7` unless user names another. Use exact model ID strings (no...

  • 8 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added November 30, 2026
ai-agentstypescriptpythonrustgojavarubyphpswiftc++git

Works with

  • api

Security analysis

A100/100

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

Scanned November 30, 2026

npx -y skills add NickCollect/ai-coding-runbook --skill Summaries --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Summaries?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Summaries
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/nickcollect-summaries-5cdd81ce/badge)](https://www.skillsdirectory.com/skills/nickcollect-summaries-5cdd81ce)

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

Download with Pro
SKILL.md
---
type: summary
source: 01_Raw/github/anthropics/skills/skills/claude-api/SKILL.md
title: "anthropics/skills: claude-api SKILL.md"
summarized_at: 2026-05-05
entities_referenced: [Skill]
concepts_referenced: [Tool-use, Extended-thinking, Prompt-caching, Context-window]
---

The top-level `claude-api` skill — a routing/orchestration document for building Claude API / Anthropic SDK applications. Triggers when code imports `anthropic`/`@anthropic-ai/sdk`, user asks for the Claude API or Managed Agents, or modifies Claude features (caching, thinking, compaction, tool use, batch, files, citations, memory) or models. SKIPS when file imports OpenAI/other-provider SDKs.

**Default model**: ALWAYS `claude-opus-4-7` unless user names another. Use exact model ID strings (no date suffixes).

**Defaults for Claude API output**:
- Model: `claude-opus-4-7`
- Thinking: `{type: "adaptive"}` for anything remotely complicated
- Streaming: default for long input/output/high `max_tokens` (use `.get_final_message()` / `.finalMessage()` helper)

**Output requirement**: official Anthropic SDK for the project's language; raw HTTP only when explicitly requested or no SDK exists. Never mix SDK + raw HTTP in same project. Never use OpenAI-compatible shims. Never guess SDK usage — get bindings from `{lang}/` files or WebFetch official repos from `shared/live-sources.md`.

**Language detection** (file-based): py → `python/`, ts/tsx → `typescript/`, js/jsx → `typescript/` (same SDK), java/kt/scala → `java/`, go → `go/`, rb → `ruby/`, cs → `csharp/`, php → `php/`. Multiple → ask. Unsupported (Rust/Swift/C++/Elixir) → cURL or reference Python.

**Surface decision tree** (start simple):
- Single LLM call (classification/summarization) → Claude API.
- Workflow with code-controlled logic → Claude API + tool use.
- Custom agent + your tools, you host compute → Claude API agentic loop.
- Server-managed stateful agent with workspace → Managed Agents (NOT on Bedrock/Vertex/Foundry — use Claude API + tool use there).

**Current models cached 2026-04-15**:
| Model | ID | Context | Input/Output $/MTok |
|---|---|---|---|
| Opus 4.7 | `claude-opus-4-7` | 1M | $5/$25 |
| Opus 4.6 | `claude-opus-4-6` | 1M | $5/$25 |
| Sonnet 4.6 | `claude-sonnet-4-6` | 1M | $3/$15 |
| Haiku 4.5 | `claude-haiku-4-5` | 200K | $1/$5 |

**Thinking & effort**:
- **Opus 4.7**: adaptive ONLY (`thinking: {type: "adaptive"}`). `budget_tokens` returns 400. Sampling params (`temperature`, `top_p`, `top_k`) also removed. New `xhigh` effort level (between high and max) is the recommended default.
- **Opus 4.6 / Sonnet 4.6**: adaptive recommended; `budget_tokens` deprecated (transitional escape hatch on 4.6 only, NOT 4.7).
- **Effort GA**: `output_config: {effort: "low"|"medium"|"high"|"xhigh"|"max"}`. `max` Opus-tier only. Default `high`.
- **Opus 4.7 thinking content omitted by default** — opt in with `thinking: {type: "adaptive", display: "summarized"}`.
- **Task Budgets (beta, 4.7)**: `output_config: {task_budget: {type: "tokens", total: N}}` — agent self-moderates, sees countdown. Min 20,000 tokens. Beta header `task-budgets-2026-03-13`.

**Compaction (beta, 4.7/4.6/Sonnet 4.6)**: server-side summarization at default 150K threshold. Beta `compact-2026-01-12`. **Append `response.content` (not just text) back — compaction blocks must be preserved**.

**Prompt caching**: prefix match — any byte change invalidates downstream. Render order: tools → system → messages. Stable content first; volatile after last `cache_control` breakpoint. Max 4 breakpoints. Min cacheable prefix model-dependent (Opus 4096 tokens, Sonnet 4.6/Haiku 4.5 2048, etc.). Verify via `usage.cache_read_input_tokens`.

**Managed Agents (beta)**: third surface. Mandatory flow: Agent (`POST /v1/agents` once → store ID) → Session (`POST /v1/sessions` per run, references agent by ID/version). `model`/`system`/`tools` live on agent NEVER session. **First-party only** (not Bedrock/Vertex/Foundry). Beta header `managed-agents-2026-04-01` (SDK auto). Skills + Files APIs need their own betas. Use `/claude-api managed-agents-onboard` subcommand for guided setup.

**Common pitfalls**: don't truncate inputs; assistant message prefills removed on 4.6/4.7 family (use structured outputs); don't lowball `max_tokens` (16K non-streaming, 64K streaming default); 128K output requires streaming; tool input JSON may have varied escaping (use `json.loads`); use `output_config: {format: ...}` not deprecated `output_format`; don't reimplement SDK helpers; don't redefine SDK types; for migration, ask scope first if not named.

Files in this skill

  • 100k-context-windows--anthropic-news.md1.2 KB
  • 2026-w13.md2.5 KB
  • 2026-w14.md2.5 KB
  • 2026-w15.md2.5 KB
  • 2026-w16.md3.3 KB
  • 2026-w17.md2.9 KB
  • 3-5-models-and-computer-use--anthropic-news.md1.8 KB
  • 3p-updates--internal-comms.md1.6 KB
  • 81k-economics--anthropic-research.md2.3 KB
  • AGENTS--codex-openai.md1.8 KB
  • AGENTS--mcp-py-sdk.md3.1 KB
  • AGENTS--mcp-spec.md860 B
  • AI-assistance-coding-skills--anthropic-research.md1.3 KB
  • AI-fluency-index--anthropic-research.md1.2 KB
  • AI-resistant-technical-evaluations--anthropic-eng.md2.5 KB
  • ANTITRUST--mcp-spec.md569 B
  • AmazonBedrock-CONTRIBUTING--prompt-eng-tutorial.md1.3 KB
  • AmazonBedrock-README--prompt-eng-tutorial.md1.8 KB
  • CHANGELOG--agent-sdk-py-repo.md3.2 KB
  • CHANGELOG--anthropic-sdk-py.md1.7 KB

Attribution

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

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.