/jutsu-claude-agent-sdk:claude-agent-sdk-agent-creationfrom jutsu-claude-agent-sdk
Creates and configures Claude AI agents using the Agent SDK, covering initialization, system prompts, tool permissions, and authentication.
Ships in jutsu-claude-agent-sdk. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Creating and configuring AI agents using the Claude Agent SDK with 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'],
});
// 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
});
// 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
});
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
# 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
export GOOGLE_APPLICATION_CREDENTIALS="/path/to/credentials.json"
# Azure
export AZURE_OPENAI_API_KEY="..."
export AZURE_OPENAI_ENDPOINT="..."
// Anthropic direct
const agent = new Agent({
apiKey: process.env.ANTHROPIC_API_KEY,
});
// Amazon Bedrock
const agent = new Agent({
provider: 'bedrock',
model: 'anthropic.claude-3-5-sonnet-20241022-v2:0',
});
// Good
const agent = new Agent({
model: 'claude-3-5-sonnet-20241022',
});
// Avoid: relying on default model
const agent = new Agent({});
// Good
const agent = new Agent({
settingSources: ['project'],
});
// Avoid: unclear memory source
const agent = new Agent({
systemPrompt: '...',
});
// Project-specific context
const projectAgent = new Agent({
settingSources: ['project'],
});
// User preferences
const userAgent = new Agent({
settingSources: ['user'],
});
// Bad
const agent = new Agent({
apiKey: 'sk-ant-hardcoded-key',
});
// Good
const agent = new Agent({
apiKey: process.env.ANTHROPIC_API_KEY,
});
// Bad: contradictory permissions
const agent = new Agent({
allowedTools: ['read_file', 'write_file'],
disallowedTools: ['read_file'], // Conflict!
});
// Good: clear permissions
const agent = new Agent({
allowedTools: ['read_file'],
});
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
3 skills in this plugin
/claude-agent-sdk-context-managementUse when managing agent context, memory, and conversation state in Claude AI agents using the Agent SDK./claude-agent-sdk-tool-integrationUse when integrating tools, permissions, and MCP servers with Claude AI agents using the Agent SDK.Other plugins' skills for the same job
npx claudepluginhub thedotmack/han --plugin jutsu-claude-agent-sdk