sub-agent-delegation
Delegate complex tasks to sub-agents for parallel autonomous work. Use when GPU kernel optimization, numerical correctness verification, performance profiling, or long-running validation would benefit from focused independent execution.
When & Why to Use This Skill
The Sub-Agent Delegation skill empowers Claude to orchestrate and manage multiple autonomous sub-agents for parallel task execution. It is specifically designed to handle high-complexity technical workflows—such as GPU kernel optimization, performance profiling, and numerical verification—by distributing focused workloads to independent agents, significantly increasing productivity and reducing time-to-completion for intensive engineering projects.
Use Cases
- GPU Kernel Optimization: Parallelize the optimization of independent operations like Attention and MLP modules using Triton or CUDA, featuring iterative benchmarking and hardware-specific tuning.
- Numerical Correctness Verification: Delegate the rigorous testing of mathematical models across diverse datasets to ensure precision and prevent regressions in complex algorithms.
- Performance Profiling & Analysis: Execute simultaneous investigations into multiple code paths to identify bottlenecks and generate detailed performance reports with real-world metrics.
- Long-running Validation Suites: Offload extensive automated testing and validation processes to sub-agents, allowing for continuous integration checks without blocking the main development flow.
| name | sub-agent-delegation |
|---|---|
| description | Delegate complex tasks to sub-agents for parallel autonomous work. Use when GPU kernel optimization, numerical correctness verification, performance profiling, or long-running validation would benefit from focused independent execution. |
Sub-Agent Delegation
Permissions
- NEVER spawn without explicit permission
- ASK first: "I've identified [TASK] for sub-agent delegation. Should I spawn one?"
- Explain WHY before requesting
When to Delegate
- GPU kernel optimization with iterative benchmarking
- Numerical correctness verification across test cases
- Performance profiling and analysis
- Parallel investigation of independent code paths
- Long-running validation suites
Patterns
- Parallel: Optimize independent kernels simultaneously (attention to A, MLP to B)
- Correctness First: Make tests pass before performance
- Incremental: Iterate until target speedup or report blockers
Kernel Optimization Template
Optimize [OPERATION] in [FILE].
Context: [current impl], [bottleneck source], [target HW: 3090/H100], [use case: train/inference]
Requirements:
1. Implement with Triton/CUDA
2. Verify: torch.allclose(atol=1e-5, rtol=1e-5), gradients match autograd
3. Benchmark: warmup=10, bench=100, report min/max/mean/std us
4. Scales: (1,128), (8,512), (32,2048)
Report: correctness status, perf table (scale, baseline_us, opt_us, speedup), memory
Workflow
Setup -> Develop -> Verify -> Benchmark -> Report
Requirements
- Report measured numbers, never estimates
- Include methodology (warmup, iterations, sync)
- Flag regressions immediately