Claude Agent
Description
A comprehensive collection of examples demonstrating the Claude Agent SDK capabilities, from basic usage to advanced control mechanisms.
Installation
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open the source below and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
README
Claude Agent SDK Examples
A comprehensive collection of examples demonstrating the Claude Agent SDK capabilities, from basic usage to advanced control mechanisms.
📦 Installation
npm install
npm run build # Compile TypeScript
📚 Documentation
- Claude Agent SDK Guide - Deep dive into SDK internals
- Official Documentation
🎯 Examples
1. Simple Example (`src/simple-example.ts`)
A beginner-friendly introduction to the Claude Agent SDK.
**Features:**
- Basic agent initialization
- Message handling
- Cost tracking
- Token usage monitoring
**Usage:**
npm run simple
# or
npx tsx src/simple-example.ts
**What it does:** Creates a TODO list application demonstrating basic agent capabilities with limited tools (FileWrite, FileRead).
2. Interactive Agent (`src/interactive-agent.ts`)
Advanced example showing how to steer and intervene in agent execution.
**Features:**
- Bidirectional streaming communication - Send messages during execution
- Real-time control methods - interrupt(), changeModel(), setPermissionMode()
- Dynamic permissions - Runtime permission management
- Hook system - Intervention points for monitoring and control
- AbortController - External cancellation
- Interactive CLI - Command-line interface for control
**Usage:**
# Run automated demonstration
npm run interactive:demo
# or
npx tsx src/interactive-agent.ts demo
# Run interactive CLI
npm run interactive:cli
# or
npx tsx src/interactive-agent.ts cli
**CLI Commands:**
/msg- Send message to agent/model- Change model (opus/sonnet/haiku)/perm- Toggle permission (writes/reads/commands)/interrupt- Interrupt current execution/pause- Pause execution/resume- Resume execution/history- Show execution history/stop- Stop and exit
3. Example Agent (`src/example-a
Related Skills
Awesome Go
A curated list of awesome Go frameworks, libraries and software
Development next.js
| The React Framework | 138360 | 1503 | 1 |
Development sharing-skills
skill for guidance.
Development root-cause-tracing
Use when errors occur deep in execution and you need to trace back to find the original trigger.
Development Template Skill
Minimal skeleton for a new skill project structure.
Development Third-party Notices
THE FOLLOWING SETS FORTH ATTRIBUTION NOTICES FOR THIRD PARTY SOFTWARE THAT MAY BE CONTAINED IN PORTIONS OF THI
Development