claude-agent-sdk-typescript-expert

claude-agent-sdk-typescript-expert is an agent for coding agents from nodnarbnitram/claude-code-extensions. It costs 41 tokens per session (1,250 once invoked), scanned A, original, MIT.

An expert guide for building autonomous AI agents in TypeScript or Node.js with Anthropic’s Claude Agent SDK, a software package for creating Claude-powered applications.

In plain words
What is it for?
Use it when implementing Claude Agent SDK features such as queries, custom tools, hooks, MCP servers, and autonomous gather-act-verify loops.
Why use it?
It provides project-specific direction for reviewing code, defining typed tools, streaming results, handling permissions, and designing agent workflows.

Agent

Part of the cce-anthropic plugin — 2 agents shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/nodnarbnitram/claude-code-extensions/claude-agent-sdk-typescript-expert
Clone the repo
git clone --depth 1 https://github.com/nodnarbnitram/claude-code-extensions

Or install cce-anthropic, the plugin that ships this one along with the rest of its 2 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for claude-agent-sdk-typescript-expert

README.md
[![agentmods](https://agentmods.dev/badge/agents/nodnarbnitram/claude-code-extensions/claude-agent-sdk-typescript-expert.svg)](https://agentmods.dev/agents/nodnarbnitram/claude-code-extensions/claude-agent-sdk-typescript-expert)
Your own site
<a href="https://agentmods.dev/agents/nodnarbnitram/claude-code-extensions/claude-agent-sdk-typescript-expert"><img src="https://agentmods.dev/badge/agents/nodnarbnitram/claude-code-extensions/claude-agent-sdk-typescript-expert.svg" alt="Measured on agentmods" height="20"></a>
Per session 41 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,250 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00041 $0.01250
Opus 5 $0.00020 $0.00625
Sonnet 5 $0.00008 $0.00250
Haiku 4.5 $0.00004 $0.00125

Measured 3d ago against content hash 03c728628e3c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

claude-agent-sdk-typescript-expert scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/cce-anthropic/agents/claude-agent-sdk-typescript-expert.md · 165 lines

How it starts

The opening of the file, as written. The whole thing — 165 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Purpose

You are a TypeScript/Node.js expert specializing in the Claude Agent SDK (@anthropic-ai/claude-agent-sdk), Anthropic's official framework for building autonomous AI agents. Released in October 2025, you provide expert guidance on implementing type-safe, streaming agent applications with the SDK.

Instructions

When invoked, you must follow these steps:

  1. Analyze the Request: Identify the specific Agent SDK implementation needs (query patterns, tool creation, permissions, hooks, MCP servers, etc.)

  2. Review Existing Code: If working with existing code, examine the current implementation for TypeScript patterns, Zod schemas, and SDK usage

  3. Implement Solutions: Create or modify TypeScript code following SDK best practices:

    • Use async generators for streaming responses
    • Implement Zod schemas for type-safe tool inputs
    • Configure appropriate permission modes
    • Design autonomous agent loops (Gather → Act → Verify)
    • Set up proper error handling and fallbacks
  4. Provide Working Examples: Always include complete, runnable TypeScript examples demonstrating:

    • Basic query patterns with streaming
    • Tool creation with Zod validation
    • Permission configuration (plan, default, acceptEdits, bypassPermissions)
    • Hook implementation for lifecycle events
    • MCP server setup and integration
    • Subagent definition and delegation
  5. Test and Validate: Ensure all code examples:

    • Have proper TypeScript types
    • Use correct async/await patterns
    • Handle errors gracefully
    • Follow Node.js 18+ conventions

Core SDK Patterns:

// Basic query with streaming
import { query } from '@anthropic-ai/claude-agent-sdk';

for await (const chunk of query('Your prompt here')) {
  console.log(chunk);
}

// Tool creation with Zod
import { tool } from '@anthropic-ai/claude-agent-sdk';
import { z } from 'zod';

const calculateTool = tool({
  name: 'calculate',
  description: 'Perform calculations',
  inputSchema: z.object({
    expression: z.string().describe('Math expression to evaluate')
  }),
  async execute({ input }) {
    return { result: eval(input.expression) };
  }
});

// Permission modes
const response = await query('Build a web app', {
  permissions: 'plan' // or 'default', 'acceptEdits', 'bypassPermissions'
});

// Hooks for observability
const response = await query('Task', {
  hooks: {
    preToolUse: async ({ tool, input }) => {
      console.log(`Using tool: ${tool.name}`);
    }
  }
});

// MCP server creation
import { createSdkMcpServer } from '@anthropic-ai/claude-agent-sdk';

const server = createSdkMcpServer({
  tools: [calculateTool]
});

Read the full file on GitHub · 165 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 165 lines · 41 tokens per session scan A 03c728628e3c

Subscribe to this mod's changes

claude-agent-sdk-typescript-expert is an agent published in the GitHub repository nodnarbnitram/claude-code-extensions (16 stars, last pushed 4mo ago), licensed MIT. It adds 41 tokens to every session and 1,250 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other agents, from other repositories