Agent Development

Installation
Summary

Comprehensive guide for building autonomous agents in Claude Code plugins with structured frontmatter, system prompts, and triggering conditions.

  • Agents are autonomous subprocesses defined in markdown files with YAML frontmatter; use them for multi-step independent tasks, commands for user-initiated actions
  • Required frontmatter fields: name (3–50 lowercase-hyphenated characters), description (with 2–4 concrete triggering examples), model (inherit/sonnet/opus/haiku), color (blue/cyan/green/yellow/magenta/red), optional tools array for least-privilege access
  • System prompt design uses second-person voice with clear responsibilities, step-by-step process, quality standards, output format, and edge case handling; keep under 10,000 characters
  • Description field is critical: must specify triggering conditions, include <example> blocks with context, user request, assistant response, and <commentary> explaining why the agent triggers
  • Validation rules enforce identifier format, description length (10–5,000 chars), and system prompt structure; includes AI-assisted generation templates and testing utilities for triggering verification
SKILL.md

Agent Development for Claude Code Plugins

Overview

Agents are autonomous subprocesses that handle complex, multi-step tasks independently. Understanding agent structure, triggering conditions, and system prompt design enables creating powerful autonomous capabilities.

Key concepts:

  • Agents are FOR autonomous work, commands are FOR user-initiated actions
  • Markdown file format with YAML frontmatter
  • Triggering via description field with examples
  • System prompt defines agent behavior
  • Model and color customization

Agent File Structure

Complete Format

---
Related skills

More from anthropics/claude-code

Installs
GitHub Stars
122.7K
First Seen