skills/claude-agent-sdk/SKILL.md
Build AI agents programmatically with the Claude Agent SDK (Python and TypeScript). Provides the same tools, agent loop, and context management that power Claude Code, but as a library. MANDATORY TRIGGERS: claude-agent-sdk, claude agent sdk, claude_agent_sdk, @anthropic-ai/claude-agent-sdk, ClaudeAgentOptions, ClaudeSDKClient. Also trigger when user wants to build AI agents with Claude programmatically, create agent loops with tools, use Claude Code SDK, orchestrate subagents, or deploy autonomous coding agents. When in doubt about whether to use this skill for agent SDK tasks, use it.
npx skillsauth add abhisheksharma-17/skills-graph claude-agent-sdkInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Build and deploy AI agents with the same tools, agent loop, and context management that power Claude Code.
Source: platform.claude.com/docs | Python: claude-agent-sdk v0.1.51 | TypeScript: @anthropic-ai/claude-agent-sdk v0.2.86
| Reference | File | Read When |
|-----------|------|-----------|
| Overview & Quickstart | references/00-overview.md | Getting started, installation, architecture, authentication, first agent |
| Configuration | references/01-configuration.md | ClaudeAgentOptions, model selection, effort, thinking, environment variables |
| Built-in Tools | references/02-built-in-tools.md | All 17+ built-in tools with params, when-to-use, Claude call JSON examples, cost/perf, decision tree, common patterns |
| Custom Tools | references/03-custom-tools.md | @tool decorator, tool() function, naming convention (mcp__server__name), input schemas, return types, annotations, complete end-to-end example |
| MCP Integration | references/04-mcp-integration.md | MCP servers, stdio/HTTP/SSE/SDK transports, .mcp.json, tool naming |
| Hooks | references/05-hooks.md | PreToolUse, PostToolUse, hook matchers, callbacks, async hooks |
| Permissions | references/06-permissions.md | Permission modes, canUseTool, evaluation order, security |
| Sessions | references/07-sessions.md | Multi-turn, ClaudeSDKClient, resume, fork, session management |
| Subagents | references/08-subagents.md | AgentDefinition, spawning, model selection, tool scoping, limitations |
| Structured Outputs | references/09-structured-outputs.md | output_format, JSON Schema, Pydantic, Zod, validation |
| Deployment | references/10-deployment.md | System requirements, deployment patterns, sandboxes, cost, security |
| Streaming | references/11-streaming.md | StreamEvent, partial messages, streaming vs single mode, building UIs |
| User Input | references/12-user-input.md | AskUserQuestion, approval flows, canUseTool, option previews |
| Agent Loop & Errors | references/13-agent-loop.md | Turns, compaction, stop reasons, error types, rate limits, cost tracking |
| System Prompts & Features | references/14-system-prompts-features.md | CLAUDE.md, skills, plugins, slash commands, output styles |
| Secure Deployment | references/15-secure-deployment.md | Docker hardening, credential management, proxies, isolation |
| query() & Messages | references/16-query-and-messages.md | query() function signature, AssistantMessage/ResultMessage dataclass fields, TextBlock/ToolUseBlock/ThinkingBlock, all message types, 7 patterns, permission priority, minimum viable options |
| ClaudeSDKClient | references/17-client.md | Stateful multi-turn client, constructor, lifecycle, all 14 methods with params/examples/when-to-use, ClaudeSDKClient-only features, 8 patterns, typical usage flow, minimum viable client |
| ClaudeAgentOptions | references/18-claude-agent-options.md | All 38 parameters with type/default/when-to-use/when-not-to-use/example, provider env vars, permission mode table, TypeScript name mapping, TypeScript-only params, decision matrix for 7 use cases |
| Transport | references/19-transport.md | Communication pipe architecture, SubprocessCLITransport internals, Transport ABC (6 methods), JSON-Lines wire protocol, when to use custom transport, 5 use cases (Mock/WebSocket/SSH/HTTP/MessageQueue), step-by-step build guide |
| Middleware & Proxy | references/20-middleware.md | 3-layer model (Transport/Hooks/can_use_tool), decision matrix, 9 use cases with full code (audit logging, security filtering, cost tracking, metrics, input transformation, rate limiting, caching, auth/multi-tenancy, token counting), composition patterns, hooks return cheat sheet, all 10 hook events table, can_use_tool unique powers |
# Python
pip install
uv add claude-agent-sdk
# TypeScript
npm install @anthropic-ai/claude-agent-sdk
tools
Open-source AI-native vector database for semantic search, hybrid search, RAG, and agent-driven workflows with multi-tenancy and model provider integrations. MANDATORY TRIGGERS: weaviate, Weaviate, weaviate-client, near_text, near_vector, hybrid search vector database, WeaviateClient, weaviate.connect, collections.create, query.near_text, query.hybrid, query.bm25. Also trigger when user wants to build semantic search, store vector embeddings, implement RAG pipelines, combine keyword and vector search, set up multi-tenant vector storage, use named vectors, or integrate vector DB with LLM providers. When in doubt about whether to use this skill for vector database or semantic search tasks, use it.
tools
End-to-end testing and browser automation framework by Microsoft — locators, assertions, fixtures, network mocking, visual testing, tracing, codegen, API testing, and CI/CD integration. MANDATORY TRIGGERS: playwright, Playwright, @playwright/test, page.goto, page.click, page.locator, getByRole, getByText, getByTestId, expect(page), toHaveScreenshot, playwright.config, npx playwright. Also trigger when user wants to write E2E tests, automate browser interactions, test across Chromium/Firefox/WebKit, mock network requests in tests, do visual regression testing, generate tests with codegen, or set up CI test pipelines. When in doubt about whether to use this skill for browser testing or E2E automation tasks, use it.
tools
OpenAI Agents SDK for building multi-agent workflows with tools, handoffs, guardrails, streaming, MCP, sessions, and tracing. MANDATORY TRIGGERS: openai-agents, openai agents sdk, openai-agents-python, openai agents, Runner.run, function_tool, handoff, guardrail, MCPServerStdio, MCPServerStreamableHttp, HostedMCPTool, RunContextWrapper, AgentHooks. Also trigger when user wants to build multi-agent systems with OpenAI models, create agent orchestration with handoffs, add guardrails to LLM applications, integrate MCP servers with agents, implement streaming agent responses, or use OpenAI's official agent framework. When in doubt about whether to use this skill for OpenAI agent tasks, use it.
tools
AI orchestration framework for building production-ready RAG applications, autonomous agents, and multimodal search systems. MANDATORY TRIGGERS: haystack, deepset, haystack-ai, haystack pipeline, haystack agent. Also trigger when the user wants to build RAG pipelines with modular components, create tool-calling agents with Haystack, orchestrate retrieval-augmented generation, build semantic search systems, or evaluate LLM pipelines. When in doubt about whether to use this skill for RAG orchestration or AI pipeline tasks, use it.