Agent creator enhanced skill

From majiayu000/claude-skill-registry-data · View interactive version

Agent creator enhanced skill is an AI agent skill from the GitHub repository majiayu000/claude-skill-registry-data. Creates specialized AI agents with optimized system prompts using the official 4-phase SOP methodology from Desktop .claude-flow, combined with evidence-based prompting techniques and Claude Agent SDK implementation. Use this skill when creating production-ready agents for specific domains, workflow

How to use this skill

Skill file

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:

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:

  1. Domain Breakdown
  1. Technology Stack Mapping
  1. Integration Points

Validation Gate:

Outputs:


Phase 2: Meta-Cognitive Extraction (30-45 minutes)

Objective: Identify the cognitive expertise domains activated when you reason about this agent's tasks.

Activities:

  1. Expertise Domain Identification
  1. Agent Specification Creation

```markdown

# Agent Specification: [Name]

## Role & Expertise

## Core Capabilities

1. [Capability with specific examples]

2. [Capability with specific examples]

...

## Decision Frameworks

## Quality Standards

```

  1. Supporting Artifacts

Validation Gate:

Outputs:


Phase 3: Agent Architecture Design (45-60 minutes)

Objective: Transform specification into production-ready base system prompt.

Activities:

  1. System Prompt Structure Design

```markdown

# [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:

My purpose is to [primary objective] by leveraging [unique expertise].

## 📋 UNIVERSAL COMMANDS I USE

File Operations:

WHEN: [Specific situations from domain analysis]

HOW: [Exact patterns]

Git Operations:

WHEN: [Specific situations]

HOW: [Exact patterns]

Communication & Coordination:

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:

WHEN: [Specific coordination scenarios]

HOW: [Exact function call patterns]

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:

## 📖 WORKFLOW EXAMPLES

### Workflow 1: [Common Task Name from Phase 1]

Objective: [What this achieves]

Step-by-Step Commands:

```yaml

Step 1: [Action]

COMMANDS:

OUTPUT: [Expected]

VALIDATION: [Check]

Step 2: [Next Action]

COMMANDS:

OUTPUT: [Expected]

VALIDATION: [Check]

```

Timeline: [Duration]

Dependencies: [Prerequisites]

```

  1. Evidence-Based Technique Integration

For each technique (from existing agent-creator skill):

Integrate these naturally into the agent's methodology.

  1. Quality Standards & Guardrails

From Phase 2 failure modes, create explicit guardrails:

Validation Gate:

Outputs:


Phase 4: Deep Technical Enhancement (60-90 minutes)

Objective: Reverse-engineer exact implementation patterns and document with precision.

Activities:

  1. Code Pattern Extraction

For technical agents, extract EXACT patterns from codebase:

```markdown

## Code Patterns I Recognize

### Pattern: [Name]

File: path/to/file.py:123-156

```python

class ExamplePattern:

def init(

self,

param1: Type = default, # Line 125: Exact default

param2: Type = default # Line 126: Exact default

):

# Extracted from actual implementation

pass

```

When I see this pattern, I know:

```

  1. Critical Failure Mode Documentation

From experience and domain knowledge:

```markdown

## Critical Failure Modes

### Failure: [Name]

Severity: Critical/High/Medium

Symptoms: [How to recognize]

Root Cause: [Why it happens]

Prevention:

❌ DON'T: [Bad pattern]

✅ DO: [Good pattern with exact code]

Detection:

```bash

# Exact command to detect this failure

[command]

```

```

  1. Integration Patterns

Document exact MCP tool usage:

```markdown

## MCP Integration Patterns

### Pattern: Cross-Agent Data Sharing

```javascript

// Exact pattern for storing outputs

mcpclaude-flowmemory_store({

key: "marketing-specialist/campaign-123/audience-analysis",

value: {

segments: [...],

targeting: {...},

confidence: 0.89

},

ttl: 86400

})

```

Namespace Convention:

```

  1. Performance Metrics

Define what to track:

```markdown

## Performance Metrics I Track

```yaml

Task Completion:

Quality:

Efficiency:

```

These metrics enable continuous improvement.

```

Validation Gate:

Outputs:


Integrated Agent Creation Process

Combining 4-phase SOP with existing best practices:

Complete Workflow

  1. Phase 1: Domain Analysis (30-60 min)
  1. Phase 2: Expertise Extraction (30-45 min)
  1. Phase 3: Architecture Design (45-60 min)
  1. Phase 4: Technical Enhancement (60-90 min)
  1. SDK Implementation (30-60 min)
  1. Testing & Validation (30-45 min)
  1. Documentation & Packaging (15-30 min)

Total Time: 3.5-5.5 hours (first-time), 2-3 hours (speed-run)


Claude Agent SDK Implementation

Once system prompt is finalized, implement with SDK:

TypeScript Implementation

import { query, tool } from '@anthropic-ai/claude-agent-sdk';
import { z } from 'zod';

// Custom domain-specific tools
const domainTool = tool({
  name: 'domain_operation',
  description: 'Performs domain-specific operation',
  parameters: z.object({
    param: z.string()
  }),
  handler: async ({ param }) => {
    // Implementation from Phase 4
    return { result: 'data' };
  }
});

// Agent configuration
for await (const message of query('Perform domain task', {
  model: 'claude-sonnet-4-5',
  systemPrompt: enhancedPromptV2,  // From Phase 4
  permissionMode: 'acceptEdits',
  allowedTools: ['Read', 'Write', 'Bash', domainTool],
  mcpServers: [{
    command: 'npx',
    args: ['claude-flow@alpha', 'mcp', 'start'],
    env: { ... }
  }],
  settingSources: ['user', 'project']
})) {
  console.log(message);
}

Python Implementation

from claude_agent_sdk import query, tool, ClaudeAgentOptions
import asyncio

@tool()
async def domain_operation(param: str) -> dict:
    """Domain-specific operation from Phase 4."""
    # Implementation
    return {"result": "data"}

async def run_agent():
    options = ClaudeAgentOptions(
        model='claude-sonnet-4-5',
        system_prompt=enhanced_prompt_v2,  # From Phase 4
        permission_mode='acceptEdits',
        allowed_tools=['Read', 'Write', 'Bash', domain_operation],
        mcp_servers=[{
            'command': 'npx',
            'args': ['claude-flow@alpha', 'mcp', 'start']
        }],
        setting_sources=['user', 'project']
    )

    async for message in query('Perform domain task', **options):
        print(message)

asyncio.run(run_agent())

Agent Specialization Patterns

From existing agent-creator skill, enhanced with 4-phase methodology:

Analytical Agents

Phase 1 Focus: Evidence evaluation patterns, data quality standards

Phase 2 Focus: Analytical heuristics, validation frameworks

Phase 3 Focus: Self-consistency checking, confidence calibration

Phase 4 Focus: Statistical validation code, error detection patterns

Generative Agents

Phase 1 Focus: Quality criteria, template patterns

Phase 2 Focus: Creative heuristics, refinement cycles

Phase 3 Focus: Plan-and-solve frameworks, requirement tracking

Phase 4 Focus: Generation patterns, quality validation code

Diagnostic Agents

Phase 1 Focus: Problem patterns, debugging workflows

Phase 2 Focus: Hypothesis generation, systematic testing

Phase 3 Focus: Program-of-thought decomposition, evidence tracking

Phase 4 Focus: Detection scripts, root cause analysis patterns

Orchestration Agents

Phase 1 Focus: Workflow patterns, dependency management

Phase 2 Focus: Coordination heuristics, error recovery

Phase 3 Focus: Plan-and-solve with dependencies, progress tracking

Phase 4 Focus: Orchestration code, retry logic, escalation paths


Testing & Validation

From existing framework + SOP enhancements:

Test Suite Creation

  1. Typical Cases - Expected behavior on common tasks
  2. Edge Cases - Boundary conditions and unusual inputs
  3. Error Cases - Graceful handling and escalation
  4. Integration Cases - End-to-end workflow with other agents
  5. Performance Cases - Speed, efficiency, resource usage

Validation Checklist


Quick Reference

When to Use Each Phase

Phase 1 (Analysis):

Phase 2 (Expertise Extraction):

Phase 3 (Architecture):

Phase 4 (Enhancement):

Speed-Run Approach (Experienced Creators)

  1. Combined Phase 1+2 (30 min): Rapid domain analysis + spec
  2. Phase 3 (30 min): Base prompt from template
  3. Phase 4 (45 min): Code patterns + failure modes
  4. Testing (15 min): Quick validation suite

Total: 2 hours for experienced creators with templates


Examples from Production

Example: Marketing Specialist Agent

See: docs/agent-architecture/agents-rewritten/MARKETING-SPECIALIST-AGENT.md

Phase 1 Output: Marketing domain analysis, tools (Google Analytics, SEMrush, etc.)

Phase 2 Output: Marketing expertise (CAC, LTV, funnel optimization, attribution)

Phase 3 Output: Base prompt with 9 specialist commands

Phase 4 Output: Campaign workflow patterns, A/B test validation, ROI calculations

Result: Production-ready agent with deeply embedded marketing expertise


Maintenance & Iteration

Continuous Improvement

  1. Metrics Review: Weekly review of agent performance metrics
  2. Failure Analysis: Document and fix new failure modes
  3. Pattern Updates: Add newly discovered code patterns
  4. Workflow Optimization: Refine based on usage patterns

Version Control


Summary

This enhanced agent-creator skill combines:

Use this methodology to create all 90 specialist agents with:

Next: Begin agent rewrites using this enhanced methodology.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.