{"id":"a042f442-e6f1-4b01-a5bb-9a78baed2344","shortId":"BFzpmE","kind":"skill","title":"claude-agent-sdk-typescript","tagline":"Expert guidance for building AI agents with the Claude Agent SDK in TypeScript/JavaScript. Use when the user writes TypeScript or JavaScript code with the SDK, imports from \"@anthropic-ai/claude-agent-sdk\", uses query(), allowedTools, permissionMode, creates custom tools with cre","description":"# Claude Agent SDK — TypeScript Guide\n\nProduction guidance for building AI agents with the Claude Agent SDK in TypeScript.\n\n> **Naming**: The Claude Code SDK was renamed to the Claude Agent SDK (v0.1.0+).\n> Package: `npm install @anthropic-ai/claude-agent-sdk` · Import: `import { query } from \"@anthropic-ai/claude-agent-sdk\"`\n\n## Quick Reference — Two Interaction Modes\n\n### 1. `query()` — Stateless, One-Shot\n\nBest for: independent tasks, automation scripts, CI pipelines.\n\n```typescript\nimport { query, type ClaudeAgentOptions } from \"@anthropic-ai/claude-agent-sdk\";\n\nconst options: ClaudeAgentOptions = {\n  allowedTools: [\"Read\", \"Edit\", \"Glob\"],\n  permissionMode: \"acceptEdits\",\n};\n\nfor await (const message of query({\n  prompt: \"Review utils.ts for bugs. Fix any issues you find.\",\n  options,\n})) {\n  if (message.type === \"assistant\") {\n    for (const block of message.message.content) {\n      if (\"text\" in block) console.log(block.text);\n      else if (\"name\" in block) console.log(`Tool: ${block.name}`);\n    }\n  }\n  if (message.type === \"result\") {\n    console.log(`Done: ${message.subtype}`);\n  }\n}\n```\n\n### 2. `ClaudeSDKClient` — Stateful, Multi-Turn\n\nBest for: conversations, follow-up questions, interactive apps.\n\n```typescript\nimport { ClaudeSDKClient } from \"@anthropic-ai/claude-agent-sdk\";\n\nconst client = new ClaudeSDKClient({\n  options: {\n    allowedTools: [\"Read\", \"Write\", \"Bash\"],\n    permissionMode: \"acceptEdits\",\n  },\n});\n\ntry {\n  await client.query(\"Analyze the codebase structure\");\n  for await (const msg of client.receiveMessages()) {\n    console.log(msg);\n  }\n  // Continue the conversation with context preserved\n  await client.query(\"Now refactor the largest file you found\");\n  for await (const msg of client.receiveMessages()) {\n    console.log(msg);\n  }\n} finally {\n  await client.close();\n}\n```\n\n## ClaudeAgentOptions — Complete Configuration\n\nAll options are optional. Key fields (all camelCase):\n\n| Field | Type | Description |\n|-------|------|-------------|\n| `allowedTools` | `string[]` | Tools Claude can use. See Built-in Tools below. |\n| `disallowedTools` | `string[]` | Explicitly block specific tools. |\n| `permissionMode` | `string` | `\"default\"`, `\"acceptEdits\"`, or `\"bypassPermissions\"`. |\n| `systemPrompt` | `string \\| object` | Custom instructions. Use `{ type: \"preset\", preset: \"claude_code\" }` for CC default. |\n| `model` | `string` | e.g. `\"sonnet\"`, `\"opus\"`, `\"haiku\"`, or full model string. |\n| `cwd` | `string` | Working directory for the agent. |\n| `maxTurns` | `number` | Maximum agentic loop iterations. |\n| `settingSources` | `string[]` | `[\"user\", \"project\"]` to load Skills/CLAUDE.md from filesystem. |\n| `mcpServers` | `Record<string, McpServerConfig>` | MCP server configurations. |\n| `agents` | `Record<string, AgentDefinition>` | Named subagent definitions. |\n| `hooks` | `object` | Lifecycle hook callbacks. |\n\n### Built-in Tools\n\nTool names for `allowedTools`:\n\n- **File ops**: `Read`, `Write`, `Edit`, `MultiEdit`\n- **Search**: `Glob`, `Grep`\n- **Execution**: `Bash`\n- **Web**: `WebSearch`, `WebFetch`\n- **Delegation**: `Task` (required for subagents)\n- **Skills**: `Skill` (requires `settingSources`)\n\n## Custom Tools via SDK MCP Server\n\nDefine in-process tools without a separate MCP server process:\n\n```typescript\nimport { query, tool, createSdkMcpServer } from \"@anthropic-ai/claude-agent-sdk\";\n\nconst searchOrders = tool(\n  \"search_orders\",\n  \"Search orders by customer ID\",\n  { customer_id: \"string\", status: \"string\" },\n  async (args) => {\n    const results = await db.queryOrders(args.customer_id, args.status);\n    return { content: [{ type: \"text\", text: JSON.stringify(results) }] };\n  }\n);\n\nconst sendEmail = tool(\n  \"send_email\",\n  \"Send an email notification\",\n  { to: \"string\", subject: \"string\", body: \"string\" },\n  async (args) => {\n    await emailService.send(args.to, args.subject, args.body);\n    return { content: [{ type: \"text\", text: `Email sent to ${args.to}` }] };\n  }\n);\n\nconst server = createSdkMcpServer({\n  name: \"business-tools\",\n  tools: [searchOrders, sendEmail],\n});\n\nfor await (const msg of query({\n  prompt: \"Find recent orders for customer C-123\",\n  options: {\n    mcpServers: { biz: server },\n    allowedTools: [\"mcp__biz__search_orders\", \"mcp__biz__send_email\"],\n  },\n})) {\n  console.log(msg);\n}\n```\n\n**Tool naming convention**: MCP tools are accessed as `mcp__<server-name>__<tool-name>`.\n\n## Subagents\n\nDelegate specialized tasks to isolated agents with their own context and tool permissions:\n\n```typescript\nimport { query } from \"@anthropic-ai/claude-agent-sdk\";\n\nfor await (const message of query({\n  prompt: \"Review auth module for security issues, then write tests\",\n  options: {\n    allowedTools: [\"Read\", \"Grep\", \"Glob\", \"Task\"], // Task is required\n    agents: {\n      \"security-reviewer\": {\n        description: \"Security specialist. Use for vulnerability analysis.\",\n        prompt: \"You are a security expert. Analyze code for OWASP Top 10...\",\n        tools: [\"Read\", \"Grep\", \"Glob\"],\n        model: \"opus\",\n      },\n      \"test-writer\": {\n        description: \"Test specialist. Use to generate test suites.\",\n        prompt: \"You are a testing expert. Write comprehensive unit tests...\",\n        tools: [\"Read\", \"Write\", \"Bash\"],\n        model: \"sonnet\",\n      },\n    },\n  },\n})) {\n  if (message.type === \"result\") console.log(message.result);\n}\n```\n\n**Factory pattern** for dynamic agents:\n\n```typescript\nimport type { AgentDefinition } from \"@anthropic-ai/claude-agent-sdk\";\n\nfunction createReviewer(language: string): AgentDefinition {\n  return {\n    description: `${language} code review specialist`,\n    prompt: `You are an expert ${language} developer...`,\n    tools: [\"Read\", \"Grep\", \"Glob\"],\n    model: [\"rust\", \"c++\"].includes(language) ? \"opus\" : \"sonnet\",\n  };\n}\n```\n\n## Hooks — Lifecycle Callbacks\n\nAvailable events: `PreToolUse`, `PostToolUse`, `Stop`, `SessionStart`, `SessionEnd`, `UserPromptSubmit`.\n\n```typescript\nimport { query, type HookCallback } from \"@anthropic-ai/claude-agent-sdk\";\nimport { appendFileSync } from \"node:fs\";\n\nconst blockDangerousCommands: HookCallback = async (input) => {\n  if (input.tool_name === \"Bash\") {\n    const cmd = input.tool_input?.command ?? \"\";\n    const dangers = [\"rm -rf /\", \"DROP TABLE\", \"mkfs\"];\n    if (dangers.some((d) => cmd.includes(d))) {\n      return {\n        hookSpecificOutput: {\n          hookEventName: \"PreToolUse\",\n          permissionDecision: \"deny\",\n          permissionDecisionReason: `Blocked dangerous command: ${cmd}`,\n        },\n      };\n    }\n  }\n  return {};\n};\n\nconst auditLog: HookCallback = async (input) => {\n  appendFileSync(\n    \"audit.log\",\n    `${new Date().toISOString()}: ${input.tool_name}: ${JSON.stringify(input.tool_input)}\\n`\n  );\n  return {};\n};\n\nfor await (const msg of query({\n  prompt: \"Refactor utils.ts\",\n  options: {\n    permissionMode: \"acceptEdits\",\n    hooks: {\n      PreToolUse: [\n        { matcher: \"Bash\", hooks: [blockDangerousCommands] },\n        { matcher: \".*\", hooks: [auditLog] },\n      ],\n    },\n  },\n})) {\n  if (message.type === \"result\") console.log(msg.result);\n}\n```\n\n## MCP Integration (External Servers)\n\n```typescript\nfor await (const msg of query({\n  prompt: \"List open issues in the repo\",\n  options: {\n    mcpServers: {\n      github: {\n        type: \"stdio\",\n        command: \"npx\",\n        args: [\"-y\", \"@modelcontextprotocol/server-github\"],\n        env: { GITHUB_TOKEN: process.env.GITHUB_TOKEN! },\n      },\n      postgres: {\n        type: \"stdio\",\n        command: \"docker\",\n        args: [\"run\", \"mcp-postgres-server\"],\n        env: { DATABASE_URL: process.env.DATABASE_URL! },\n      },\n    },\n    allowedTools: [\"mcp__github\", \"mcp__postgres\"],\n  },\n})) {\n  console.log(msg);\n}\n```\n\nYou can mix SDK MCP servers (in-process) and external MCP servers in the same config.\n\n## Using Skills in the SDK\n\nSkills are filesystem-based and must be explicitly enabled:\n\n```typescript\nfor await (const msg of query({\n  prompt: \"Help me process this PDF\",\n  options: {\n    cwd: \"/path/to/project\",\n    settingSources: [\"user\", \"project\"], // REQUIRED — loads Skills from filesystem\n    allowedTools: [\"Skill\", \"Read\", \"Write\", \"Bash\"],\n  },\n})) {\n  console.log(msg);\n}\n```\n\n**Common mistake**: forgetting `settingSources`. Without it, Skills won't be discovered even if `\"Skill\"` is in `allowedTools`.\n\nSkill locations:\n- **Project**: `.claude/skills/*/SKILL.md` (shared via git)\n- **User**: `~/.claude/skills/*/SKILL.md` (personal, cross-project)\n\nNote: The `allowed-tools` field in SKILL.md frontmatter **only works in Claude Code CLI**, not in the SDK. Use `allowedTools` in options to control tool access.\n\n## Sessions and Conversation Management\n\n```typescript\nimport { query } from \"@anthropic-ai/claude-agent-sdk\";\n\nlet sessionId: string | undefined;\n\n// First interaction — capture sessionId\nfor await (const msg of query({\n  prompt: \"Review this codebase and identify the top 3 issues\",\n  options: { allowedTools: [\"Read\", \"Glob\", \"Grep\"] },\n})) {\n  if (msg.type === \"system\" && \"session_id\" in msg) {\n    sessionId = msg.session_id;\n  }\n  console.log(msg);\n}\n\n// Resume with context\nfor await (const msg of query({\n  prompt: \"Now fix issue #1 that you found\",\n  options: {\n    sessionId,\n    allowedTools: [\"Read\", \"Edit\", \"Bash\"],\n    permissionMode: \"acceptEdits\",\n  },\n})) {\n  console.log(msg);\n}\n```\n\n## System Prompt Configuration\n\n```typescript\n// 1. Custom system prompt (v0.1.0+ default: minimal prompt)\nconst options = { systemPrompt: \"You are a senior TypeScript engineer...\" };\n\n// 2. Claude Code's full system prompt (opt-in)\nconst options = {\n  systemPrompt: { type: \"preset\", preset: \"claude_code\" },\n};\n\n// 3. No system prompt — SDK default (minimal)\nconst options = {}; // uses minimal built-in prompt\n```\n\n**Breaking change in v0.1.0**: The SDK no longer loads Claude Code's system prompt by default. If you need the old behavior, explicitly set `preset: \"claude_code\"`.\n\n## Authentication\n\n```bash\n# Direct API (default)\nexport ANTHROPIC_API_KEY=your-api-key\n\n# Amazon Bedrock\nexport CLAUDE_CODE_USE_BEDROCK=1\n# + configure AWS credentials\n\n# Google Vertex AI\nexport CLAUDE_CODE_USE_VERTEX=1\n# + configure GCP credentials\n\n# Microsoft Azure AI Foundry\nexport CLAUDE_CODE_USE_FOUNDRY=1\n# + configure Azure credentials\n```\n\n## Common Patterns\n\n### Batch Processing (Parallel Agents)\n\n```typescript\nasync function processFile(filepath: string): Promise<string | undefined> {\n  for await (const msg of query({\n    prompt: `Review ${filepath} for security issues`,\n    options: {\n      allowedTools: [\"Read\", \"Grep\"],\n      maxTurns: 50,\n    },\n  })) {\n    if (msg.type === \"result\") return msg.result;\n  }\n}\n\nconst results = await Promise.all([\n  processFile(\"auth.ts\"),\n  processFile(\"payments.ts\"),\n  processFile(\"users.ts\"),\n]);\n```\n\n### Structured Output Collection\n\n```typescript\nconst messages: Message[] = [];\nfor await (const msg of query({ prompt: \"Analyze this codebase\", options })) {\n  messages.push(msg);\n}\n\n// Extract final result\nconst result = messages.findLast((m) => \"result\" in m)?.result;\n```\n\n### Error Handling\n\n```typescript\nimport { CLINotFoundError, CLIConnectionError } from \"@anthropic-ai/claude-agent-sdk\";\n\ntry {\n  for await (const msg of query({ prompt: \"...\", options })) {\n    console.log(msg);\n  }\n} catch (error) {\n  if (error instanceof CLINotFoundError) {\n    console.error(\"Claude Code CLI not found. Install: curl -fsSL https://claude.ai/install.sh | bash\");\n  } else if (error instanceof CLIConnectionError) {\n    console.error(`Connection error: ${error.message}`);\n  } else {\n    throw error;\n  }\n}\n```\n\n## Migration from Claude Code SDK (< v0.1.0)\n\nKey changes:\n1. `@anthropic-ai/claude-code` → `@anthropic-ai/claude-agent-sdk`\n2. `ClaudeCodeOptions` → `ClaudeAgentOptions` (type name)\n3. System prompt no longer loads Claude Code's prompt by default\n4. `settingSources` must be explicitly set (was auto-loaded before)\n\n## Best Practices\n\n1. **Principle of least privilege**: Only grant tools the agent actually needs.\n2. **Use `permissionMode: \"acceptEdits\"` for automation**, `\"default\"` for interactive use.\n3. **Prefer SDK MCP servers** over external ones for custom tools — less overhead, easier debugging.\n4. **Use subagents for specialized tasks** — isolate context and apply the right model per task.\n5. **Add hooks for safety** — block dangerous commands and audit tool usage in production.\n6. **Set `maxTurns`** to prevent runaway agents in production environments.\n7. **Use `cwd`** to scope the agent to a specific directory.\n8. **Capture `sessionId`** from system messages if you need conversation continuity.\n\n> For troubleshooting common issues, see `references/troubleshooting.md`.\n\n## Official Resources\n\n- Overview: https://platform.claude.com/docs/en/agent-sdk/overview\n- Quickstart: https://platform.claude.com/docs/en/agent-sdk/quickstart\n- TypeScript reference: https://platform.claude.com/docs/en/agent-sdk/typescript\n- Migration guide: https://platform.claude.com/docs/en/agent-sdk/migration-guide\n- TypeScript SDK repo: https://github.com/anthropics/claude-agent-sdk-typescript\n- Demo agents: https://github.com/anthropics/claude-agent-sdk-demos\n- Cookbook: https://platform.claude.com/cookbook","tags":["claude","agent","sdk","typescript","skill","waltersumbon","agent-skills","ai-agents","anthropic","claude-agent-sdk","claude-code","claude-skills"],"capabilities":["skill","source-waltersumbon","skill-claude-agent-sdk-typescript","topic-agent-skills","topic-ai-agents","topic-anthropic","topic-claude-agent-sdk","topic-claude-code","topic-claude-skills"],"categories":["claude-agent-sdk-skill"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/WalterSumbon/claude-agent-sdk-skill/claude-agent-sdk-typescript","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add WalterSumbon/claude-agent-sdk-skill","source_repo":"https://github.com/WalterSumbon/claude-agent-sdk-skill","install_from":"skills.sh"}},"qualityScore":"0.453","qualityRationale":"deterministic score 0.45 from registry signals: · indexed on github topic:agent-skills · 6 github stars · SKILL.md body (13,233 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-05-18T19:14:31.738Z","embedding":null,"createdAt":"2026-05-18T13:22:18.446Z","updatedAt":"2026-05-18T19:14:31.738Z","lastSeenAt":"2026-05-18T19:14:31.738Z","tsv":"'-123':496 '/.claude/skills':924 '/anthropics/claude-agent-sdk-demos':1480 '/anthropics/claude-agent-sdk-typescript':1475 '/claude-agent-sdk':36,83,91,120,197,410,542,642,692,968,1256,1315 '/claude-code':1311 '/cookbook':1484 '/docs/en/agent-sdk/migration-guide':1469 '/docs/en/agent-sdk/overview':1455 '/docs/en/agent-sdk/quickstart':1459 '/docs/en/agent-sdk/typescript':1464 '/install.sh':1285 '/path/to/project':882 '/skill.md':919,925 '1':97,1023,1041,1138,1150,1163,1307,1346 '10':590 '2':175,1058,1316,1358 '3':991,1076,1321,1368 '4':1333,1383 '5':1398 '50':1199 '6':1412 '7':1422 '8':1433 'acceptedit':129,208,285,764,1034,1361 'access':518,956 'actual':1356 'add':1399 'agent':3,11,15,47,56,60,74,318,322,341,527,568,633,1172,1355,1418,1428,1477 'agentdefinit':344,637,647 'ai':10,35,55,82,90,119,196,409,541,641,691,967,1144,1156,1255,1310,1314 'allow':933 'allowed-tool':932 'allowedtool':39,124,203,264,360,501,560,828,891,914,950,994,1029,1195 'amazon':1131 'analysi':578 'analyz':212,585,1229 'anthrop':34,81,89,118,195,408,540,640,690,966,1124,1254,1309,1313 'anthropic-ai':33,80,88,117,194,407,539,639,689,965,1253,1308,1312 'api':1121,1125,1129 'app':189 'appendfilesync':694,741 'appli':1392 'arg':427,458,804,817 'args.body':463 'args.customer':432 'args.status':434 'args.subject':462 'args.to':461,472 'assist':149 'async':426,457,701,739,1174 'audit':1407 'audit.log':742 'auditlog':737,773 'auth':551 'auth.ts':1210 'authent':1118 'auto':1341 'auto-load':1340 'autom':107,1363 'avail':675 'aw':1140 'await':131,210,217,230,240,248,430,459,484,544,754,785,869,978,1014,1183,1207,1223,1259 'azur':1155,1165 'base':861 'bash':206,371,621,706,768,895,1032,1119,1286 'batch':1169 'bedrock':1132,1137 'behavior':1112 'best':103,181,1344 'biz':499,503,507 'block':152,158,165,279,731,1403 'block.name':168 'block.text':160 'blockdangerouscommand':699,770 'bodi':455 'break':1091 'bug':140 'build':9,54 'built':272,354,1088 'built-in':271,353,1087 'busi':478 'business-tool':477 'bypasspermiss':287 'c':495,667 'callback':352,674 'camelcas':260 'captur':975,1434 'catch':1268 'cc':300 'chang':1092,1306 'ci':109 'claud':2,14,46,59,66,73,267,297,942,1059,1074,1100,1116,1134,1146,1159,1275,1301,1327 'claude-agent-sdk-typescript':1 'claude.ai':1284 'claude.ai/install.sh':1283 'claude/skills':918 'claudeagentopt':115,123,250,1318 'claudecodeopt':1317 'claudesdkcli':176,192,201 'cli':944,1277 'cliconnectionerror':1251,1291 'client':199 'client.close':249 'client.query':211,231 'client.receivemessages':221,244 'clinotfounderror':1250,1273 'cmd':708,734 'cmd.includes':722 'code':27,67,298,586,651,943,1060,1075,1101,1117,1135,1147,1160,1276,1302,1328 'codebas':214,986,1231 'collect':1217 'command':711,733,802,815,1405 'common':898,1167,1446 'complet':251 'comprehens':615 'config':851 'configur':252,340,1039,1139,1151,1164 'connect':1293 'console.error':1274,1292 'console.log':159,166,172,222,245,510,627,777,833,896,1008,1035,1266 'const':121,132,151,198,218,241,411,428,442,473,485,545,698,707,712,736,755,786,870,979,1015,1049,1068,1083,1184,1205,1219,1224,1238,1260 'content':436,465 'context':228,531,1012,1390 'continu':224,1443 'control':954 'convent':514 'convers':183,226,959,1442 'cookbook':1481 'cre':45 'creat':41 'createreview':644 'createsdkmcpserv':405,475 'credenti':1141,1153,1166 'cross':928 'cross-project':927 'curl':1281 'custom':42,291,384,419,421,494,1042,1377 'cwd':312,881,1424 'd':721,723 'danger':713,732,1404 'dangers.some':720 'databas':824 'date':744 'db.queryorders':431 'debug':1382 'default':284,301,1046,1081,1106,1122,1332,1364 'defin':390 'definit':347 'deleg':375,522 'demo':1476 'deni':729 'descript':263,572,600,649 'develop':660 'direct':1120 'directori':315,1432 'disallowedtool':276 'discov':908 'docker':816 'done':173 'drop':716 'dynam':632 'e.g':304 'easier':1381 'edit':126,365,1031 'els':161,1287,1296 'email':446,449,469,509 'emailservice.send':460 'enabl':866 'engin':1057 'env':807,823 'environ':1421 'error':1246,1269,1271,1289,1294,1298 'error.message':1295 'even':909 'event':676 'execut':370 'expert':6,584,613,658 'explicit':278,865,1113,1337 'export':1123,1133,1145,1158 'extern':781,845,1374 'extract':1235 'factori':629 'field':258,261,935 'file':236,361 'filepath':1177,1190 'filesystem':333,860,890 'filesystem-bas':859 'final':247,1236 'find':145,490 'first':973 'fix':141,1021 'follow':185 'follow-up':184 'forget':900 'found':238,1026,1279 'foundri':1157,1162 'frontmatt':938 'fs':697 'fssl':1282 'full':309,1062 'function':643,1175 'gcp':1152 'generat':605 'git':922 'github':799,808,830 'github.com':1474,1479 'github.com/anthropics/claude-agent-sdk-demos':1478 'github.com/anthropics/claude-agent-sdk-typescript':1473 'glob':127,368,563,594,664,996 'googl':1142 'grant':1352 'grep':369,562,593,663,997,1197 'guid':50,1466 'guidanc':7,52 'haiku':307 'handl':1247 'help':875 'hook':348,351,672,765,769,772,1400 'hookcallback':687,700,738 'hookeventnam':726 'hookspecificoutput':725 'id':420,422,433,1002,1007 'identifi':988 'import':31,84,85,112,191,402,536,635,684,693,962,1249 'in-process':391,841 'includ':668 'independ':105 'input':702,710,740,750 'input.tool':704,709,746,749 'instal':79,1280 'instanceof':1272,1290 'instruct':292 'integr':780 'interact':95,188,974,1366 'isol':526,1389 'issu':143,555,793,992,1022,1193,1447 'iter':324 'javascript':26 'json.stringify':440,748 'key':257,1126,1130,1305 'languag':645,650,659,669 'largest':235 'least':1349 'less':1379 'let':969 'lifecycl':350,673 'list':791 'load':330,887,1099,1326,1342 'locat':916 'longer':1098,1325 'loop':323 'm':1241,1244 'manag':960 'matcher':767,771 'maximum':321 'maxturn':319,1198,1414 'mcp':338,388,398,502,506,515,520,779,820,829,831,839,846,1371 'mcp-postgres-serv':819 'mcpserver':334,498,798 'mcpserverconfig':337 'messag':133,546,1220,1221,1438 'message.message.content':154 'message.result':628 'message.subtype':174 'message.type':148,170,625,775 'messages.findlast':1240 'messages.push':1233 'microsoft':1154 'migrat':1299,1465 'minim':1047,1082,1086 'mistak':899 'mix':837 'mkfs':718 'mode':96 'model':302,310,595,622,665,1395 'modelcontextprotocol/server-github':806 'modul':552 'msg':219,223,242,246,486,511,756,787,834,871,897,980,1004,1009,1016,1036,1185,1225,1234,1261,1267 'msg.result':778,1204 'msg.session':1006 'msg.type':999,1201 'multi':179 'multi-turn':178 'multiedit':366 'must':863,1335 'n':751 'name':64,163,345,358,476,513,705,747,1320 'need':1109,1357,1441 'new':200,743 'node':696 'note':930 'notif':450 'npm':78 'npx':803 'number':320 'object':290,349 'offici':1450 'old':1111 'one':101,1375 'one-shot':100 'op':362 'open':792 'opt':1066 'opt-in':1065 'option':122,146,202,254,256,497,559,762,797,880,952,993,1027,1050,1069,1084,1194,1232,1265 'opus':306,596,670 'order':415,417,492,505 'output':1216 'overhead':1380 'overview':1452 'owasp':588 'packag':77 'parallel':1171 'pattern':630,1168 'payments.ts':1212 'pdf':879 'per':1396 'permiss':534 'permissiondecis':728 'permissiondecisionreason':730 'permissionmod':40,128,207,282,763,1033,1360 'person':926 'pipelin':110 'platform.claude.com':1454,1458,1463,1468,1483 'platform.claude.com/cookbook':1482 'platform.claude.com/docs/en/agent-sdk/migration-guide':1467 'platform.claude.com/docs/en/agent-sdk/overview':1453 'platform.claude.com/docs/en/agent-sdk/quickstart':1457 'platform.claude.com/docs/en/agent-sdk/typescript':1462 'postgr':812,821,832 'posttoolus':678 'practic':1345 'prefer':1369 'preserv':229 'preset':295,296,1072,1073,1115 'pretoolus':677,727,766 'prevent':1416 'principl':1347 'privileg':1350 'process':393,400,843,877,1170 'process.env.database':826 'process.env.github':810 'processfil':1176,1209,1211,1213 'product':51,1411,1420 'project':328,885,917,929 'promis':1179 'promise.all':1208 'prompt':136,489,549,579,608,654,759,790,874,983,1019,1038,1044,1048,1064,1079,1090,1104,1188,1228,1264,1323,1330 'queri':38,86,98,113,135,403,488,537,548,685,758,789,873,963,982,1018,1187,1227,1263 'question':187 'quick':92 'quickstart':1456 'read':125,204,363,561,592,619,662,893,995,1030,1196 'recent':491 'record':335,342 'refactor':233,760 'refer':93,1461 'references/troubleshooting.md':1449 'renam':70 'repo':796,1472 'requir':377,382,567,886 'resourc':1451 'result':171,429,441,626,776,1202,1206,1237,1239,1242,1245 'resum':1010 'return':435,464,648,724,735,752,1203 'review':137,550,571,652,984,1189 'rf':715 'right':1394 'rm':714 'run':818 'runaway':1417 'rust':666 'safeti':1402 'scope':1426 'script':108 'sdk':4,16,30,48,61,68,75,387,838,856,948,1080,1096,1303,1370,1471 'search':367,414,416,504 'searchord':412,481 'secur':554,570,573,583,1192 'security-review':569 'see':270,1448 'send':445,447,508 'sendemail':443,482 'senior':1055 'sent':470 'separ':397 'server':339,389,399,474,500,782,822,840,847,1372 'session':957,1001 'sessionend':681 'sessionid':970,976,1005,1028,1435 'sessionstart':680 'set':1114,1338,1413 'settingsourc':325,383,883,901,1334 'share':920 'shot':102 'skill':380,381,853,857,888,892,904,911,915 'skill-claude-agent-sdk-typescript' 'skill.md':937 'skills/claude.md':331 'sonnet':305,623,671 'source-waltersumbon' 'special':523,1387 'specialist':574,602,653 'specif':280,1431 'state':177 'stateless':99 'status':424 'stdio':801,814 'stop':679 'string':265,277,283,289,303,311,313,326,336,343,423,425,452,454,456,646,971,1178,1180 'structur':215,1215 'subag':346,379,521,1385 'subject':453 'suit':607 'system':1000,1037,1043,1063,1078,1103,1322,1437 'systemprompt':288,1051,1070 'tabl':717 'task':106,376,524,564,565,1388,1397 'test':558,598,601,606,612,617 'test-writ':597 'text':156,438,439,467,468 'throw':1297 'toisostr':745 'token':809,811 'tool':43,167,266,274,281,356,357,385,394,404,413,444,479,480,512,516,533,591,618,661,934,955,1353,1378,1408 'top':589,990 'topic-agent-skills' 'topic-ai-agents' 'topic-anthropic' 'topic-claude-agent-sdk' 'topic-claude-code' 'topic-claude-skills' 'tri':209,1257 'troubleshoot':1445 'turn':180 'two':94 'type':114,262,294,437,466,636,686,800,813,1071,1319 'typescript':5,24,49,63,111,190,401,535,634,683,783,867,961,1040,1056,1173,1218,1248,1460,1470 'typescript/javascript':18 'undefin':972,1181 'unit':616 'url':825,827 'usag':1409 'use':19,37,269,293,575,603,852,949,1085,1136,1148,1161,1359,1367,1384,1423 'user':22,327,884,923 'userpromptsubmit':682 'users.ts':1214 'utils.ts':138,761 'v0.1.0':76,1045,1094,1304 'vertex':1143,1149 'via':386,921 'vulner':577 'web':372 'webfetch':374 'websearch':373 'without':395,902 'won':905 'work':314,940 'write':23,205,364,557,614,620,894 'writer':599 'y':805 'your-api-key':1127","prices":[{"id":"019dc2dc-63f8-43e7-9e6a-c5751dac9f98","listingId":"a042f442-e6f1-4b01-a5bb-9a78baed2344","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"WalterSumbon","category":"claude-agent-sdk-skill","install_from":"skills.sh"},"createdAt":"2026-05-18T13:22:18.446Z"}],"sources":[{"listingId":"a042f442-e6f1-4b01-a5bb-9a78baed2344","source":"github","sourceId":"WalterSumbon/claude-agent-sdk-skill/claude-agent-sdk-typescript","sourceUrl":"https://github.com/WalterSumbon/claude-agent-sdk-skill/tree/main/skills/claude-agent-sdk-typescript","isPrimary":false,"firstSeenAt":"2026-05-18T13:22:18.446Z","lastSeenAt":"2026-05-18T19:14:31.738Z"}],"details":{"listingId":"a042f442-e6f1-4b01-a5bb-9a78baed2344","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"WalterSumbon","slug":"claude-agent-sdk-typescript","github":{"repo":"WalterSumbon/claude-agent-sdk-skill","stars":6,"topics":["agent-skills","ai-agents","anthropic","claude-agent-sdk","claude-code","claude-skills"],"license":"apache-2.0","html_url":"https://github.com/WalterSumbon/claude-agent-sdk-skill","pushed_at":"2026-02-24T09:27:10Z","description":"Production-ready guides for building AI agents with Claude Agent SDK in Python and TypeScript - complete coverage of official docs plus advanced patterns (subagents, hooks, batch processing)","skill_md_sha":"469e2598439c7c962c4159aefa8e207fbbc53e43","skill_md_path":"skills/claude-agent-sdk-typescript/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/WalterSumbon/claude-agent-sdk-skill/tree/main/skills/claude-agent-sdk-typescript"},"layout":"multi","source":"github","category":"claude-agent-sdk-skill","frontmatter":{"name":"claude-agent-sdk-typescript","description":"Expert guidance for building AI agents with the Claude Agent SDK in TypeScript/JavaScript. Use when the user writes TypeScript or JavaScript code with the SDK, imports from \"@anthropic-ai/claude-agent-sdk\", uses query(), allowedTools, permissionMode, creates custom tools with createSdkMcpServer, sets up hooks, integrates MCP servers, manages sessions, or debugs SDK issues in TypeScript/Node.js. Also triggers on: \"@anthropic-ai/claude-agent-sdk\", \"allowedTools\", \"permissionMode\", \"npm install\", \"for await\", \"AgentDefinition\", or \"settingSources\"."},"skills_sh_url":"https://skills.sh/WalterSumbon/claude-agent-sdk-skill/claude-agent-sdk-typescript"},"updatedAt":"2026-05-18T19:14:31.738Z"}}