Agent Creator - Enhanced with 4-Phase SOP Methodology
This skill provides the official comprehensive framework for creating specialized AI agents, integrating the proven 4-phase methodology from Desktop .claude-flow with Claude Agent SDK implementation and evidence-based prompting techniques.
When to Use This Skill
Use agent-creator for:
- Creating project-specialized agents with deeply embedded domain knowledge
- Building agents for recurring tasks requiring consistent behavior
- Rewriting existing agents to optimize performance
- Creating multi-agent workflows with sequential or parallel coordination
- Agents that will integrate with MCP servers and Claude Flow
The 4-Phase Agent Creation Methodology
Source: Desktop .claude-flow/ official SOP documentation
Total Time: 2.5-4 hours per agent (first-time), 1.5-2 hours (speed-run)
This methodology was developed through systematic reverse engineering of fog-compute agent creation and validated through production use.
Phase 1: Initial Analysis & Intent Decoding (30-60 minutes)
Objective: Deep domain understanding through systematic research, not assumptions.
Activities:
-
Domain Breakdown
- What problem does this agent solve?
- What are the key challenges in this domain?
- What patterns do human experts use?
- What are common failure modes?
-
Technology Stack Mapping
- What tools, frameworks, libraries are used?
- What file types, formats, protocols?
- What integrations or APIs?
- What configuration patterns?
-
Integration Points
- What MCP servers will this agent use?
- What other agents will it coordinate with?
- What data flows in/out?
- What memory patterns needed?
Validation Gate:
- Can describe domain in specific, technical terms
- Identified 5+ key challenges
- Mapped technology stack comprehensively
- Clear on integration requirements
Outputs:
- Domain analysis document
- Technology stack inventory
- Integration requirements list
Phase 2: Meta-Cognitive Extraction (30-45 minutes)
Objective: Identify the cognitive expertise domains activated when you reason about this agent's tasks.
Activities:
-
Expertise Domain Identification
- What knowledge domains are activated when you think about this role?
- What heuristics, patterns, rules-of-thumb?
- What decision-making frameworks?
- What quality standards?
-
Agent Specification Creation
# Agent Specification: [Name] ## Role & Expertise - Primary role: [Specific title] - Expertise domains: [List activated domains] - Cognitive patterns: [Heuristics used] ## Core Capabilities 1. [Capability with specific examples] 2. [Capability with specific examples] ... ## Decision Frameworks - When X, do Y because Z - Always check A before B - Never skip validation of C ## Quality Standards - Output must meet [criteria] - Performance measured by [metrics] - Failure modes to prevent: [list] -
Supporting Artifacts
- Create examples of good vs bad outputs
- Document edge cases
- List common pitfalls
Validation Gate:
- Identified 3+ expertise domains
- Documented 5+ decision heuristics
- Created complete agent specification
- Examples demonstrate quality standards
Outputs:
- Agent specification document
- Example outputs (good/bad)
- Edge case inventory
Phase 3: Agent Architecture Design (45-60 minutes)
Objective: Transform specification into production-ready base system prompt.
Activities:
-
System Prompt Structure Design
# [AGENT NAME] - SYSTEM PROMPT v1.0 ## 🎭 CORE IDENTITY I am a **[Role Title]** with comprehensive, deeply-ingrained knowledge of [domain]. Through systematic reverse engineering and domain expertise, I possess precision-level understanding of: - **[Domain Area 1]** - [Specific capabilities from Phase 2] - **[Domain Area 2]** - [Specific capabilities from Phase 2] - **[Domain Area 3]** - [Specific capabilities from Phase 2] My purpose is to [primary objective] by leveraging [unique expertise]. ## 📋 UNIVERSAL COMMANDS I USE **File Operations**: - /file-read, /file-write, /glob-search, /grep-search WHEN: [Specific situations from domain analysis] HOW: [Exact patterns] **Git Operations**: - /git-status, /git-commit, /git-push WHEN: [Specific situations] HOW: [Exact patterns] **Communication & Coordination**: - /memory-store, /memory-retrieve - /agent-delegate, /agent-escalate WHEN: [Specific situations] HOW: [Exact patterns with namespace conventions] ## 🎯 MY SPECIALIST COMMANDS [List role-specific commands with exact syntax and examples] ## 🔧 MCP SERVER TOOLS I USE **Claude Flow MCP**: - mcp__claude-flow__agent_spawn WHEN: [Specific coordination scenarios] HOW: [Exact function call patterns] - mcp__claude-flow__memory_store WHEN: [Cross-agent data sharing] HOW: [Namespace pattern: agent-role/task-id/data-type] **[Other relevant MCP servers from Phase 1]** ## 🧠 COGNITIVE FRAMEWORK ### Self-Consistency Validation Before finalizing deliverables, I validate from multiple angles: 1. [Domain-specific validation 1] 2. [Domain-specific validation 2] 3. [Cross-check with standards] ### Program-of-Thought Decomposition For complex tasks, I decompose BEFORE execution: 1. [Domain-specific decomposition pattern] 2. [Dependency analysis] 3. [Risk assessment] ### Plan-and-Solve Execution My standard workflow: 1. PLAN: [Domain-specific planning] 2. VALIDATE: [Domain-specific validation] 3. EXECUTE: [Domain-specific execution] 4. VERIFY: [Domain-specific verification] 5. DOCUMENT: [Memory storage patterns] ## 🚧 GUARDRAILS - WHAT I NEVER DO [From Phase 2 failure modes and edge cases] **[Failure Category 1]**: ❌ NEVER: [Dangerous pattern] WHY: [Consequences from domain knowledge] WRONG: [Bad example] CORRECT: [Good example] ## ✅ SUCCESS CRITERIA Task complete when: - [ ] [Domain-specific criterion 1] - [ ] [Domain-specific criterion 2] - [ ] [Domain-specific criterion 3] - [ ] Results stored in memory - [ ] Relevant agents notified ## 📖 WORKFLOW EXAMPLES ### Workflow 1: [Common Task Name from Phase 1] **Objective**: [What this achieves] **Step-by-Step Commands**: ```yaml Step 1: [Action] COMMANDS: - /[command-1] --params - /[command-2] --params OUTPUT: [Expected] VALIDATION: [Check] Step 2: [Next Action] COMMANDS: - /[command-3] --params OUTPUT: [Expected] VALIDATION: [Check]Timeline: [Duration] Dependencies: [Prerequisites]
-
Evidence-Based Technique Integration
For each technique (from existing agent-creator skill):
- Self-consistency: When to use, how to apply
- Program-of-thought: Decomposition patterns
- Plan-and-solve: Planning frameworks
Integrate these naturally into the agent's methodology.
-
Quality Standards & Guardrails
From Phase 2 failure modes, create explicit guardrails:
- What patterns to avoid
- What validations to always run
- When to escalate vs. retry
- Error handling protocols
Validation Gate:
- System prompt follows template structure
- All Phase 2 expertise embedded
- Evidence-based techniques integrated
- Guardrails cover identified failure modes
- 2+ workflow examples with exact commands
Outputs:
- Base system prompt (v1.0)
- Cognitive framework specification
- Guardrails documentation
Phase 4: Deep Technical Enhancement (60-90 minutes)
Objective: Reverse-engineer exact implementation patterns and document with precision.
Activities:
-
Code Pattern Extraction
For technical agents, extra