parallel-agents
Concurrent agent dispatch for independent problems. Use when facing multiple independent tasks that can be worked on simultaneously. Reduces total time by parallelizing work that has no shared state.
What this skill does
# Parallel Agents
Dispatch multiple agents concurrently for independent problems.
## Purpose
Sequential investigation of independent problems wastes time. When multiple issues have different root causes and don't
affect each other, dispatching agents in parallel reduces total resolution time significantly.
## When to Use
Use parallel agents when:
- 3+ test files failing with different root causes
- Multiple subsystems broken independently
- Independent tasks in a plan that don't share state
- Bulk operations across unrelated files
**Do NOT use when:**
- Failures might be related (fixing one might fix others)
- Tasks have sequential dependencies
- Changes could conflict with each other
- Shared state exists between tasks
## Decision Framework
Before parallelizing, ask:
```text
1. Are these problems truly independent?
- Different files?
- Different subsystems?
- No shared data or state?
2. Could fixing one affect another?
- Shared dependencies?
- Common configuration?
- Overlapping code paths?
3. Will changes conflict?
- Same file modifications?
- Related API changes?
- Interconnected tests?
```
If any answer suggests dependency, work sequentially instead.
## The Parallel Process
### Step 1: Identify Independent Problems
Group failures or tasks by independence:
```text
Test failures example:
- auth.test.js: Login validation errors (auth subsystem)
- api.test.js: Endpoint routing issues (api subsystem)
- db.test.js: Connection pool exhaustion (database subsystem)
Assessment: Independent subsystems, can parallelize
```
### Step 2: Create Focused Agent Prompts
Each agent needs a self-contained, focused prompt:
```text
Good prompt structure:
- ONE clear problem to solve
- ALL necessary context included
- SPECIFIC about expected output
- NO dependencies on other agents
```
Example prompts:
```text
Agent 1 - Auth fixes:
"Fix the login validation errors in auth.test.js.
The tests expect [specific behavior].
Current error: [error message].
Do not modify files outside src/auth/."
Agent 2 - API fixes:
"Fix the endpoint routing issues in api.test.js.
Routes should map to [expected handlers].
Current error: [error message].
Do not modify files outside src/api/."
Agent 3 - Database fixes:
"Fix the connection pool exhaustion in db.test.js.
Pool should handle [expected load].
Current error: [error message].
Do not modify files outside src/db/."
```
### Step 3: Dispatch Concurrently
Use Task tool with multiple invocations in a single message:
```text
Task tool invocations (all in one message):
1. Agent for auth fixes
2. Agent for API fixes
3. Agent for database fixes
All agents run concurrently.
```
### Step 4: Review Results
When agents complete:
```text
For each agent result:
1. Read the summary
2. Verify the claimed fix
3. Check for conflicts with other agents
4. Run affected tests
```
### Step 5: Integrate Changes
If no conflicts:
```text
1. Accept all changes
2. Run full test suite
3. Verify no regressions
```
If conflicts exist:
```text
1. Identify conflicting changes
2. Resolve conflicts manually
3. Run full test suite
4. Verify resolution is correct
```
## Agent Prompt Requirements
### Must Have
- **Focused scope**: One problem domain only
- **Self-contained context**: All info agent needs
- **Clear deliverable**: What success looks like
- **Boundary constraints**: What NOT to touch
### Must Avoid
- **Overly broad scope**: "Fix all the tests"
- **Missing context**: Assuming agent knows background
- **Vague deliverable**: "Make it work"
- **No boundaries**: Free rein to change anything
## Example: Multiple Test Failures
Situation: 6 failures across 3 test files
```text
Analysis:
- tests/auth.test.js: 2 failures (login, logout)
- tests/api.test.js: 3 failures (GET, POST, DELETE)
- tests/db.test.js: 1 failure (connection timeout)
Independence check:
- Auth tests: Isolated authentication logic
- API tests: Isolated route handling
- DB tests: Isolated database operations
Decision: Parallelize - no shared dependencies
```
Agent dispatch:
```text
Agent 1: "Fix auth.test.js failures. Login should [spec].
Logout should [spec]. Error: [message]."
Agent 2: "Fix api.test.js failures. GET should [spec].
POST should [spec]. DELETE should [spec]. Error: [message]."
Agent 3: "Fix db.test.js failure. Connection should [spec].
Current timeout at [duration]. Error: [message]."
```
Results:
```text
Agent 1: Fixed login validation, logout token cleanup
Agent 2: Fixed route registration order
Agent 3: Increased pool size and added retry logic
Conflict check: No overlapping files
Integration: All changes accepted
Final tests: All passing
```
## Integration with Implement Phase
Use during implementation when:
- Multiple plan steps are independent
- Test failures span unrelated subsystems
- Bulk changes across independent files
```text
Plan step identifies parallelizable work
→ Verify independence
→ Create focused agent prompts
→ Dispatch concurrently
→ Review and integrate
→ Continue with next plan step
```
## Conflict Resolution
When agents modify overlapping code:
```text
1. Identify the conflict
- Same file?
- Same function?
- Incompatible changes?
2. Determine precedence
- Which change is more correct?
- Which aligns with requirements?
- Which has fewer side effects?
3. Merge carefully
- Take best of both if compatible
- Choose one if mutually exclusive
- Test merged result
4. Verify resolution
- Run affected tests
- Check for regressions
- Document the resolution
```
## Anti-Patterns
### Parallelizing Related Problems
**Wrong**: Dispatch agents for potentially related failures
**Right**: Verify independence before parallelizing
### Overly Broad Agent Prompts
**Wrong**: "Fix all failing tests in this area"
**Right**: "Fix specific failure X with context Y"
### Ignoring Conflicts
**Wrong**: Accept all agent outputs without checking
**Right**: Review for conflicts before integrating
### Too Many Parallel Agents
**Wrong**: Dispatch 10+ agents simultaneously
**Right**: Keep to 3-5 agents for manageability
### No Boundary Constraints
**Wrong**: Let agents modify any file
**Right**: Constrain each agent to relevant files
## Checklist Before Dispatching
- [ ] Problems verified as independent
- [ ] No shared state between tasks
- [ ] Changes won't conflict
- [ ] Each agent prompt is focused
- [ ] Each agent prompt is self-contained
- [ ] Boundaries specified for each agent
- [ ] Expected output is clear
## Checklist After Completion
- [ ] All agent results reviewed
- [ ] Conflicts identified and resolved
- [ ] Full test suite passes
- [ ] No regressions introduced
- [ ] Changes integrated cleanly
Related in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.