Create a new agent definition with proper frontmatter
/plugin marketplace add astoeffer/moodle-plugin-marketplace/plugin install plugin-builder@astoeffer-dev-plugins<agent-name> [plugin-path]pb/Create a new Claude Code agent with the name: $1 Target plugin path: $2 (defaults to current directory)
Validate agent name
Create agent file
Location: agents/$1.md
Generate template
---
name: $1
description: [Ask user - when should this agent be invoked and what does it do]
tools: Read, Grep, Glob, Bash
model: sonnet
permissionMode: default
skills: [Optional - which skills to auto-load]
---
# [Agent Role Title]
You are a [role description].
## Capabilities
[List what this agent can do]
## Process
[Step-by-step process the agent should follow]
## Checklist
[Verification checklist for the agent's work]
| Model | Best For |
|---|---|
sonnet | Default, balanced (recommended) |
opus | Complex reasoning, nuanced tasks |
haiku | Simple, fast tasks |
inherit | Use same model as main conversation |
| Mode | Behavior |
|---|---|
default | Normal permission flow |
acceptEdits | Auto-accept file edits |
bypassPermissions | Skip permission checks |
plan | Planning mode only |
After creation, verify:
agents/$1.mdname in frontmatterdescription in frontmatter