Skip to content
Back to skills

Claude Agent Sdk

ASecurity

Build autonomous AI agents with Claude Agent SDK. TypeScript v0.2.96 | Python v0.1.56. Covers: query(), hooks, subagents, MCP, permissions, sandbox, structured outputs, and sessions. Use when: building AI agents, configuring MCP servers, setting up permissions/hooks, using structured outputs, troubleshooting SDK errors, or working with subagents.

  • 2 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added September 2, 2026
ai-agentstypescriptpythonnodedockerkubernetesgitapi

Works with

  • claude code
  • cli
  • api
  • mcp

Security analysis

A100/100

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

Scanned September 2, 2026

npx -y skills add shengdabai/Tony-Claude-Code-Skills --skill claude-agent-sdk --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Claude Agent Sdk?

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

Security grade badge for Claude Agent Sdk
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/shengdabai-claude-agent-sdk/badge)](https://www.skillsdirectory.com/skills/shengdabai-claude-agent-sdk)

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
---
name: claude-agent-sdk
description: |
  Build autonomous AI agents with Claude Agent SDK.
  TypeScript v0.2.96 | Python v0.1.56.
  Covers: query(), hooks, subagents, MCP, permissions, sandbox,
  structured outputs, and sessions.

  Use when: building AI agents, configuring MCP servers, setting up
  permissions/hooks, using structured outputs, troubleshooting SDK errors,
  or working with subagents.
user-invocable: true
---

# Claude Agent SDK Reference

| | TypeScript | Python |
|---|---|---|
| **Version** | v0.2.96 | v0.1.56 |
| **Package** | `@anthropic-ai/claude-agent-sdk` | `claude-agent-sdk` (PyPI) |
| **Docs** | [TypeScript SDK](https://platform.claude.com/docs/en/agent-sdk/typescript) | [Python SDK](https://platform.claude.com/docs/en/agent-sdk/python) |
| **Repo** | [claude-agent-sdk-typescript](https://github.com/anthropics/claude-agent-sdk-typescript) | [claude-agent-sdk-python](https://github.com/anthropics/claude-agent-sdk-python) |
| **Full reference** | [SKILL-typescript.md](SKILL-typescript.md) | [SKILL-python.md](SKILL-python.md) |

## When you detect the user's language

- Working with `.ts` files, TypeScript imports, or `npm`/`node` → read `SKILL-typescript.md`
- Working with `.py` files, Python imports, or `pip`/`python` → read `SKILL-python.md`
- Ambiguous or multi-language → read both as needed

## Cross-Language Naming Map

| Concept | TypeScript | Python |
|---------|-----------|--------|
| One-shot query | `query(options)` | `query(options)` |
| Stateful client | N/A (query manages state) | `ClaudeSDKClient` |
| Options type | `Options` interface | `ClaudeAgentOptions` dataclass |
| Tool definition | `tool(name, schema, handler)` | `@tool(name, desc, schema)` decorator |
| MCP server factory | `createSdkMcpServer()` | `create_sdk_mcp_server()` |
| Permission callback | `canUseTool` | `can_use_tool` |
| Permission mode | `permissionMode: "..."` | `permission_mode="..."` |
| Hook registration | `hooks: { PreToolUse: [...] }` | `hooks={"PreToolUse": [...]}` |
| System prompt | `systemPrompt` | `system_prompt` |
| Max turns | `maxTurns` | `max_turns` |
| Allowed tools | `allowedTools` | `allowed_tools` |
| MCP servers | `mcpServers` | `mcp_servers` |
| Subagent def | `AgentDefinition` | `AgentDefinition` dataclass |

## Shared Concepts (both languages)

Both SDKs wrap the Claude Code CLI and share these concepts:
- **Hooks**: Pre/PostToolUse, Stop, SubagentStop, Notification, etc.
- **Permissions**: default, acceptEdits, plan, bypassPermissions, etc.
- **MCP Servers**: stdio, HTTP, SSE, SDK (in-process) configurations
- **Subagents**: Delegate tasks to child agents with scoped tools/permissions
- **Structured Outputs**: JSON Schema validation on agent output
- **Sandbox**: Container-based isolation (Docker/Kubernetes)
- **Sessions**: Capture, resume, and fork conversation state

For API details, code examples, options tables, and known issues,
read the language-specific reference file.

Files in this skill

  • .claude-plugin/plugin.json499 B
  • .github/workflows/sdk-update-check.yml19.2 KB
  • .gitignore55 B
  • .nvmrc3 B
  • CHANGELOG.md14.6 KB
  • README.md11.2 KB
  • SKILL-typescript.md99.4 KB
  • SKILL.md2.9 KB
  • agent/mending-agent.ts3.8 KB
  • agent/mending-prompt.md2.7 KB
  • agent/monitor.sh16.5 KB
  • agent/package.json479 B
  • agent/report-agent.ts8.5 KB
  • agent/report-prompt.md5.4 KB
  • agent/research-agent-py.ts5.4 KB
  • agent/research-agent-ts.ts4.9 KB
  • agent/research-prompt-py.md12.1 KB
  • agent/research-prompt-ts.md11.6 KB
  • agent/research-report-2026-02-15.md4.3 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.

Comments

Loading comments…

Newsletter

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