Skip to content

Creating plugins

Agents Skills
Context Isolated Shared
Scope Multi-step domain Single capability
Use Specialized tasks Knowledge patterns
Invoke @plugin:agent Auto by context
  • Use agent when: Complex task, needs isolation, multi-step workflow
  • Use skill when: Reference knowledge, patterns, coding standards

Isolated AI assistants with custom prompts, tools, models. Claude auto-routes based on description.

There are two ways to create an agent for your plugin:

Inside Claude Code, run:

@awl-general:MetaAgent create an agent for Docker deployments

This generates a complete agent config from description.

<details> <summary>See how

The agent config is a Markdown file with frontmatter and instructions:

File: `plugins/[plugin]/agents/[name].md`
```yaml
---
name: code-auditor
description: Security and performance code review. Use for PRs, vulnerabilities, optimization.
tools: Read, Grep, Glob, Bash
model: sonnet
---
# Purpose
Review code for security and performance.
## Instructions
1. Check OWASP Top 10
2. Find performance bottlenecks
3. Verify error handling
## Output Format
- Critical (security/perf)
- Warnings
- Suggestions
Field Purpose Values
name Identifier code-monkey
description Auto-routing trigger Specific use cases
tools Available tools Read, Write, Bash, Grep or omit for all
model Model sonnet, opus, haiku, inherit

Reusable knowledge patterns. Claude activates automatically based on context.

Structure:

plugins/[plugin]/skills/[name]/
├── SKILL.md # Required
└── references/ # Optional supporting docs

File: SKILL.md

---
name: django-queries
description: Django ORM optimization. Use for N+1 problems, select_related, prefetch_related.
---
# Query Optimization
## Patterns
- Use select_related for FK
- Use prefetch_related for M2M
- Avoid queries in loops
## Examples
[code examples]

Mention skills in agent context to specialize:

---
name: kotlin-developer
description: Kotlin/Android development specialist
tools: Read, Write, Edit, Bash
---
# Kotlin Developer
Use the kotlin-testing and android-architecture skills for best practices.

The agent loads those skills’ knowledge automatically when invoked.