Agent skill
creating-sdk-apps
This skill should be used when the user asks to "create an agent SDK app", "build a Claude Agent SDK project", "set up a new SDK application", "scaffold an agent app", "create a new agent", or needs guidance on initializing, configuring, and building applications with the Claude Agent SDK in TypeScript or Python.
Install this agent skill to your Project
npx add-skill https://github.com/jawhnycooke/claude-plugins/tree/main/plugins/agent-sdk-dev/skills/creating-sdk-apps
SKILL.md
Creating Claude Agent SDK Applications
Guide the creation of new Claude Agent SDK applications from initial requirements gathering through project setup, implementation, verification, and getting-started documentation.
Reference Documentation
Before starting, review the official documentation for accurate, up-to-date guidance:
- Overview: https://docs.claude.com/en/api/agent-sdk/overview
- SDK reference (based on language choice):
- Relevant guides: Streaming vs Single Mode, Permissions, Custom Tools, MCP integration, Subagents, Sessions
Use WebFetch to read these pages. Always check for and use the latest package versions via WebSearch before installation.
Requirements Gathering
Ask these questions one at a time, waiting for each response before asking the next. Skip any already answered via arguments.
- Language: TypeScript or Python?
- Project name: What should the project be called?
- Agent type (skip if #2 was detailed enough): What kind of agent? Examples:
- Coding agent (SRE, security review, code review)
- Business agent (customer support, content creation)
- Custom agent (user describes their use case)
- Starting point: Minimal "Hello World", basic agent with common features, or specific example?
- Tooling choice: Confirm package manager and tools (npm/pnpm/bun for TypeScript; pip/poetry for Python)
Setup Plan
Based on answers, create a plan covering:
Project Initialization
- Create project directory (if it does not exist)
- Initialize package manager:
- TypeScript:
npm init -ywithtype: "module", scripts including "typecheck" - Python:
requirements.txtorpoetry init
- TypeScript:
- Add configuration files:
- TypeScript:
tsconfig.jsonwith proper SDK settings - Python: Config files if needed
- TypeScript:
Version Check
- Check npm/PyPI for the latest version before installing
- TypeScript: https://www.npmjs.com/package/@anthropic-ai/claude-agent-sdk
- Python: https://pypi.org/project/claude-agent-sdk/
- Inform the user which version is being installed
SDK Installation
- TypeScript:
npm install @anthropic-ai/claude-agent-sdk@latest - Python:
pip install claude-agent-sdk - Verify installed version after installation
Starter Files
- TypeScript: Create
index.tsorsrc/index.tswith a basic query example - Python: Create
main.pywith a basic query example - Include proper imports and basic error handling
- Use modern syntax from the latest SDK version
Environment Setup
- Create
.env.examplewithANTHROPIC_API_KEY=your_api_key_here - Add
.envto.gitignore - Explain how to get an API key from https://console.anthropic.com/
Optional .claude Directory
- Offer to create
.claude/directory for agents, commands, and settings - Ask if example subagents or slash commands are desired
Implementation
After gathering requirements and getting user confirmation:
- Check for latest package versions
- Execute setup steps
- Create all necessary files
- Install dependencies (always use latest stable versions)
- Verify installed versions and inform the user
- Create a working example based on agent type
- Add helpful comments explaining each part
Verification
VERIFY THE CODE WORKS BEFORE FINISHING.
- TypeScript: Run
npx tsc --noEmitand fix ALL type errors until clean - Python: Verify imports and check for syntax errors
- Do NOT consider setup complete until verification passes
After manual verification, launch the appropriate verifier agent:
- TypeScript: agent-sdk-verifier-ts
- Python: agent-sdk-verifier-py
Review the verification report and address any issues.
Getting Started Guide
Provide the user with:
- How to run:
npm startorpython main.py - How to set API key: Environment variable setup
- Useful resources: Links to SDK documentation
- Common next steps: Customize system prompt, add custom tools via MCP, configure permissions, create subagents
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
demonstrating-skill-format
Provides a reference template and structural guide for creating Claude Code plugin skills. Activates when the user asks about skill development patterns, requests a skill template, or wants to understand the SKILL.md format and frontmatter options.
coauthoring-documents
Guides collaborative creation of structured documents through a three-stage workflow of context gathering, iterative refinement, and reader testing. Activates when the user drafts documentation, proposals, technical specs, or decision documents that benefit from structured co-authoring.
processing-pdfs
Reads, creates, merges, splits, and edits PDF files, including text and table extraction, form filling, OCR on scanned documents, and watermarking. Activates when the user works with .pdf files or requests any PDF manipulation task.
editing-word-documents
Reads, creates, edits, and formats Word documents (.docx files), including tracked changes, comments, and template-based generation. Activates when the user works with .docx files or requests document authoring, redlining, or text extraction from Word documents.
analyzing-spreadsheets
Creates, edits, and analyzes Excel spreadsheets (.xlsx, .xlsm, .csv), including formula-based calculations, cell formatting, financial modeling, and data analysis with pandas and openpyxl. Activates when the user works with spreadsheet files or requests Excel-related tasks.
creating-presentations
Creates, edits, and analyzes PowerPoint presentations (.pptx files), including slide design, chart and table insertion, HTML-to-PPTX conversion, and template-based generation. Activates when the user works with .pptx files or requests presentation authoring.
Didn't find tool you were looking for?