Home
cd ../playbooks
Developer ToolsIntermediate

Agent SDK App Builder

Scaffold new Claude Agent SDK applications in TypeScript or Python, and verify existing ones against official SDK patterns before you ship.

10 minutes
By Anthropic (Ashwin Bhat)Source
#agent-sdk#scaffolding#typescript#python#verification#official

You're staring at the Agent SDK docs trying to figure out the right project structure, which package version is current, and whether your setup actually follows best practices — or if it'll break in production. One wrong import and an afternoon disappears.

Who it's for: developers building with the Claude Agent SDK, teams starting new agent projects, engineers verifying an existing SDK app before deployment, developers migrating from ad-hoc API calls to the SDK

Example

"Set up a new customer support agent in TypeScript" → Interactive setup asking language, project name, agent type, and starting point, followed by SDK installation at the latest version, working example code, and an automatic verification pass before it's called done

CLAUDE.md Template

New here? 3-minute setup guide → | Already set up? Copy the template below.

Or install from your terminal:
npx ccplaybooks add agent-sdk-app-builder
# Agent SDK App Builder

## Your Role

You are my Claude Agent SDK development partner. You help me scaffold new Agent SDK applications in TypeScript or Python, and you verify existing ones against official SDK patterns before they ship.

## Reference Documentation

Before scaffolding anything, read the current official docs — the SDK moves fast and your training data may be stale:

1. Overview: https://docs.claude.com/en/api/agent-sdk/overview
2. Language reference (whichever I picked):

Get new playbooks like this one

One email a week with new Claude Code workflows. Free, like everything here.

No spam. Unsubscribe anytime.

README.md

What This Does

Scaffolds a new Claude Agent SDK application end to end — asking clarifying questions, checking for the latest SDK version, creating all necessary files, and running an automatic verification pass. Also works in reverse: point it at an existing SDK app and it audits the setup against official documentation patterns.


Quick Start

Step 1: Create a Project Folder

mkdir my-agent-project && cd my-agent-project

Step 2: Download the Template

Click Download above, then move the file into your project:

mv ~/Downloads/CLAUDE.md ./

Step 3: Start Building

claude

Then ask: "Set up a new Agent SDK application"

Claude will ask you one question at a time — language, project name, agent type, starting point, tooling preference — before writing anything.


Two Modes

Scaffold a new app

Interactive setup: language choice, project naming, agent type, starting point (minimal, basic, or use-case specific), and package manager preference. Claude checks npm/PyPI for the latest SDK version before installing — never from memory — then creates starter files, environment configuration, and runs type checking (TypeScript) or syntax verification (Python) before declaring the setup complete.

Verify an existing app

Ask "verify my Agent SDK application" and Claude runs a full audit: SDK version currency, environment configuration, correct SDK usage patterns, type safety, security (no hardcoded keys, .env gitignored), error handling, and documentation completeness. Returns PASS / PASS WITH WARNINGS / FAIL with specific fixes cited against official docs.


Tips & Best Practices

  • Always use the latest SDK version — the setup checks npm/PyPI before installing rather than trusting cached knowledge
  • Verify before deploying — run the verification audit before any production deploy, and again after any significant change
  • Keep API keys out of source — .env.example is created for you, with .env added to .gitignore automatically
  • Ask one question at a time — the interactive setup deliberately doesn't batch its questions, so answers stay unambiguous

Troubleshooting

TypeScript project has type errors after creation — the setup runs npx tsc --noEmit automatically; if errors persist, confirm you're on the latest SDK version and that tsconfig.json matches SDK requirements.

Python import errors on claude_agent_sdk — confirm dependencies are installed (pip install -r requirements.txt) and any virtual environment is activated.

Verification reports warnings — warnings don't block functionality, but review the SDK documentation references provided and address them before shipping.

$Related Playbooks

Developer Tools

Distinctive Frontend Design

Design lead guidance for building frontends that don't read as AI-generated — deliberate palette, typography, and layout choices grounded in the actual subject, with a built-in self-critique pass before you write code.

5 minutes
Intermediate
Developer Tools

Brandkit Generator: Premium Identity Board Creator

An image-direction rule set that produces a complete brand-guidelines board in one image: logo concept, color system, typography, and applications, grounded in brand strategy instead of random logo generation

5 minutes
Beginner
Developer Tools

Brutalist UI Skill: Industrial & Tactical Interface Design

A design language that forces Claude to build raw, mechanical interfaces — Swiss industrial print or CRT terminal telemetry, with rigid grids and zero rounded corners

5 minutes
Intermediate
Developer Tools

Programmatic Screen Capture

Capture screenshots programmatically on macOS — find window IDs, control application windows via AppleScript, and capture specific windows for documentation and visual workflows.

10 minutes
Intermediate
Developer Tools

Continue Claude Work

Recover actionable context from local .claude session artifacts and continue interrupted work — without running claude --resume — by inspecting history first.

10 minutes
Intermediate
Developer Tools

Network Issue Debugging

Apply falsification-first, layered isolation to pin down the responsible network layer for connection resets, SSE stalls, and fixed-time drops — instead of stacking assumptions.

20 minutes
Advanced
Developer Tools

Docs Cleaner

Consolidate redundant documentation while preserving all valuable content — merge overlapping files, reduce sprawl, and cut bloat without losing anything important.

10 minutes
Beginner
Developer Tools

AI Agent Builder

Build AI agents with tools, memory, and multi-step reasoning - ChatGPT, Claude, Gemini integration patterns

10 minutes
Advanced
Developer Tools

Browser Automation Assistant

Automate web browser interactions, scraping, testing, and workflow automation with Puppeteer/Playwright

10 minutes
Advanced
Developer Tools

Database Sync Manager

Automate database synchronization, replication, migration, and cross-platform data integration

10 minutes
Advanced
Developer Tools

Developer Presentation Builder

Create developer-focused presentations with live code demos and diagrams using Slidev.

10 minutes
Advanced
Developer Tools

DevOps Automation Assistant

DevOps and IT Ops automation - CI/CD, monitoring, incident management, and infrastructure workflows

10 minutes
Advanced

Browse all Developer Tools playbooks →