<< All versions
Skill v1.0.0
currentAutomated scan100/100wasabeef/claude-code-cookbook/multi-role
──Details
PublishedOctober 28, 2026 at 01:32 AM
Content Hashsha256:5b25125e305c52e2...
Git SHAbf1ddd31cb5b
──Files
Files (1 file, 8.7 KB)
SKILL.md8.7 KBactive
SKILL.md · 325 lines · 8.7 KB
description: 'Parallel analysis with multiple roles and integrated report. Trigger with "analyze from multiple perspectives", "multi-role analysis", "check both security and performance".' allowed-tools:
- Read
- Grep
- Glob
metadata: version: "1.0.0"
Parallel analysis with multiple roles and integrated report
A command that analyzes the same target in parallel with multiple roles and generates an integrated report.
Usage
bash
/multi-role <role1>,<role2> [--agent|-a] [analysis_target]/multi-role <role1>,<role2>,<role3> [--agent|-a] [analysis_target]
Available Roles
Specialized Analysis Roles
security: Security audit expertperformance: Performance optimization expertanalyzer: Root cause analysis expertfrontend: Frontend and UI/UX expertmobile: Mobile development expertbackend: Backend and server-side expert
Development Support Roles
reviewer: Code review expertarchitect: System architectqa: Test engineer
Important:
- Place the
--agentoption immediately after specifying roles - Write your message after
--agent - Correct example:
/multi-role qa,architect --agent Evaluate the plan - Incorrect example:
/multi-role qa,architect Evaluate the plan --agent
Options
--agentor-a: Execute each role as a sub-agent in parallel (recommended for large-scale analysis)- When using this option, if role descriptions include proactive delegation phrases (like "use PROACTIVELY"), more aggressive automatic delegation becomes enabled
Basic Examples
bash
# Dual analysis of security and performance (normal)/multi-role security,performance"Evaluate this API endpoint"# Parallel analysis of large-scale system (sub-agents)/multi-role security,performance --agent"Comprehensively analyze system security and performance"# Integrated analysis of frontend, mobile, and performance/multi-role frontend,mobile,performance"Consider optimization proposals for this screen"# Multifaceted evaluation of architecture design (sub-agents)/multi-role architect,security,performance --agent"Evaluate microservices design"
Analysis Process
Phase 1: Parallel Analysis
Each role independently analyzes the same target
- Perform evaluation from specialized perspective
- Make judgments based on role-specific criteria
- Generate independent recommendations
Phase 2: Integrated Analysis
Structure and integrate results
- Organize evaluation results from each role
- Identify overlaps and contradictions
- Clarify complementary relationships
Phase 3: Integrated Report
Generate final recommendations
- Prioritized action plan
- Explicit trade-offs
- Implementation roadmap
Output Format Examples
For 2-role Analysis
text
Multi-role Analysis: Security + Performance━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━Analysis Target: API endpoint /api/usersSecurity Analysis Results:Authentication: JWT verification properly implementedAuthorization: Role-based access control incompleteEncryption: API keys logged in plain textEvaluation Score: 65/100Importance: High (due to sensitive data access)Performance Analysis Results:Response Time: Average 180ms (within target of 200ms)Database Queries: N+1 problem detectedCaching: Redis cache not implementedEvaluation Score: 70/100Importance: Medium (currently within acceptable range)Interrelated Analysis:Synergistic Opportunities:- Consider encryption when implementing Redis cache- Improve logging for both security and performance gainsTrade-off Points:- Authorization check strengthening ↔ Impact on response time- Log encryption ↔ Reduced debugging efficiencyIntegrated Priorities:Critical: Fix API key plain text outputHigh: Resolve N+1 queriesMedium: Implement Redis cache + encryptionLow: Refine authorization controlImplementation Roadmap:Week 1: Implement API key maskingWeek 2: Database query optimizationWeeks 3-4: Cache layer design and implementationMonth 2: Progressive strengthening of authorization control
For 3-role Analysis
text
Multi-role Analysis: Frontend + Mobile + Performance━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━Analysis Target: User Profile ScreenFrontend Analysis Results:Usability: Intuitive layoutAccessibility: 85% WCAG 2.1 complianceResponsive: Issues with tablet displayMobile Analysis Results:Touch Targets: 44pt+ ensuredOne-handed Operation: Important buttons placed at topOffline Support: Not implementedPerformance Analysis Results:Initial Display: LCP 2.1s (good)Image Optimization: WebP not supportedLazy Loading: Not implementedIntegrated Recommendations:1. Mobile optimization (one-handed operation + offline support)2. Image optimization (WebP + lazy loading)3. Tablet UI improvementsPriority: Mobile > Performance > FrontendImplementation Period: 3-4 weeks
Effective Combination Patterns
Security-focused
bash
/multi-role security,architect"Authentication system design"/multi-role security,frontend"Login screen security"/multi-role security,mobile"Mobile app data protection"
Performance-focused
bash
/multi-role performance,architect"Scalability design"/multi-role performance,frontend"Web page speed optimization"/multi-role performance,mobile"App performance optimization"
User Experience-focused
bash
/multi-role frontend,mobile"Cross-platform UI"/multi-role frontend,performance"Balance between UX and performance"/multi-role mobile,performance"Mobile UX optimization"
Comprehensive Analysis
bash
/multi-role architect,security,performance"Overall system evaluation"/multi-role frontend,mobile,performance"Comprehensive user experience evaluation"/multi-role security,performance,mobile"Comprehensive mobile app diagnosis"
Collaboration with Claude
bash
# Combine with file analysiscat src/components/UserProfile.tsx/multi-role frontend,mobile"Evaluate this component from multiple perspectives"# Evaluate design documentscat architecture-design.md/multi-role architect,security,performance"Evaluate this design across multiple specialties"# Error analysiscat performance-issues.log/multi-role performance,analyzer"Analyze performance issues from multiple angles"
Choosing between multi-role and role-debate
When to use multi-role
- You want independent evaluations from each specialty
- You want to create an integrated improvement plan
- You want to organize contradictions and overlaps
- You want to determine implementation priorities
When to use role-debate
- There are trade-offs between specialties
- Opinions might differ on technology selection
- You want to decide design policies through discussion
- You want to hear debates from different perspectives
Sub-agent Parallel Execution (--agent)
Using the --agent option executes each role as an independent sub-agent in parallel.
Promoting Automatic Delegation
If role file descriptions include phrases like these, more proactive automatic delegation is enabled when using --agent:
- "use PROACTIVELY"
- "MUST BE USED"
- Other emphasis expressions
Execution Flow
text
Normal execution:Role 1 → Role 2 → Role 3 → Integration(Sequential execution, approx. 3-5 minutes)--agent execution:Role 1 ─┐Role 2 ─┼→ IntegrationRole 3 ─┘(Parallel execution, approx. 1-2 minutes)
Effective Usage Examples
bash
# Comprehensive evaluation of large-scale system/multi-role architect,security,performance,qa --agent"Comprehensive evaluation of new system"# Detailed analysis from multiple perspectives/multi-role frontend,mobile,performance --agent"Full screen UX optimization analysis"
Performance Comparison
| Number of Roles | Normal Execution | --agent Execution | Reduction Rate | |
|---|---|---|---|---|
| 2 roles | 2-3 minutes | 1 minute | 50% | |
| 3 roles | 3-5 minutes | 1-2 minutes | 60% | |
| 4 roles | 5-8 minutes | 2-3 minutes | 65% |
Notes
- Executing 3 or more roles simultaneously results in longer output
- Complex analyses may take longer to execute
- If conflicting recommendations arise, consider using role-debate
- Final judgments should be made by the user with reference to integrated results
- When using --agent: Consumes more resources but is efficient for large-scale analyses
Role Configuration Details
- Detailed settings, domain expertise, and discussion traits for each role are defined in
.claude/agents/roles/ - Includes Evidence-First practices and cognitive bias countermeasures
- Role-specific trigger phrases automatically enable the specialized mode