moai-alfred-agent-factory
npx skills add https://github.com/ajbcoding/claude-skill-eval --skill moai-alfred-agent-factory
Agent 安装分布
Skill 文档
Agent Factory Intelligence Engine
Master Skill for Intelligent Agent Generation
Complete reference for agent-factory agent to automatically generate production-ready Claude Code sub-agents through requirement analysis, research, template generation, and validation.
Version: 1.0.0 Status: Production Ready Components: 6 core systems + advanced features
ð¯ Quick Start: The 6 Core Components
| Component | Location | Purpose |
|---|---|---|
| Intelligence Engine | reference/intelligence-engine.md | Analyze requirements â domain/capabilities/complexity |
| Research Engine | reference/research-engine.md | Context7 MCP workflow â fetch docs â extract practices |
| Template System | reference/template-system.md | 3-tier templates (Simple/Standard/Complex) + variables |
| Validation Framework | reference/validation-framework.md | 4 quality gates + test cases |
| Advanced Features | reference/advanced-features.md | Versioning, multi-domain, optimization |
| Practical Examples | examples.md | 3 main test cases + edge cases |
ð Agent Generation Workflow
User Requirement
â
[Stage 1-2] Intelligence Engine
ââ Parse requirement
ââ Detect domain (primary + secondary)
ââ Score complexity (1-10)
ââ Select model (Sonnet/Haiku/Inherit)
ââ Calculate tools & skills
â
[Stage 3] Research Engine (Context7 MCP)
ââ Resolve libraries
ââ Fetch documentation
ââ Extract best practices
ââ Synthesize evidence
â
[Stage 4-5] Template System
ââ Select template tier (1-3)
ââ Generate agent markdown
ââ Apply variable substitution
â
[Stage 6] Validation Framework
ââ Gate 1: YAML syntax
ââ Gate 2: Structure completeness
ââ Gate 3: Content quality
ââ Gate 4: TRUST 5 + Claude Code v4.0
â
Production-Ready Agent â
ð Understanding Each Component
Intelligence Engine
Responsible for: Requirement analysis and decision making
Key Algorithms:
- Requirement Analysis: Extract domain, capabilities, complexity
- Domain Detection: Primary + secondary domains with confidence
- Complexity Scoring: 1-10 scale for model selection
- Model Selection: Sonnet/Haiku/Inherit decision tree
- Tool Calculator: Minimum necessary permissions
- Skill Recommender: Match to 128+ MoAI-ADK skills
See: reference/intelligence-engine.md
Research Engine
Responsible for: Fetching official documentation and best practices
Key Workflows:
- Library Resolution: Convert domain â Context7 library IDs
- Documentation Fetch: Pull official docs from Context7 MCP
- Best Practice Extraction: Identify actionable patterns
- Pattern Identification: Architectural patterns for domain
- Quality Validation: Ensure research meets 70%+ threshold
- Evidence Synthesis: Consolidate into recommendations
- Fallback Strategy: WebFetch if Context7 unavailable
See: reference/research-engine.md
Template System
Responsible for: Generating agent markdown with correct structure
Key Components:
- Tier 1 (Simple): ~200 lines, Haiku, <5 min generation
- Tier 2 (Standard): 200-500 lines, Inherit/Sonnet, <15 min
- Tier 3 (Complex): 500+ lines, Sonnet, 20-30 min
- Variables: 15+ categories for dynamic substitution
- YAML Generation: Frontmatter with proper metadata
Template Files (in templates/ subfolder):
simple-agent.template.mdâ Tier 1 template for simple agentsstandard-agent.template.mdâ Tier 2 template for standard agentscomplex-agent.template.mdâ Tier 3 template for complex agentsVARIABLE_REFERENCE.mdâ Complete variable substitution guide
See: reference/template-system.md
Validation Framework
Responsible for: Ensuring agent quality meets all standards
4 Quality Gates:
- Gate 1: YAML syntax validation
- Gate 2: Required sections verification
- Gate 3: Content quality checks
- Gate 4: TRUST 5 + Claude Code v4.0 compliance
Includes: 5 core test cases + 3 edge cases
See: reference/validation-framework.md
Advanced Features
Responsible for: Enterprise capabilities and optimization
Features:
- Semantic Versioning: Track agent versions
- Multi-Domain Support: 2-3 domain agents
- Performance Analyzer: Automatic optimization suggestions
- Enterprise Compliance: SOC2, GDPR, HIPAA support
- Audit Logging: Activity tracking and monitoring
See: reference/advanced-features.md
ð Integration Points
With agent-factory Agent
---
name: agent-factory
model: sonnet
---
## Required Skills
Skill("moai-alfred-agent-factory") # This master skill
# In execution:
1. Load this skill
2. Use Intelligence Engine (Stage 1-2)
3. Use Research Engine (Stage 3)
4. Use Template System (Stage 4-5)
5. Use Validation Framework (Stage 6)
With @agent-cc-manager
After generation, delegate to @agent-cc-manager for:
- Claude Code v4.0 compliance verification
.claude/settings.jsonvalidation- MCP server configuration check
- Hook registration validation
With @agent-mcp-context7-integrator
Research Engine delegates to for:
- Library ID resolution
- Official documentation fetching
- Best practice identification
- Latest API version discovery
ð Performance Expectations
| Agent Type | Complexity | Generation Time | Result |
|---|---|---|---|
| Simple | 1-3 | <5 min | Tier 1 template |
| Standard | 4-6 | <15 min | Tier 2 template |
| Complex | 7-10 | 20-30 min | Tier 3 template + orchestration |
ð§ How to Use This Skill
For Agent-Factory Agent
# 1. Load this skill
skill = Skill("moai-alfred-agent-factory")
# 2. Use Intelligence Engine for analysis
domain = skill.intelligence_engine.detect_domain(user_input)
complexity = skill.intelligence_engine.complexity_score(domain, capabilities)
model = skill.intelligence_engine.select_model(complexity)
# 3. Use Research Engine for documentation
research = skill.research_engine.research_domain(domain, frameworks)
practices = research.best_practices
patterns = research.patterns
# 4. Use Template System for generation
template = skill.template_system.select_template(complexity)
agent_markdown = skill.template_system.generate_agent(
template=template,
variables={...}
)
# 5. Use Validation Framework for quality
validation = skill.validation_framework.validate(agent_markdown)
if validation.passed:
return agent_markdown
else:
return validation.issues
For Reference Lookup
Need specific information? Use the reference files:
- “What model should I pick?” â See intelligence-engine.md
- “How do I get best practices?” â See research-engine.md
- “What variables exist?” â See template-system.md
- “How are agents validated?” â See validation-framework.md
ð Reference Files Organization
moai-alfred-agent-factory/
âââ SKILL.md (this file - navigation hub)
âââ reference/ (detailed documentation)
â âââ intelligence-engine.md (280 lines: algorithms)
â âââ research-engine.md (320 lines: workflows)
â âââ template-system.md (280 lines: templates)
â âââ validation-framework.md (220 lines: testing)
â âââ advanced-features.md (200 lines: enterprise)
âââ templates/ (reusable agent templates)
â âââ simple-agent.template.md (Tier 1: <200 lines, Haiku)
â âââ standard-agent.template.md (Tier 2: 200-500 lines)
â âââ complex-agent.template.md (Tier 3: 500+ lines)
â âââ VARIABLE_REFERENCE.md (15+ variable categories)
âââ examples.md (719 lines: use cases)
âââ reference.md (400 lines: quick lookup)
⨠Key Highlights
â Comprehensive: 6 core systems with complete documentation â Modular: Each system independently referenceable â Practical: Includes algorithms with code examples â Tested: 5 core + 3 edge case test scenarios â Enterprise: Versioning, compliance, optimization â Official: Follows Claude Code v4.0 standards
ð Learning Path
New to agent-factory?
- Read this overview
- Review examples.md for practical cases
- Dive into specific reference files as needed
Integrating with your agent?
- Load this skill with
Skill("moai-alfred-agent-factory") - Reference specific algorithms from this overview
- Consult detailed docs in reference/ folder
Need specific feature? Use the component table above and jump to the corresponding reference file.
ð Quick Reference
| Question | Link |
|---|---|
| How do I analyze user requirements? | intelligence-engine.md â Requirement Analysis |
| How do I detect the domain? | intelligence-engine.md â Domain Detection |
| How do I select the right model? | intelligence-engine.md â Model Selection |
| How do I research best practices? | research-engine.md â Research Workflow |
| What templates are available? | template-system.md â Templates |
| How do I validate agents? | validation-framework.md â Quality Gates |
| Can I see examples? | examples.md |
| Need a quick lookup? | reference.md |
Created: 2025-11-15 Version: 1.0.0 Status: Production Ready Total Content: 2,800+ lines across organized reference files