Agent SDK Dev — SDK Scaffolding & Verification

Development Kit for Claude Agent SDK Applications

Interactive scaffolding and verification toolkit for creating Claude Agent SDK applications in Python and TypeScript. Guides developers through project setup with /new-sdk-app, scaffolds the project structure, and runs language-specific verifiers to ensure correctness.

2
Agents
1
Command
5
Files
MD
Language

🤖 SDK Dev Kit🐍 Python SDK📘 TypeScript SDK✅ Verification

📚 What is this & why does it exist?

Agent SDK Dev removes the boilerplate friction from starting new Claude Agent SDK projects. The /new-sdk-app command asks a series of guided questions (language, project name, features), then scaffolds a complete project with proper structure, dependencies, and configuration. After scaffolding, a language-specific verifier agent (Python or TypeScript) validates that the generated code compiles, imports resolve, and the basic agent loop works correctly.

💡 Real-world analogy

Think of a car dealership's “build your vehicle” configurator. You answer questions about engine type, color, and features. The system generates a complete vehicle specification, sends it to the factory floor (scaffolding), and then runs quality checks before delivery (verification). Agent SDK Dev is that configurator for AI agent projects — you pick your language, name your app, choose features, and get a verified, ready-to-run project.

Architecture

flowchart TB
    subgraph Setup["Interactive Setup"]
        CMD["/new-sdk-app"] --> Q1["Language? Python / TypeScript"]
        Q1 --> Q2["Project name?"]
        Q2 --> Q3["Features? Tools, MCP, Hooks"]
        Q3 --> Q4["Output directory?"]
    end
    subgraph Scaffold["Project Scaffolding"]
        Q4 --> SC["Generate project structure"]
        SC --> DEP["Write dependency files"]
        DEP --> CFG["Write configuration"]
        CFG --> SRC["Generate source code"]
    end
    subgraph Verify["Verification"]
        SRC -->|Python| VPY["agent-sdk-verifier-py"]
        SRC -->|TypeScript| VTS["agent-sdk-verifier-ts"]
        VPY --> RPT["Verification Report"]
        VTS --> RPT
    end
    RPT --> OUT["Ready-to-run Project"]

Key Components

ComponentFileRole
new-sdk-appcommands/new-sdk-app.mdInteractive guided command — collects preferences and orchestrates scaffolding
agent-sdk-verifier-pyagents/agent-sdk-verifier-py.mdPython verifier — checks imports, venv setup, type hints, agent loop execution
agent-sdk-verifier-tsagents/agent-sdk-verifier-ts.mdTypeScript verifier — checks compilation, package resolution, type safety, agent loop
plugin.json.claude-plugin/plugin.jsonPlugin manifest registering the command and both verifier agents
README.mdREADME.mdUsage documentation with examples for both Python and TypeScript flows

Verifier Agent Details

VerifierModelChecks PerformedTools Used
agent-sdk-verifier-pySonnetImport resolution, venv creation, pip install, type checking (mypy), agent loop dry runBash, Read, Grep
agent-sdk-verifier-tsSonnetPackage install (npm/pnpm), TypeScript compilation (tsc), import resolution, agent loop dry runBash, Read, Grep

Workflow Example

Basic Usage

# Create a new Python Agent SDK app
/new-sdk-app

# The command will interactively ask:
# 1. Language: Python or TypeScript?
# 2. Project name?
# 3. Features: Tools, MCP, Hooks?
# 4. Output directory?

Verification Checks

🐍 Python Verification Steps

  1. Verify pyproject.toml has valid TOML syntax
  2. Create virtual environment (python -m venv .venv)
  3. Install dependencies (pip install -e .)
  4. Check all imports resolve correctly
  5. Run mypy type checking (if installed)
  6. Execute agent loop dry run (no API calls)
  7. Verify test file imports and structure

📘 TypeScript Verification Steps

  1. Verify package.json has valid JSON
  2. Verify tsconfig.json configuration
  3. Install packages (npm install)
  4. Run TypeScript compiler (tsc --noEmit)
  5. Check all module imports resolve
  6. Verify exported types are correct
  7. Execute agent loop dry run (no API calls)

Supported SDK Features

FeaturePythonTypeScriptDescription
Basic Agent Loop✅✅Core message loop with Claude client
Custom Tools✅✅Tool definitions with input schemas and handlers
MCP Integration✅✅Model Context Protocol server configuration
Hook System✅✅Pre/post tool use hooks for validation
Streaming✅✅Streaming response support
Multi-turn✅✅Conversation history management
Error Recovery✅✅Retry logic and error handling patterns

Data Flow

sequenceDiagram
    participant Dev as Developer
    participant Cmd as /new-sdk-app
    participant FS as File System
    participant VPY as verifier-py
    participant VTS as verifier-ts

    Dev->>Cmd: /new-sdk-app
    Cmd->>Dev: What language? (Python / TypeScript)
    Dev->>Cmd: Python
    Cmd->>Dev: Project name?
    Dev->>Cmd: my-agent
    Cmd->>Dev: Features? (Tools, MCP, Hooks)
    Dev->>Cmd: Tools + MCP
    Cmd->>FS: Create project directory
    Cmd->>FS: Write pyproject.toml
    Cmd->>FS: Write src/agent.py
    Cmd->>FS: Write src/tools.py
    Cmd->>FS: Write src/mcp_config.py
    Cmd->>FS: Write README.md
    Note over Cmd: Scaffolding complete
    Cmd->>VPY: Verify Python project
    VPY->>FS: Check file structure
    VPY->>VPY: Create venv, pip install
    VPY->>VPY: Run mypy type check
    VPY->>VPY: Dry run agent loop
    VPY-->>Cmd: Verification report (pass/fail)
    Cmd-->>Dev: Project ready with report

Error Handling

The scaffolding and verification pipeline handles errors at each stage:

StageErrorRecovery
ScaffoldingDirectory already existsPrompt user: overwrite, rename, or cancel
ScaffoldingInvalid project nameSuggest sanitized name, re-prompt
VerificationDependency install failsReport missing packages, suggest manual fixes
VerificationType check errorsList specific errors with file:line, suggest corrections
VerificationAgent loop failsReport error trace, check API key configuration

Verification Report Format

## Verification Report: my-agent (Python)

| Check | Status | Details |
|-------|--------|---------|
| File structure | ✅ Pass | All expected files present |
| Dependencies | ✅ Pass | pip install completed (12 packages) |
| Import resolution | ✅ Pass | All imports resolve correctly |
| Type checking | ⚠️ Warn | 2 mypy warnings (non-blocking) |
| Agent loop | ✅ Pass | Dry run completed successfully |

**Result: READY** — Project is ready for development.

Interactions

ModuleInterfaceData Exchanged
Claude Agent SDK (Python)anthropic packageScaffolded code imports and configures the Python Agent SDK
Claude Agent SDK (TypeScript)@anthropic-ai/sdkScaffolded code imports and configures the TypeScript Agent SDK
File SystemWrite toolCreates project directory, source files, configs, and dependencies
Package Managerspip / npm / pnpmVerifiers install dependencies to test resolution
Type Checkersmypy / tscVerifiers run type checking as part of validation

Scaffolded Project Structure

🐍 Python Project

  • pyproject.toml — Dependencies and project metadata
  • src/agent.py — Main agent loop with Claude client
  • src/tools.py — Tool definitions and handlers
  • src/mcp_config.py — MCP server configuration
  • tests/test_agent.py — Basic agent tests
  • README.md — Getting started guide

📘 TypeScript Project

  • package.json — Dependencies and scripts
  • tsconfig.json — TypeScript configuration
  • src/agent.ts — Main agent loop with Claude client
  • src/tools.ts — Tool definitions and handlers
  • src/mcp-config.ts — MCP server configuration
  • tests/agent.test.ts — Basic agent tests
  • README.md — Getting started guide

Configuration Reference

ParameterDefaultDescription
language(prompted)Target language: python or typescript
project_name(prompted)Name for the generated project directory
features[]Optional features to include: tools, mcp, hooks
output_dir./Parent directory for the scaffolded project
verifier.modelsonnetModel used by verifier agents
verifier.toolsBash,Read,GrepTools available to verifier agents
python.min_version3.10Minimum Python version in pyproject.toml
typescript.targetES2022TypeScript compilation target
sdk.versionlatestClaude Agent SDK version to pin in dependencies

Directory Map

Source tree for Agent SDK Dev
agent-sdk-dev/
├── .claude-plugin/plugin.json          ← Plugin manifest
├── README.md                           ← Usage documentation
├── commands/
│   └── new-sdk-app.md                  ← Interactive scaffolding command
└── agents/
    ├── agent-sdk-verifier-py.md        ← Python project verifier
    └── agent-sdk-verifier-ts.md        ← TypeScript project verifier