Back to Skills

claude-agent-sdk-agent-creation

verified

Use when creating or configuring Claude AI agents using the Agent SDK. Covers agent initialization, configuration, and basic setup patterns.

View on GitHub

Marketplace

han

TheBushidoCollective/han

Plugin

jutsu-claude-agent-sdk

Technique

Repository

TheBushidoCollective/han
60stars

jutsu/jutsu-claude-agent-sdk/skills/agent-creation/SKILL.md

Last Verified

January 24, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/TheBushidoCollective/han/blob/main/jutsu/jutsu-claude-agent-sdk/skills/agent-creation/SKILL.md -a claude-code --skill claude-agent-sdk-agent-creation

Installation paths:

Claude
.claude/skills/claude-agent-sdk-agent-creation/
Powered by add-skill CLI

Instructions

# Claude Agent SDK - Agent Creation

Creating and configuring AI agents using the Claude Agent SDK with TypeScript.

## Core Agent Initialization

### Basic Agent Creation

```typescript
import { Agent } from '@anthropic-ai/claude-agent-sdk';

const agent = new Agent({
  model: 'claude-3-5-sonnet-20241022',  // Latest model
  systemPrompt: 'You are a helpful assistant specialized in...',
  settingSources: ['project'],  // Load .claude/CLAUDE.md from project
  allowedTools: ['read_file', 'write_file', 'list_files'],
});
```

## Configuration Options

### System Prompts

```typescript
// Direct system prompt
const agent = new Agent({
  systemPrompt: 'You are an expert code reviewer...',
});

// Load from CLAUDE.md
const agent = new Agent({
  settingSources: ['project'],  // Loads ./.claude/CLAUDE.md
});

// User-level memory
const agent = new Agent({
  settingSources: ['user'],  // Loads ~/.claude/CLAUDE.md
});
```

### Tool Permissions

```typescript
// Allow specific tools
const agent = new Agent({
  allowedTools: [
    'read_file',
    'write_file',
    'list_files',
    'grep',
    'bash',
  ],
});

// Block specific tools
const agent = new Agent({
  disallowedTools: ['bash', 'web_search'],
});

// Permission modes
const agent = new Agent({
  permissionMode: 'strict',  // Require explicit approval
});
```

## Agent Directory Structure

### Required Structure

```
project/
├── .claude/
│   ├── CLAUDE.md              # Project memory
│   ├── agents/
│   │   └── specialist.md      # Subagent definitions
│   ├── skills/
│   │   └── my-skill/
│   │       └── SKILL.md       # Skill definitions
│   └── commands/
│       └── my-command.md      # Slash commands
└── src/
    └── index.ts               # Your code
```

## Authentication

### Environment Variables

```bash
# Anthropic API (primary)
export ANTHROPIC_API_KEY="sk-ant-..."

# Alternative providers
export AWS_ACCESS_KEY_ID="..."
export AWS_SECRET_ACCESS_KEY="..."
export AWS_REGION="us-east-1"

# Google Vertex AI
e

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
3519 chars

Issues Found:

  • name_directory_mismatch