Documentation/Jutsu/Claude Agent Sdk
🎯

Claude Agent Sdk

v1.3.0

Validation and quality enforcement for Claude Agent SDK projects with TypeScript type checking and structure validation.

Installation

Install han binary (required for hooks to work):

curl -fsSL https://han.guru/install.sh | bash

Then install this plugin:

han plugin install jutsu-claude-agent-sdk

Overview

Validation and quality enforcement for Claude Agent SDK projects.

What This Jutsu Provides

Validation Hooks

  • TypeScript Type Checking: Validates types in SDK projects with tsc --noEmit
  • Structure Validation: Ensures correct .claude/ directory structure
    • Agents must be .md files in .claude/agents/
    • Skills must be SKILL.md in .claude/skills/{skill-name}/
    • Commands must be .md files in .claude/commands/

Skills

This jutsu provides the following skills:

  • agent-creation: Agent initialization, configuration, and setup patterns
  • tool-integration: Working with tools, permissions, and MCP servers
  • context-management: Managing agent memory and context

Installation

Install via the Han marketplace:

han plugin install jutsu-claude-agent-sdk

Or install manually:

claude plugin marketplace add thebushidocollective/han
claude plugin install jutsu-claude-agent-sdk@han

Usage

Once installed, this jutsu automatically validates your Claude Agent SDK projects:

  • When you finish a conversation with Claude Code
  • Before commits (when combined with git hooks)
  • Validates TypeScript types and SDK structure

What Gets Validated

TypeScript Validation

Runs tsc --noEmit to check:

  • Type correctness in agent configurations
  • Tool permission types
  • Setting source definitions
  • API authentication types

Structure Validation

Checks .claude/ directory compliance:

  • Agent files are Markdown (.md)
  • Skill files follow SKILL.md naming
  • Command files are Markdown
  • Proper directory structure

Requirements

  • Node.js 18+
  • TypeScript 5.0+
  • @anthropic-ai/claude-agent-sdk package

Example Project Structure

my-agent-project/
├── .claude/
│   ├── CLAUDE.md
│   ├── agents/
│   │   └── specialist.md
│   ├── skills/
│   │   └── my-skill/
│   │       └── SKILL.md
│   └── commands/
│       └── my-command.md
├── src/
│   └── index.ts
├── package.json
└── tsconfig.json

Contributing

See CONTRIBUTING.md for guidelines.

License

MIT License - See LICENSE for details.

Skills

Hooks

⚠

Token Usage Notice

Hooks run automatically during Claude Code sessions and their output is sent to the model for processing. This may increase token usage and associated costs. Consider disabling hooks you don't need via han-config.yml.

🛑

Stop

Runs when the main Claude Code agent has finished responding. Can verify task completion, check quality gates, or ensure documentation requirements are met before the session ends.

🛑

SubagentStop

Runs when a Claude Code subagent (Task tool call) has finished responding. Can validate subagent outputs, enforce quality standards, or trigger additional workflows after delegated tasks complete.