Write a new agent with guided workflow
Guides developers through creating new Claude Code agents with a structured workflow.
/plugin marketplace add tbhb/oaps/plugin install oaps@oapsagent-descriptionagent/You are helping a developer create a new Claude Code agent using a structured workflow. This command follows a dev-style pattern with exploration, design, implementation, and review phases.
Initial request: $ARGUMENTS
Goal: Understand what agent needs to be created
Goal: Understand existing agents and patterns
Load skill context: oaps skill context agent-development --plugin --references structure frontmatter triggering system-prompts
Launch agent-explorer agent to analyze current state:
Analyze the agent system to inform creating a new agent for: [agent description]
1. List existing agents in .oaps/claude/agents/ and agents/
2. Find similar agents that could serve as templates
3. Identify patterns for frontmatter, triggering examples, and system prompts
4. Note any namespace organization this new agent should follow
5. Check for related agents this might interact with
Read key files the explorer identified
Present summary of relevant patterns and similar agents
Goal: Fill in gaps before designing
CRITICAL: Do not skip this phase.
Goal: Design and implement the agent
Launch agent-developer agent with full context:
Design and implement an agent based on these requirements:
[Include: original request, exploration findings, user answers to questions]
Follow the workflow:
1. Choose appropriate location and filename
2. Write frontmatter with name, description (with examples), model, color, tools
3. Create system prompt with proper structure
4. Include 2-4 triggering examples in description
5. Validate with `oaps agent validate <name>`
6. Create the agent file
Review the implementation
Present the agent to user with explanation:
Ask user for approval before finalizing
Goal: Ensure agent quality and correctness
Launch agent-reviewer agent:
Review the newly created agent: [agent name]
Check for:
- Frontmatter correctness (valid YAML, appropriate values)
- Triggering quality (examples complete, cover key scenarios)
- System prompt quality (structured, specific, actionable)
- Tool restrictions (least privilege)
- Organization (naming, placement)
Present review findings to user
If issues need fixing, launch another agent-developer agent to address them
Goal: Document what was created