Refactor high-complexity React components in Dify frontend. Use when `pnpm analyze-component...
npx skills add ramidamolis-alt/agent-skills-workflows --skill "ai-orchestrator"
Install specific skill from multi-skill repository
# Description
๐ฏ AI Orchestrator - Ultimate natural language to expert prompt translator. Analyzes intent with UltraThink, routes to specialized agents, and verifies execution. Use for: orchestrate, translate commands, delegate work, smart routing, multi-agent coordination.
# SKILL.md
name: ai-orchestrator
description: "๐ฏ AI Orchestrator - Ultimate natural language to expert prompt translator. Analyzes intent with UltraThink, routes to specialized agents, and verifies execution. Use for: orchestrate, translate commands, delegate work, smart routing, multi-agent coordination."
triggers:
- orchestrate
- translate command
- delegate task
- route to expert
- smart execute
๐ฏ AI Orchestrator - Ultimate Edition
Natural Language โ Intent Analysis โ Expert Prompt โ Smart Routing โ Verified Execution
โก Quick Start
User: "เธชเธฃเนเธฒเธเนเธงเนเธเธเธฒเธข sneakers"
โ
AI Orchestrator:
1. Intent Analysis (UltraThink): {type: "development", domain: "e-commerce"}
2. Route Selection: code-architect + docker-expert + security-expert
3. Expert Prompt: Full technical spec with patterns
4. Execution: Parallel skill invocation
5. Verification: Quality gates + Memory save
๐๏ธ Architecture
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ AI ORCHESTRATOR PIPELINE โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โ
โ โ INTAKE โโโโโถโ ANALYZE โโโโโถโ ROUTE โ โ
โ โ (Natural โ โ (UltraThink) โ โ (Skill โ โ
โ โ Language) โ โ + Memory โ โ Matcher) โ โ
โ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โ
โ โ โ โ โ
โ โผ โผ โผ โ
โ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โ
โ โ Context โ โ Confidence โ โ Expert โ โ
โ โ Loading โโโโโถโ Gate โโโโโถโ Prompt โ โ
โ โ (Memory+Docs)โ โ (>0.7?) โ โ Generator โ โ
โ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โ
โ โ โ
โ โผ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ EXECUTION โ โ
โ โ โโโโโโโ โโโโโโโ โโโโโโโ โ โ
โ โ โSkillโ โSkillโ โSkillโ โ โ
โ โ โ A โ โ B โ โ C โ โ โ
โ โ โโโโโโโ โโโโโโโ โโโโโโโ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ โ
โ โผ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ VERIFY + LEARN โ โ
โ โ Quality Check โ Memory โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ Intent Classification Matrix
| User Pattern | Task Type | Primary Skills | MCP Servers |
|---|---|---|---|
| เธชเธฃเนเธฒเธ/build/create web/app | development |
code-architect, docker-expert | Context7, MongoDB, Filesystem |
| เธซเธฒ bug/fix/เนเธเน | debugging |
debugger, tdd-workflow | Memory, UltraThink |
| เนเธเธฒเธฐ/hack/pentest/security | security |
security-expert, ethical-hacking | Brave, Memory, UltraThink |
| เธญเธญเธเนเธเธ/design/architect | architecture |
code-architect, performance-optimizer | UltraThink, Context7 |
| เนเธฃเธตเธขเธเธฃเธนเน/learn/research | learning |
knowledge-graph | Context7, NotebookLM, Memory |
| optimize/เนเธฃเนเธงเธเธถเนเธ/performance | performance |
performance-optimizer | MongoDB, UltraThink |
| review/เธเธฃเธงเธ | review |
code-review-checklist | UltraThink, Sequential |
| เธชเธฃเนเธฒเธ agent/AI/bot | agent-dev |
langgraph, ai-agents-architect | UltraThink, Memory |
| deploy/ship/launch | devops |
docker-expert, github-workflow | Filesystem |
| test/เธเธเธชเธญเธ | testing |
e2e-testing, tdd-workflow | Brave, Filesystem |
๐ง Phase 1: Intent Analysis
async function analyzeIntent(userInput) {
// Step 1: Memory Prime - Check for similar past tasks
const pastPatterns = await mcp_Memory_search_nodes(
`task pattern: ${extractKeywords(userInput)}`
);
// Step 2: Deep Intent Analysis with UltraThink
const analysis = await mcp_UltraThink_ultrathink({
thought: `
# Intent Analysis: "${userInput}"
## 1. Primary Goal Extraction
- What is the user trying to achieve?
- What is the expected outcome?
## 2. Task Classification
- Type: [development|debugging|security|architecture|learning|performance|review|agent-dev|devops|testing]
- Domain: [web|mobile|backend|frontend|devops|security|ai|data|general]
- Complexity: [simple|moderate|complex|enterprise]
## 3. Requirements Breakdown
- Explicit requirements (stated)
- Implicit requirements (inferred)
- Constraints and limitations
## 4. Skill Routing
- Primary skill needed
- Supporting skills
- MCP servers required
## 5. Success Criteria
- What defines success?
- Quality metrics
- Verification approach
## Past Patterns Found
${pastPatterns.map(p => `- ${p.name}: ${p.observations[0]}`).join('\n')}
`,
total_thoughts: 15,
confidence: null,
assumptions: [
{ id: "A1", text: "User wants production-quality output", critical: true, confidence: 0.9 },
{ id: "A2", text: "Standard best practices apply", critical: false, confidence: 0.95 }
]
});
return {
taskType: analysis.extracted.taskType,
domain: analysis.extracted.domain,
complexity: analysis.extracted.complexity,
requirements: analysis.extracted.requirements,
skills: analysis.extracted.skills,
mcpServers: analysis.extracted.mcpServers,
successCriteria: analysis.extracted.successCriteria,
confidence: analysis.confidence
};
}
๐ Phase 2: Smart Routing
const SKILL_ROUTER = {
development: {
primary: ['code-architect'],
supporting: ['docker-expert', 'security-expert', 'tdd-workflow'],
mcpServers: ['Context7', 'MongoDB', 'Filesystem', 'Memory']
},
debugging: {
primary: ['debugger'],
supporting: ['tdd-workflow', 'verification-before-completion'],
mcpServers: ['Memory', 'UltraThink', 'Filesystem']
},
security: {
primary: ['security-expert', 'ethical-hacking-methodology'],
supporting: ['debugger'],
mcpServers: ['Brave', 'Memory', 'UltraThink']
},
architecture: {
primary: ['code-architect'],
supporting: ['performance-optimizer', 'security-expert'],
mcpServers: ['UltraThink', 'Context7', 'Memory']
},
learning: {
primary: ['knowledge-graph'],
supporting: [],
mcpServers: ['Context7', 'NotebookLM', 'Brave', 'Memory']
},
performance: {
primary: ['performance-optimizer'],
supporting: ['debugger'],
mcpServers: ['MongoDB', 'UltraThink', 'Memory']
},
review: {
primary: ['code-review-checklist', 'requesting-code-review'],
supporting: ['security-expert'],
mcpServers: ['UltraThink', 'SequentialThinking']
},
'agent-dev': {
primary: ['langgraph', 'ai-agents-architect'],
supporting: ['autonomous-agents', 'agent-memory-systems'],
mcpServers: ['UltraThink', 'Memory', 'Context7']
},
devops: {
primary: ['docker-expert', 'github-workflow-automation'],
supporting: ['security-expert'],
mcpServers: ['Filesystem', 'Memory']
},
testing: {
primary: ['e2e-testing', 'tdd-workflow'],
supporting: ['verification-before-completion'],
mcpServers: ['Brave', 'Filesystem', 'Memory']
}
};
function selectRoute(intent) {
const route = SKILL_ROUTER[intent.taskType];
// Adjust based on complexity
if (intent.complexity === 'enterprise') {
route.supporting.push('planning-with-files', 'parallel-agents');
}
// Add domain-specific skills
if (intent.domain === 'ai') {
route.supporting.push('ai-ml-expert', 'prompt-master');
}
return route;
}
โจ Phase 3: Expert Prompt Generation
const EXPERT_PROMPT_TEMPLATES = {
development: (intent, context) => `
# Expert Development Task
## Role
เธเธธเธเธเธทเธญ Principal Software Architect เธฃเธฐเธเธฑเธเนเธฅเธ เธเธนเนเนเธเธตเนเธขเธงเธเธฒเธ ${intent.domain}
## Background Context
${context.docsContext ? `### Documentation\n${context.docsContext.substring(0, 2000)}` : ''}
${context.memoryContext?.length ? `### Past Patterns\n${context.memoryContext.map(m => `- ${m.name}`).join('\n')}` : ''}
## Task Requirements
${intent.requirements.explicit.map(r => `- ${r}`).join('\n')}
## Implicit Requirements (Inferred)
${intent.requirements.implicit.map(r => `- ${r}`).join('\n')}
## Technical Standards (MANDATORY)
- TypeScript strict mode
- Comprehensive error handling with recovery
- Input validation at all boundaries (Zod)
- Structured logging with correlation IDs
- Security-first approach (OWASP Top 10)
- Performance optimized (Core Web Vitals targets)
- Full test coverage (unit + integration)
## Architecture Patterns
- Clean Architecture / Hexagonal
- Repository Pattern for data access
- Factory Pattern for object creation
- Strategy Pattern for algorithms
- Circuit Breaker for external calls
## Success Criteria
${intent.successCriteria.map(c => `- [ ] ${c}`).join('\n')}
## Deliverables
1. Implementation with full code
2. Tests
3. Documentation
4. Docker configuration (if applicable)
`,
debugging: (intent, context) => `
# Expert Debugging Task
## Role
เธเธธเธเธเธทเธญ Senior Debugging Specialist เธเธนเนเนเธเธตเนเธขเธงเธเธฒเธ root cause analysis
## Problem Statement
${intent.requirements.explicit[0] || 'Unspecified bug'}
## Past Similar Bugs
${context.memoryContext?.map(m => `- ${m.name}: ${m.observations[0]}`).join('\n') || 'None found'}
## Debugging Methodology
1. **Reproduce** - Confirm the issue exists
2. **Hypothesize** - Generate 3 possible causes
3. **Test** - Systematically eliminate hypotheses
4. **Fix** - Apply minimal, focused fix
5. **Verify** - Confirm fix works and no regressions
6. **Document** - Record for future reference
## Output Requirements
- Root cause identification
- Fix with explanation
- Verification steps
- Memory entry for future reference
`,
security: (intent, context) => `
# Expert Security Assessment Task
## Role
เธเธธเธเธเธทเธญ Senior Security Engineer (OSCP, CEH, CISSP equivalent)
## Target
${intent.requirements.explicit[0] || 'Unspecified target'}
## Scope
${intent.requirements.constraints?.scope || 'To be defined'}
## Methodology: PTES Framework
1. **Reconnaissance** - Information gathering
2. **Scanning** - Vulnerability scanning
3. **Exploitation** - Controlled exploitation (if authorized)
4. **Post-Exploitation** - Assess impact
5. **Reporting** - Document findings
## Ethical Boundaries
- Only authorized testing
- Do not cause damage
- Report all findings responsibly
- Follow rules of engagement
## Output
- Vulnerability report with severity ratings
- Remediation recommendations
- Proof of concept (where appropriate)
`,
architecture: (intent, context) => `
# Expert Architecture Design Task
## Role
เธเธธเธเธเธทเธญ Principal Architect เธญเธญเธเนเธเธเธฃเธฐเธเธ scale เธเธถเธ millions of users
## Design Context
${intent.requirements.explicit.map(r => `- ${r}`).join('\n')}
## Documentation Reference
${context.docsContext?.substring(0, 1500) || 'None loaded'}
## Deliverables
1. **Architecture Diagram** (Mermaid format)
2. **Component Specifications**
3. **Data Flow Diagrams**
4. **API Contracts**
5. **Security Considerations**
6. **Scalability Analysis**
7. **Cost Estimation**
## Quality Attributes (NFRs)
- Performance: Response time < 200ms P95
- Scalability: 10x current load
- Availability: 99.9% uptime
- Security: OWASP compliant
- Maintainability: Clean code, documentation
`,
learning: (intent, context) => `
# Expert Learning & Research Task
## Role
เธเธธเธเธเธทเธญเธเธฑเธเธงเธดเธเธฑเธขเธฃเธฐเธเธฑเธ PhD เธเธนเนเนเธเธตเนเธขเธงเธเธฒเธเธเธฒเธฃเธชเธฑเธเนเธเธฃเธฒเธฐเธซเนเธเธงเธฒเธกเธฃเธนเน
## Topic
${intent.requirements.explicit[0] || 'Topic to research'}
## Research Approach
1. Gather information from multiple sources
2. Cross-reference and validate
3. Synthesize key insights
4. Create actionable knowledge
## Sources to Use
- Context7: Framework documentation
- NotebookLM: Research papers
- Brave: Latest articles and tutorials
- Memory: Past learnings
## Output
- Comprehensive summary
- Key insights (bullet points)
- Code examples (if applicable)
- Memory entry for persistence
`
};
async function generateExpertPrompt(intent, userInput) {
// Load context in parallel
const [memoryContext, docsContext, webContext] = await Promise.all([
mcp_Memory_search_nodes(intent.domain + ' ' + intent.taskType),
intent.domain !== 'general'
? mcp_Context7_query_docs(getLibraryId(intent.domain), userInput)
: null,
intent.complexity === 'complex' || intent.complexity === 'enterprise'
? mcp_Brave_brave_web_search(`${intent.domain} best practices 2026`)
: null
]);
const context = { memoryContext, docsContext, webContext };
const template = EXPERT_PROMPT_TEMPLATES[intent.taskType];
if (!template) {
// Fallback to generic expert prompt
return generateGenericExpertPrompt(intent, context, userInput);
}
return template(intent, context);
}
๐ Phase 4: Execution
async function executeWithSkills(route, expertPrompt, intent) {
// Load all required skills
for (const skill of [...route.primary, ...route.supporting]) {
console.log(`Loading skill: ${skill}`);
// Skills are auto-loaded by the system
}
// Execute primary task
const result = await executeTask(expertPrompt);
return result;
}
โ Phase 5: Verification & Learning
async function verifyAndLearn(result, intent, userInput) {
// Verify output quality
const verification = await mcp_UltraThink_ultrathink({
thought: `
# Output Verification
## Success Criteria Check
${intent.successCriteria.map(c => `- [ ] ${c}`).join('\n')}
## Quality Assessment
- Completeness: Does it address all requirements?
- Correctness: Is the solution technically sound?
- Best Practices: Does it follow standards?
- Security: Any vulnerabilities?
- Performance: Any obvious issues?
## Overall Score
Rate 1-10 with justification
`,
total_thoughts: 5,
confidence: null
});
// Save successful pattern to Memory
if (verification.confidence > 0.8) {
await mcp_Memory_create_entities([{
name: `Orchestration_${intent.taskType}_${Date.now()}`,
entityType: 'OrchestrationPattern',
observations: [
`Input: ${userInput}`,
`TaskType: ${intent.taskType}`,
`Domain: ${intent.domain}`,
`Skills: ${[...route.primary, ...route.supporting].join(', ')}`,
`Success: ${verification.confidence}`,
`Timestamp: ${new Date().toISOString()}`
]
}]);
// Link to related patterns
await mcp_Memory_create_relations([
{ from: `Orchestration_${intent.taskType}_${Date.now()}`, to: intent.taskType, relationType: 'is_type_of' }
]);
}
return verification;
}
๐ฏ Complete Orchestration Example
// User says: "เธชเธฃเนเธฒเธเนเธงเนเธ e-commerce เธเธฒเธข sneakers"
async function orchestrate(userInput) {
console.log("๐ฏ AI Orchestrator: Starting...");
// Phase 1: Analyze Intent
const intent = await analyzeIntent(userInput);
console.log(`๐ Intent: ${intent.taskType} (${intent.confidence} confidence)`);
// Confidence Gate
if (intent.confidence < 0.6) {
return { needsClarification: true, questions: intent.uncertainties };
}
// Phase 2: Select Route
const route = selectRoute(intent);
console.log(`๐ Route: ${route.primary.join(', ')}`);
// Phase 3: Generate Expert Prompt
const expertPrompt = await generateExpertPrompt(intent, userInput);
console.log("โจ Expert Prompt Generated");
// Phase 4: Execute
const result = await executeWithSkills(route, expertPrompt, intent);
console.log("๐ Execution Complete");
// Phase 5: Verify & Learn
const verification = await verifyAndLearn(result, intent, userInput);
console.log(`โ
Verification: ${verification.confidence}`);
return {
success: verification.confidence > 0.7,
result,
verification,
patternSaved: verification.confidence > 0.8
};
}
๐ง Integration Points
With Workflows
/orchestrate- Direct orchestration command/smart- Auto-detects and uses Orchestrator/god- Ultimate mode with Orchestrator
With Skills
- Auto-loads relevant skills based on intent
- Coordinates multi-skill execution
- Manages skill dependencies
With MCP Servers
- UltraThink: Deep intent analysis
- Memory: Pattern storage and retrieval
- Context7: Documentation loading
- Brave/DuckDuckGo: Web research
- NotebookLM: Deep research
โ ๏ธ Anti-Patterns
| โ Don't | โ Do |
|---|---|
| Pass raw input to skills | Transform to expert prompt first |
| Skip Memory Prime | Always check past patterns |
| Use single generic prompt | Customize per task type |
| Ignore confidence scores | Gate on confidence |
| Skip verification | Always verify output |
| Forget to save patterns | Save successful orchestrations |
๐ Related Skills
prompt-master- Advanced prompt engineeringparallel-agents- Multi-agent executionplanning-with-files- Complex task planningknowledge-graph- Memory managementomni-skill- Full skill integration
Remember: The Orchestrator is the brain that understands, routes, and verifies.
It transforms simple requests into expert-level executions.
# Supported AI Coding Agents
This skill is compatible with the SKILL.md standard and works with all major AI coding agents:
Learn more about the SKILL.md standard and how to use these skills with your preferred AI coding agent.