Generic parallel agent dispatch for independent problems — verify independence, dispatch, merge results
Dispatches parallel agents to investigate independent problems, verifies independence, merges results, and flags conflicts.
npx claudepluginhub jugrajsingh/skillgardenThis skill is limited to using the following tools:
Dispatch parallel agents for a list of independent problems. Verify independence, dispatch via Task tool, merge results, and flag conflicts.
Problem list from $ARGUMENTS (newline or comma separated).
If $ARGUMENTS is empty, ask via AskUserQuestion:
- question: "List the independent problems to investigate (one per line):"
options:
- "Enter problems separated by newlines"
- "Enter problems separated by commas"
Parse the problem list. For each pair of problems, check for dependencies:
| Dependency Type | Detection | Action |
|---|---|---|
| Shared state | Both reference same variable/config | Flag as dependent |
| Shared files | Both modify same file | Flag as dependent |
| Ordering | One problem's output is another's input | Flag as dependent |
| Conceptual | Related but no data dependency | Allow parallel |
If dependencies found, present them via AskUserQuestion:
- question: "These problems have dependencies. How should I proceed?"
options:
- "Run sequentially in dependency order"
- "Split into independent sub-problems"
- "Proceed anyway (I accept potential conflicts)"
Maximum 5 parallel agents. If more than 5 problems:
- question: "I grouped {N} problems into {M} groups. Approve grouping?"
options:
- "Approve grouping"
- "Show me the groups first"
- "Run first 5 only, queue the rest"
For each problem, spawn a Task agent with:
| Problem Type | Agent Approach |
|---|---|
| Codebase question | Use Glob, Grep, Read tools for exploration |
| Command/script task | Use Bash tool for execution |
| Mixed investigation | Use all available tools |
Task prompt template:
Investigate the following problem independently.
Problem: {problem statement}
Project root: {project path}
Produce structured findings in markdown:
## Problem: {problem statement}
### Findings
{detailed findings with file:line citations where applicable}
### Conclusion
{direct answer to the problem}
Wait for all Task agents to complete. Track status:
| Agent | Problem | Status |
|---|---|---|
| 1 | {problem} | complete / failed / timeout |
| 2 | {problem} | complete / failed / timeout |
For failed agents, include the failure reason in the merged output.
Compare results across agents. Flag conflicts when:
Present conflicts clearly:
## Conflict Detected
Agent 1 (Problem: X) says: {finding}
Agent 2 (Problem: Y) says: {contradictory finding}
Both reference: path/to/file.py:42
Combine all agent outputs into a single document:
## Dispatch Results
### Problem 1: {statement}
{agent output}
### Problem 2: {statement}
{agent output}
### Conflicts (if any)
{conflict details}
Present merged results. If conflicts exist, ask user to resolve:
- question: "Conflicts detected between agents. How should I resolve?"
options:
- "Keep Agent 1's finding"
- "Keep Agent 2's finding"
- "Investigate further"
- "Keep both with caveat"
| Rule | Rationale |
|---|---|
| Max 5 parallel agents | Resource and context limits |
| Verify independence first | Dependent parallel tasks produce corrupt results |
| Never dispatch dependent problems in parallel | Ordering matters for dependent work |
| Each agent gets fresh context | No shared state between agents |
| Flag all conflicts | Silent resolution hides important disagreements |
| Include failure reasons | Failed agents still provide useful signal |
Present the final merged result:
## Dispatch Complete
Problems: {total} dispatched, {successful} successful, {failed} failed
Conflicts: {count}
{merged results document}
Expert guidance for Next.js Cache Components and Partial Prerendering (PPR). **PROACTIVE ACTIVATION**: Use this skill automatically when working in Next.js projects that have `cacheComponents: true` in their next.config.ts/next.config.js. When this config is detected, proactively apply Cache Components patterns and best practices to all React Server Component implementations. **DETECTION**: At the start of a session in a Next.js project, check for `cacheComponents: true` in next.config. If enabled, this skill's patterns should guide all component authoring, data fetching, and caching decisions. **USE CASES**: Implementing 'use cache' directive, configuring cache lifetimes with cacheLife(), tagging cached data with cacheTag(), invalidating caches with updateTag()/revalidateTag(), optimizing static vs dynamic content boundaries, debugging cache issues, and reviewing Cache Component implementations.
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.