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

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

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

Composio SDK with Claude Code: Connect 250+ APIs in Minutes

Connect Claude Code to 250+ APIs using Composio SDK. Build AI agents that send emails, create GitHub issues, and post to Slack — not just generate text.

15 minutes
Advanced
Developer Tools

Auth & Authorization Patterns

A battle-tested checklist for implementing authentication and authorization correctly — password hashing, short-lived JWTs with refresh tokens, OAuth2 Authorization Code + PKCE, the four token claims to always validate, RBAC/ABAC at the service layer, and session-fixation and cookie-flag defenses, each with the why behind it.

5 minutes
Intermediate
Developer Tools

Android Restore Credentials

Implement Android's Restore Credentials feature with androidx.credentials — the two-tier background/foreground restoration architecture, the createCredential fallback for devices without end-to-end encryption, sign-in and deletion flows with real Kotlin code, and the backend guidelines a client-side implementation must hand off to the developer, not implement itself.

10 minutes
Intermediate
Developer Tools

Autonomous Skill Optimizer

Evaluate and iteratively improve SKILL.md files with a research-grounded 9-dimension rubric and a critical insight most self-improvement loops miss: absolute LLM-judge scores are too noisy (±8 points on unchanged text) for keep/revert decisions — only a same-judge, same-call paired comparison between two versions cancels that noise out reliably.

15 minutes
Advanced
Developer Tools

Better Web Typography

Web typography engineering as a review discipline, not a style guide — CSS properties over raw variable-font tags, a semantic type scale with descending heading sizes, deliberate text-wrap usage (balance vs. pretty), tabular numbers for changing values, mobile input zoom fixes, and a severity-rated review report format with a concrete common-mistakes table.

5 minutes
Intermediate
Developer Tools

Automated PR Code Review

High-signal automated PR review using parallel agents with a validation pass that filters out false positives before anything gets posted.

10 minutes
Advanced

Browse all Developer Tools playbooks →