This skill automatically delegates tasks to specialized subagents, optimizing workload and accelerating delivery with clear context and parallel execution
npx playbooks add skill jcastillotx/vibe-skeleton-app --skill delegate
Automatically delegate tasks to the most appropriate specialized subagent.
/delegate "implement user authentication"
/delegate "review the payment module for security issues"
/delegate "write unit tests for the API endpoints"
Parse the task description to identify:
Before delegating, auto-inject relevant coding standards based on the project's tech stack:
.claude/config/coding-standards.json for detection rulesTECHSTACK.md or codebase patterns to identify technologiesDetection Rules:
| Pattern Detected | Standards Loaded |
|------------------|------------------|
| WordPress, wp-content, Divi, Elementor | wordpress, php, mysql |
| Next.js, App Router, use client | nextjs, react, javascript |
| Laravel, Eloquent, Blade, Livewire | laravel, php, mysql |
| Supabase, RLS, auth.uid() | supabase |
| MariaDB, Galera | mariadb, mysql |
| React, useState, JSX | react, javascript |
| PHP, composer.json | php |
| MySQL, my.cnf | mysql |
Include in Subagent Prompt:
## Coding Standards
Follow these coding standards for this task. Focus on CRITICAL and HIGH impact rules:
[Include relevant AGENTS.md content here]
Key rules to follow:
- [List 3-5 most relevant CRITICAL rules from loaded standards]
Example:
If TECHSTACK.md mentions "Next.js" and "Supabase":
setup/skills/nextjs-best-practices/AGENTS.mdsetup/skills/react-best-practices/AGENTS.mdsetup/skills/javascript-best-practices/AGENTS.mdsetup/skills/supabase-best-practices/AGENTS.mdRead CLAUDE-activeContext.md to check parallel execution tracking:
## Parallel Execution Tracking
**Maximum Concurrent Agents:** 2
| Slot | Agent | Task | Status |
|------|-------|------|--------|
| 1 | [agent] | [task] | Active/Available |
| 2 | [agent] | [task] | Active/Available |
Rules:
setup/agents/critical/)| Agent | Specialty | Use When |
|-------|-----------|----------|
| software-engineer | Implementation | Building features, writing code |
| code-reviewer | Quality | Reviewing code for issues |
| qa-engineer | Testing | Writing tests, quality assurance |
| product-manager | Requirements | Clarifying scope, priorities |
If current phase is known (from CLAUDE-activeContext.md), prefer phase-appropriate agent:
| Phase | Preferred Agent |
|-------|-----------------|
| 2-3 | Requirements Analyst / Solution Architect |
| 4-5 | Technical Planner / Software Engineer |
| 6 | QA Engineer |
| 7 | Security Auditor |
| 8 | Code Reviewer |
| 9 | DevOps Engineer |
Use the Task tool to launch the selected agent:
Task:
description: "[3-5 word summary]"
prompt: |
## Context
[Current phase and project context from CLAUDE-activeContext.md]
## Task
[Full task description from user]
## Coding Standards
Follow these coding standards for this task. Focus on CRITICAL and HIGH impact rules:
[Include relevant AGENTS.md content based on detected tech stack]
Key rules to enforce:
- [List 3-5 most relevant CRITICAL rules]
## Constraints
- Follow patterns in CLAUDE-patterns.md
- Follow coding standards loaded above
- Update CLAUDE-activeContext.md when complete
- Report findings back to main agent
## Deliverables
[Expected outputs]
subagent_type: [agent-type]
Update CLAUDE-activeContext.md:
## Active Tasks
| ID | Task | Agent | Status | Started |
|----|------|-------|--------|---------|
| T-001 | [task summary] | [agent] | In Progress | [timestamp] |
## Parallel Execution Tracking
| Slot | Agent | Task | Status |
|------|-------|------|--------|
| 1 | [agent] | [task] | Active |
| 2 | - | - | Available |
Input: "review the API for SQL injection vulnerabilities"
Analysis:
- Domain: security
- Action: review
- Technology: API/backend
Selection: Security Auditor (if available) or Code Reviewer
Reasoning: Security-focused review requires security expertise
Input: "implement user registration with email verification"
Analysis:
- Domain: backend
- Action: implement
- Technology: authentication
Selection: Software Engineer
Reasoning: Implementation task for new feature
Input: "write integration tests for the checkout flow"
Analysis:
- Domain: testing
- Action: write tests
- Technology: e-commerce
Selection: QA Engineer
Reasoning: Testing task requires QA expertise
Current State:
- Slot 1: Active (software-engineer working on auth)
- Slot 2: Active (qa-engineer writing tests)
Input: "refactor the database models"
Response:
"Cannot delegate now - maximum 2 agents already running.
Current tasks:
1. software-engineer: implementing auth
2. qa-engineer: writing tests
Task queued. Will delegate when a slot becomes available."
Map agents to Claude Code subagent types:
| Agent | subagent_type | Model |
|-------|---------------|-------|
| software-engineer | Explore or general-purpose | sonnet |
| code-reviewer | Explore | sonnet |
| qa-engineer | general-purpose | sonnet |
| code-searcher | Explore | sonnet |
| product-manager | Plan | sonnet |
When a subagent completes:
CLAUDE-activeContext.md:general-purpose subagent with detailed contextCLAUDE-activeContext.md with default structureWeekly roundup of top Claude Code skills, MCP servers, and AI coding tips.