Agent skill · Code Review & Quality

claude-agent-sdk-typescript

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".

majiayu000github.com/majiayu000GitHub ↗
claude-codeMIT
Install
npx skills add majiayu000/claude-skill-registry --skill claude-agent-sdk-typescript --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 2
SKILL.md size: 14 KB
Bundled scripts: none
Path: skills/agent/claude-agent-sdk-typescript/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 534
Language: HTML

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Claude Agent SDK — TypeScript Guide Production guidance for building AI agents with the Claude Agent SDK in TypeScript. > **Naming**: The Claude Code SDK was renamed to the Claude Agent SDK (v0.1.0+). > Package: `npm install @anthropic-ai/claude-agent-sdk` · Import: `import { query } from "@anthropic-ai/claude-agent-sdk"` ## Quick Reference — Two Interaction Modes ### 1. `query()` — Stateless, One-Shot Best for: independent tasks, automation scripts, CI pipelines. ```typescript import { query, type ClaudeAgentOptions } from "@anthropic-ai/claude-agent-sdk"; const options: ClaudeAgentOptions = { allowedTools: ["Read", "Edit", "Glob"], permissionMode: "acceptEdits", }; for await (const message of query({ prompt: "Review utils.ts for bugs. Fix any issues you find.", options, })) { if (message.type === "assistant") { for (const block of message.message.content) { if ("text" in block) console.log(block.text); else if ("name" in block) console.log(`Tool: ${block.name}`); } } if (message.type === "result") { console.log(`Done: ${message.subtype}`); } } ``` ### 2. `ClaudeSDKClient` — Stateful, Multi-Turn Best for: conversations, follow-up questions, interactive apps. ```typescript import

What's inside
Steps it walks through
  1. Quick Reference — Two Interaction Modes
  2. 1. query() — Stateless, One-Shot
  3. 2. ClaudeSDKClient — Stateful, Multi-Turn
  4. ClaudeAgentOptions — Complete Configuration
  5. Built-in Tools
  6. Custom Tools via SDK MCP Server
  7. Subagents
  8. Hooks — Lifecycle Callbacks
  9. MCP Integration (External Servers)
  10. Using Skills in the SDK
  11. Sessions and Conversation Management
  12. System Prompt Configuration
  13. Authentication
  14. Common Patterns
Ships with 1 file
  • metadata.json
Commands it runs
Direct API (default)
export ANTHROPIC_API_KEY=your-api-key
Amazon Bedrock
export CLAUDE_CODE_USE_BEDROCK=1
Google Vertex AI
export CLAUDE_CODE_USE_VERTEX=1
Microsoft Azure AI Foundry
export CLAUDE_CODE_USE_FOUNDRY=1
More from claude-skill-registry
All skills →
About this skill
What does the claude-agent-sdk-typescript skill do?

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".

How do I install it?

Run `npx skills add majiayu000/claude-skill-registry --skill claude-agent-sdk-typescript --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.

Keep going