Unified agent application scaffolding across 5 harnesses: Anthropic, Cursor, OpenAI, OpenCode, and Pi. Interactive project generator with live SDK docs, per-harness code patterns, and built-in verification. Use when someone says "create an agent app", "new SDK project", "build with [harness] SDK", "scaffold agent", or wants to verify an existing agent setup.
Default output: return only the result, blockers, and required evidence. Omit preambles, process narration, repeated context, confidence scores, and follow-up offers. Use at most five bullets unless a required artifact or schema needs more.
Agents SDK Dev
Unified agent scaffolding and verification. One interactive flow, per-harness SDK
detail, built-in verification.
Always fetch the latest live docs via WebFetch or WebSearch before generating
code. SDK surfaces evolve; the reference file is a baseline, not a substitute for
current documentation.
Check for latest versions before installing. Check the package registry
(npm, PyPI) and verify the version installs without errors.
Anthropic Agent SDK API surface, patterns, code examples
references/cursor-sdk.md
Cursor TypeScript SDK API surface, patterns, traps
references/openai-agents-sdk.md
OpenAI Agents SDK API surface, handoffs, tracing
references/opencode-sdk.md
OpenCode local SDK patterns and session management
references/pi-cli-bridge.md
Pi CLI bridge, subprocess patterns, MCP subagent tools
Voice and Posture
This skill helps the user build agent applications. It is not the place to
validate, congratulate, or sell any SDK as a choice. The user's intent is the
input; your job is execution.
Ask questions one at a time. Do not batch questions. Respect the user's time.
When the user specifies a harness, load the reference file and follow its
patterns. When the user asks to verify, run the verification checklist. When
the user asks for help with an existing project, skip to the relevant step.
1---2name: agents-sdk-dev3description: Unified agent application scaffolding across 5 harnesses: Anthropic, Cursor, OpenAI, OpenCode, and Pi. Interactive project generator with live SDK docs, per-harness code patterns, and built-in verification. Use when someone says "create an agent app", "new SDK project", "build with [harness] SDK", "scaffold agent", or wants to verify an existing agent setup.4---56Default output: return only the result, blockers, and required evidence. Omit preambles, process narration, repeated context, confidence scores, and follow-up offers. Use at most five bullets unless a required artifact or schema needs more.78# Agents SDK Dev910Unified agent scaffolding and verification. One interactive flow, per-harness SDK11detail, built-in verification.1213## Supported Harnesses1415| Harness | SDK Package | Languages | Runtime |16|---------|------------|-----------|---------|17| Anthropic | `@anthropic-ai/claude-agent-sdk` / `claude-agent-sdk` | TS, Python | API |18| Cursor | `@cursor/sdk` | TS | Local + Cloud |19| OpenAI | `@openai/agents` / `openai-agents` | TS, Python | API |20| OpenCode | `opencode` | TS | Local |21| Pi | CLI bridge (`pi -p`) | Any | Local subprocess |2223## Flow2425```26Gather Requirements → Load SDK Reference → Setup Plan → Implement → Verify27```2829---3031## Step 1: Gather Requirements3233Ask these questions **one at a time**. Wait for the answer before asking the next.34Skip any the user already provided via arguments.3536### 1. Harness (ask first)3738"Which harness are you targeting?"3940- Anthropic (Claude Agent SDK)41- Cursor SDK42- OpenAI (Agents SDK)43- OpenCode44- Pi (CLI bridge)4546If the user's request implies a harness ("build with claude", "cursor agent"),47infer it and confirm.4849### 2. Language (ask second)5051"TypeScript or Python?"5253- Skip if harness only supports one language (Cursor = TS, OpenCode = TS, Pi = any)54- Anthropic and OpenAI support both5556### 3. Project name (ask third)5758"What would you like to name your project?"5960- Use as directory name and package name61- If provided via argument, skip6263### 4. Agent type (ask fourth)6465"What kind of agent are you building?"6667- **Coding agent**: code review, security scan, SRE, debugging68- **Business agent**: customer support, content generation, data processing69- **Research agent**: multi-step investigation, synthesis, competitive analysis70- **Custom**: describe your use case7172### 5. Starting point (ask fifth)7374"Would you like:"7576- **Minimal**: Hello World, single agent, no tools77- **Basic**: Agent with tools, error handling, streaming78- **Full**: Multi-agent with handoffs, verification loop, state persistence7980### 6. Tooling (confirm)8182Confirm the package manager:8384- TS: npm / yarn / pnpm / bun (prefer bun if `bun.lock` exists)85- Python: pip / poetry / uv (prefer uv if `uv.lock` exists)86- Respect existing lockfiles in the target directory8788---8990## Step 2: Load SDK Reference9192Based on the harness choice, read the appropriate reference file from this93skill's `references/` directory:9495| Harness | Reference File | Official Docs |96|---------|---------------|---------------|97| Anthropic | `references/anthropic-sdk.md` | https://docs.anthropic.com/en/docs/agents-and-tools/claude-agent-sdk |98| Cursor | `references/cursor-sdk.md` | https://docs.cursor.com/tools/sdk |99| OpenAI | `references/openai-agents-sdk.md` | https://openai.github.io/openai-agents-python/ |100| OpenCode | `references/opencode-sdk.md` | Package types / README |101| Pi | `references/pi-cli-bridge.md` | `pi --help` / local examples |102103**Always fetch the latest live docs** via WebFetch or WebSearch before generating104code. SDK surfaces evolve; the reference file is a baseline, not a substitute for105current documentation.106107**Check for latest versions** before installing. Check the package registry108(npm, PyPI) and verify the version installs without errors.109110---111112## Step 3: Setup Plan113114Present a concise plan covering:1151161. **Project init**: directory, package manager, config files1172. **SDK install**: exact install command with latest version1183. **Starter files**: entry point with basic agent setup matching agent type1194. **Environment**: `.env.example`, `.gitignore`, API key instructions1205. **Optional**: harness-specific directory structure, example tools, README121122Get user confirmation before proceeding.123124---125126## Step 4: Implementation127128Execute the confirmed plan:1291301. Check for latest package versions (WebSearch if needed)1312. Create project directory and initialize package manager1323. Install SDK and dependencies at latest stable versions1334. Create starter files based on agent type and starting point1345. Add environment config (`.env.example`, `.gitignore`)1356. Verify installed version matches expectation1367. Add a README with setup and run instructions137138### Code requirements139140- Proper imports from the correct SDK package141- Type safety (TS: strict mode, Python: type hints)142- Error handling around API calls (rate limits, auth, transient errors)143- No hardcoded secrets — all keys via env vars144- Modern syntax compatible with latest SDK version145- Comments explaining the SDK-specific parts146- The shared workflow contract where applicable (see below)147148---149150## Step 5: Verification151152After all files are created and dependencies installed:153154### TypeScript projects155156```bash157npx tsc --noEmit158```159160Fix ALL type errors. Do not consider setup complete until this passes cleanly.161162### Python projects163164```bash165python -c "import <sdk_package>"166```167168Verify imports resolve and no syntax errors exist.169170### Universal verification checklist171172Run through these checks regardless of harness:173174- [ ] SDK installed and importable at the correct version175- [ ] Package manifest has correct entries (name, type, scripts)176- [ ] Config files match SDK requirements (ESM, tsconfig, pyproject, etc.)177- [ ] API key setup documented (`.env.example` exists, `.env` in `.gitignore`)178- [ ] No hardcoded secrets in any source file179- [ ] Agent initialization follows SDK-documented patterns180- [ ] Error handling covers: rate limits, auth failures, network errors181- [ ] README includes: setup steps, how to run, key concepts link182- [ ] Project compiles/runs without errors183184### Verification report format185186```187**Status**: PASS | PASS WITH WARNINGS | FAIL188189**Critical Issues**: (blockers, runtime failures, type errors)190**Warnings**: (suboptimal patterns, missing features)191**Passed**: (what's correct)192**Recommendations**: (specific improvements with SDK doc links)193```194195---196197## Post-setup Guide198199Provide the user:2002011. **How to set their API key** (copy from `.env.example`)2022. **How to run the agent** (exact command)2033. **Key concepts** (system prompts, tools, permissions, MCP, handoffs)2044. **SDK reference link** (official docs URL)2055. **Common next steps**:206 - Customize the system prompt207 - Add custom tools208 - Configure permissions209 - Add MCP server integration210 - Implement handoffs (multi-agent)211 - Add streaming output212213---214215## Harness Quick Reference216217### Anthropic218219- **npm**: `@anthropic-ai/claude-agent-sdk`220- **pip**: `claude-agent-sdk`221- **Docs**: https://docs.anthropic.com/en/docs/agents-and-tools/claude-agent-sdk222- **Key APIs**: Agent, Session, Tool, MCP Server, Streaming223- **Local example**: `agents/research-runner/anthropic/runner.ts`224- **Reference**: `references/anthropic-sdk.md`225226### Cursor227228- **npm**: `@cursor/sdk`229- **Docs**: https://docs.cursor.com/tools/sdk230- **Key APIs**: `Agent.create()`, `Agent.prompt()`, `Agent.resume()`, streaming231- **Local example**: `agents/research-runner/cursor/runner.ts`232- **Reference**: `references/cursor-sdk.md`233234### OpenAI235236- **npm**: `@openai/agents`237- **pip**: `openai-agents`238- **Docs**: https://openai.github.io/openai-agents-python/239- **Key APIs**: Agent, Runner, Handoff, Tool, Guard, Tracing240- **Local example**: `agents/research-runner/codex/runner.ts`241- **Reference**: `references/openai-agents-sdk.md`242243### OpenCode244245- **npm**: `opencode` (local SDK)246- **Key APIs**: Prompt sessions, local execution, skill loading247- **Local example**: `agents/research-runner/opencode/runner.ts`248- **Reference**: `references/opencode-sdk.md`249250### Pi251252- **No SDK package**: CLI bridge via `pi -p "prompt"`253- **Subprocess**: Spawn `pi` with arguments, capture stdout/stderr254- **MCP**: In-session subagent tools (Agent, crew_agent)255- **Local example**: `agents/research-runner/pi/runner.ts`256- **Reference**: `references/pi-cli-bridge.md`257258---259260## Shared Workflow Contract261262All scaffolded agents that integrate with the ai-eng-system runner framework263should expose this contract:264265```ts266type WorkflowInput = {267 goal: string;268 cwd?: string;269 model?: string;270 maxIterations?: number;271 statePath?: string;272};273274type WorkflowResult = {275 status: "success" | "blocked" | "failed";276 summary: string;277 artifacts: string[];278 nextSteps?: string[];279};280```281282Shared types: `agents/research-runner/shared/workflow-contract.ts`283284---285286## Reference Files287288| File | Content |289|------|---------|290| `references/anthropic-sdk.md` | Anthropic Agent SDK API surface, patterns, code examples |291| `references/cursor-sdk.md` | Cursor TypeScript SDK API surface, patterns, traps |292| `references/openai-agents-sdk.md` | OpenAI Agents SDK API surface, handoffs, tracing |293| `references/opencode-sdk.md` | OpenCode local SDK patterns and session management |294| `references/pi-cli-bridge.md` | Pi CLI bridge, subprocess patterns, MCP subagent tools |295296---297298## Voice and Posture299300This skill helps the user **build** agent applications. It is not the place to301validate, congratulate, or sell any SDK as a choice. The user's intent is the302input; your job is execution.303304Ask questions one at a time. Do not batch questions. Respect the user's time.305306When the user specifies a harness, load the reference file and follow its307patterns. When the user asks to verify, run the verification checklist. When308the user asks for help with an existing project, skip to the relevant step.
Run npx skillmds add v1truv1us-ai-eng-system/agents-sdk-dev in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Unified agent application scaffolding across 5 harnesses: Anthropic, Cursor, OpenAI, OpenCode, and Pi. Interactive project generator with live SDK docs, per-harness code patterns, and built-in verification. Use when someone says "create an agent app", "new SDK project", "build with [harness] SDK", "scaffold agent", or wants to verify an existing agent setup. It is listed under AI & ML on SkillMD.
This skill has not completed SkillMD's automated safety review yet. Capability flags: makes network calls. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
v1truv1us (@v1truv1us-ai-eng-system) published this skill. Their other Agent Skills are listed on their SkillMD profile.