xiaohongshu
xiaohongshu
maestro-delegation-advisor
Expert system for AgentMaestro that helps decide when and how to delegate tasks to specialized AI agents (Claude, Codex, Gemini). Use when you need to determine which agent is best suited for a task, or when a task should be broken down and delegated to multiple agents.
Full skill instructions
This skill provides intelligent guidance for delegating tasks to specialized AI agents within the AgentMaestro multi-agent orchestration system.
IMPORTANT: When running in Claude Code, delegation happens automatically through subagents!
Claude Code will automatically invoke the appropriate subagent based on the task description. You don't need to use special markers or syntax - just recognize when a task matches a specialized agent's strengths.
codex-delegator - Automatically invoked for code generation tasksgemini-delegator - Automatically invoked for research and automation tasksThese subagents run in separate contexts, meaning their token usage does NOT impact your context!
Invoke this skill whenever you encounter a task that might benefit from delegation to a specialized agent. Consider delegation when:
Performance: SWE-bench: 72.7% | Context: 1M tokens | Speed: Medium | Cost: High
Best for:
Avoid for:
codex-delegator)gemini-delegator)gemini-delegator)Indicators: refactor, architecture, design, security, audit, vulnerability, analyze codebase, complex, enterprise
Performance: HumanEval: 90.2% | SWE-bench: 69.1% | Speed: Fastest | Cost: Medium
Accessed via: codex-delegator subagent (automatic in Claude Code)
Best for:
Avoid for:
Indicators: generate, implement, create, write code, quick, fast, prototype, test, fix bug, algorithm
How to delegate in Claude Code:
Simply recognize the task matches Codex's strengths, and Claude Code will automatically invoke the codex-delegator subagent!
Operational note: The delegated subagent runs
codex --dangerously-bypass-approvals-and-sandbox exec "..."so the command executes without approval prompts or sandbox restrictions. Only delegate to Codex when you trust the workspace.
Performance: Context: Largest | Speed: Medium | Cost: Most Efficient
Accessed via: gemini-delegator subagent (automatic in Claude Code)
Best for:
Avoid for:
codex-delegator)Indicators: search, research, find, web, internet, automate, workflow, browser, content generation, budget
How to delegate in Claude Code:
Simply recognize the task matches Gemini's strengths, and Claude Code will automatically invoke the gemini-delegator subagent!
Before deciding on delegation, analyze these aspects:
interface TaskAnalysis {
// Complexity
complexity: 'low' | 'medium' | 'high';
// Special requirements
requiresWeb: boolean; // Needs internet search/research
requiresSpeed: boolean; // Time-constrained or urgent
requiresContext: boolean; // Needs deep codebase understanding
securityCritical: boolean; // Security/safety implications
costSensitive: boolean; // Budget constraints
// Task nature
canParallelize: boolean; // Can be split into independent tasks
hasDependencies: boolean; // Sequential tasks with dependencies
}
Rule 1: Security & Architecture → Claude (Stay in main context)
Rule 2: Code Generation & Speed → Codex Delegator
codex-delegatorRule 3: Research & Automation → Gemini Delegator
gemini-delegatorRule 4: Mixed Tasks → Sequential Approach
gemini-delegator handlecodex-delegator handleUser Request: "Analyze our authentication system for vulnerabilities"
Task Analysis:
{
complexity: 'high',
requiresWeb: false,
requiresSpeed: false,
requiresContext: true,
securityCritical: true,
costSensitive: false,
canParallelize: false,
hasDependencies: false
}
Decision: Handle yourself (confidence: 0.95)
Action:
I'll perform the security audit myself:
1. First, let me read the authentication system files...
2. Then analyze for OWASP Top 10 vulnerabilities...
3. Review session management and token handling...
4. Identify potential attack vectors...
5. Provide prioritized recommendations...
User Request: "Implement a user login function with JWT validation"
Task Analysis:
{
complexity: 'medium',
requiresWeb: false,
requiresSpeed: true,
requiresContext: false,
securityCritical: false, // Implementation, not security design
costSensitive: false,
canParallelize: false,
hasDependencies: false
}
Decision: Codex (confidence: 0.9)
Action (Claude Code will do this automatically):
This is a code generation task perfect for Codex. Let me delegate this...
[Claude Code automatically invokes codex-delegator subagent]
[Subagent executes: codex --dangerously-bypass-approvals-and-sandbox exec "Implement user login function..."]
[Result returned without consuming your tokens!]
Here's the implementation Codex generated...
What you see: Just the final result, NOT the intermediate process!
User Request: "Find the best state management library for our React app in 2025"
Task Analysis:
{
complexity: 'low',
requiresWeb: true, // Needs internet research
requiresSpeed: false,
requiresContext: false,
securityCritical: false,
costSensitive: true, // Research task, use cost-effective agent
canParallelize: false,
hasDependencies: false
}
Decision: Gemini (confidence: 0.95)
Action (Claude Code will do this automatically):
This requires web research, which is perfect for Gemini. Let me gather that information...
[Claude Code automatically invokes gemini-delegator subagent]
[Subagent executes: gemini -p "Research state management..."]
[Result returned without consuming your tokens!]
Based on current research, here are the top options...
User Request: "Create a new user registration feature with best practices"
Task Analysis:
{
complexity: 'high',
requiresWeb: true, // Research best practices
requiresSpeed: false,
requiresContext: true, // Understand existing system
securityCritical: true,
costSensitive: false,
canParallelize: false,
hasDependencies: true // Research → Design → Implementation
}
Decision: Sequential multi-agent approach
Action:
I'll break this into three phases:
**Phase 1 - Research (Gemini):**
First, let me research current best practices...
[gemini-delegator automatically invoked]
✓ Research complete
**Phase 2 - Security Design (Me/Claude):**
Based on the research, I'll design the security architecture:
- Database schema with proper constraints
- Password hashing with bcrypt
- Email verification workflow
- Rate limiting strategy
- GDPR compliance measures
**Phase 3 - Implementation (Codex):**
Now let me implement based on this design...
[codex-delegator automatically invoked]
✓ Implementation complete
All phases complete! Here's the full solution...
Always provide a confidence score (0-1) for your delegation decision:
0.95-1.0: Perfect match, obvious choice
0.85-0.95: Strong match, highly recommended
0.70-0.85: Good match, reasonable choice
0.50-0.70: Moderate match, consider alternatives
< 0.50: Weak match, probably don't delegate
# BAD: Claude delegating architecture to Codex
User: "Design our microservices architecture"
You: [Tries to delegate to Codex]
# GOOD: Claude handles architecture himself
User: "Design our microservices architecture"
You: "I'll design this myself as architecture is my specialty..."
# BAD: Overhead not worth it
User: "Add a console.log statement"
You: [Delegates to Codex]
# GOOD: Just handle it yourself
User: "Add a console.log statement"
You: [Adds the statement directly]
# BAD: Vague delegation
User: "Fix the bug"
You: [Delegates to Codex with no context]
# GOOD: Provide clear context
User: "Fix the bug"
You: [Analyzes the bug first, then delegates with specific details]
Start: Analyze Task
│
├─ Security/Architecture/Deep Analysis?
│ └─ YES → Handle yourself (Claude) (0.9+ confidence)
│
├─ Code Generation/Quick Implementation?
│ └─ YES → codex-delegator (automatic) (0.85+ confidence)
│
├─ Research/Web/Automation?
│ └─ YES → gemini-delegator (automatic) (0.85+ confidence)
│
├─ Multiple Independent Tasks?
│ └─ YES → Sequential with appropriate delegations
│
├─ Sequential Phases (Research→Design→Code)?
│ └─ YES → Sequential: Gemini → Claude → Codex
│
├─ Simple Task?
│ └─ YES → Handle yourself (< 0.5 confidence for delegation)
│
└─ Complex Mixed Task?
└─ YES → Break down and delegate appropriately
When you're running in Claude Code as the primary agent:
You (Claude): "This is a code generation task perfect for Codex"
↓
Claude Code: Detects task matches codex-delegator description
↓
Task Tool: Invokes codex-delegator subagent
↓
Subagent: Runs codex CLI in separate context
↓
Result: Returned to you (without the intermediate output!)
↓
You: Continue with the result
Key Benefits:
| Task Type | Primary Agent | Subagent | Confidence |
|---|---|---|---|
| Security Audit | Claude (you) | - | 0.95 |
| Architecture | Claude (you) | - | 0.95 |
| Refactoring | Claude (you) | - | 0.90 |
| Code Generation | Codex | codex-delegator | 0.95 |
| Quick Prototype | Codex | codex-delegator | 0.90 |
| Bug Fix | Codex | codex-delegator | 0.90 |
| Unit Tests | Codex | codex-delegator | 0.90 |
| Web Research | Gemini | gemini-delegator | 0.95 |
| Automation | Gemini | gemini-delegator | 0.95 |
| Documentation | Gemini | gemini-delegator | 0.85 |
| Mixed (R+D+I) | Sequential | Multiple | - |
Remember: When you're Claude running in Claude Code:
The goal: Leverage each agent's strengths for optimal results while keeping your context clean and efficient!
Use this skill to make informed delegation decisions that maximize the effectiveness of the multi-agent system! 🚀
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience