claude-agent-sdk
Anthropic Claude Agent SDK for autonomous agents and multi-step workflows. Use for subagents, tool orchestration, MCP servers, or encountering CLI not found, context length exceeded errors.
npx skills add majiayu000/claude-skill-registry --skill claude-agent-sdk-secondsky-claude-skills-2 --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Claude Agent SDK **Status**: Production Ready **Last Updated**: 2025-11-21 **Dependencies**: @anthropic-ai/claude-code, zod **Latest Versions**: @anthropic-ai/claude-code@2.0.49+, zod@3.23.0+ --- ## Quick Start (5 Minutes) ### 1. Install SDK ```bash bun add @anthropic-ai/claude-agent-sdk zod ``` **Why these packages:** - `@anthropic-ai/claude-agent-sdk` - Main Agent SDK - `zod` - Type-safe schema validation for tools ### 2. Set API Key ```bash export ANTHROPIC_API_KEY="sk-ant-..." ``` **CRITICAL:** - API key required for all agent operations - Never commit API keys to version control - Use environment variables ### 3. Basic Query ```typescript import { query } from "@anthropic-ai/claude-agent-sdk"; const response = query({ prompt: "Analyze the codebase and suggest improvements", options: { model: "claude-sonnet-4-5", workingDirectory: process.cwd(), allowedTools: ["Read", "Grep", "Glob"] } }); for await (const message of response) { if (message.type === 'assistant') { console.log(message.content); } } ``` --- ## Secure Installation Agent SDK packages provide system-level capabilities — verify before installing to prevent unauthorized agent access. Follow supply chain security bes
- Quick Start (5 Minutes)
- 1. Install SDK
- 2. Set API Key
- 3. Basic Query
- Secure Installation
- The Complete Claude Agent SDK Reference
- Table of Contents
- When to Load References
- Core Query API
- Basic Usage
- Model Selection
- Tool Integration (Built-in + Custom)
- Allowing/Disallowing Tools
- MCP Servers (Model Context Protocol)
bun add @anthropic-ai/claude-agent-sdk zod export ANTHROPIC_API_KEY="sk-ant-..."
What does the claude-agent-sdk skill do?
Anthropic Claude Agent SDK for autonomous agents and multi-step workflows. Use for subagents, tool orchestration, MCP servers, or encountering CLI not found, context length exceeded errors.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill claude-agent-sdk-secondsky-claude-skills-2 --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
