home / skills / duc01226 / easyplatform / cook-parallel

cook-parallel skill

/.claude/skills/cook-parallel

This skill executes multiple tasks in parallel across backend and frontend components, maximizing efficiency while maintaining strict file ownership and

npx playbooks add skill duc01226/easyplatform --skill cook-parallel

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
3.2 KB
---
name: cook-parallel
description: "[Implementation] ⚡⚡⚡ Parallel implementation - multiple tasks simultaneously"
argument-hint: [tasks]
infer: true
---

Execute these tasks in parallel for maximum efficiency:
<tasks>$ARGUMENTS</tasks>

**Mode:** PARALLEL - Multiple subagents working concurrently.

## ⚠️ Anti-Hallucination Reminder

**Before modifying ANY code:** Verify assumptions with actual code evidence. Search for usages, read implementations, trace dependencies. If confidence < 90% on any change, investigate first or ask user. See `.claude/skills/shared/anti-hallucination-protocol.md` for full protocol.

## Workflow

### 1. Task Decomposition
- Analyze tasks for independence
- Group into parallelizable work units
- Identify dependencies between units
- Create dependency graph

### 2. Parallel Research (if needed)
Launch multiple `researcher` subagents simultaneously:
```
Task A research ──┐
Task B research ──┼──► Synthesis
Task C research ──┘
```

### 3. Parallel Planning
- Use `planner` subagent with synthesized research
- Create plan with parallel-safe phases
- Mark file ownership boundaries (prevent conflicts)

### 4. Parallel Implementation
Launch multiple `fullstack-developer` subagents:
```
Phase 1 (Backend API) ──┐
Phase 2 (Frontend UI) ──┼──► Integration
Phase 3 (Tests)       ──┘
```

**Critical:** Each subagent must stay within file ownership boundaries.

### 5. Integration & Testing
- Merge parallel outputs
- Use `tester` subagent for integration tests
- Use `debugger` if integration issues found

### 6. Review & Report
- Use `code-reviewer` for final review
- Consolidate all changes
- Report to user

## Parallelization Rules

| Rule                 | Description                                    |
| -------------------- | ---------------------------------------------- |
| **File Ownership**   | Each subagent owns specific files - no overlap |
| **Dependency Order** | Respect dependency graph                       |
| **Max Concurrent**   | 3 subagents max to prevent conflicts           |
| **Sync Points**      | Integration checkpoints between phases         |

## When to Use

- Multi-component features (backend + frontend)
- Large refactoring across independent modules
- Parallel test writing
- Documentation updates alongside code

## Example Task Split

```
"Add user authentication with login UI"
├── Backend API (subagent 1)
│   ├── auth-controller.ts
│   └── auth-service.ts
├── Frontend UI (subagent 2)
│   ├── login-page.component.ts
│   └── login-form.component.ts
└── Tests (subagent 3)
    ├── auth.spec.ts
    └── login.e2e.ts
```

## Trade-offs

| Aspect       | Parallel             | Sequential |
| ------------ | -------------------- | ---------- |
| Speed        | ~2-3x faster         | Baseline   |
| Coordination | Higher complexity    | Simple     |
| Conflicts    | Risk of merge issues | None       |
| Context      | Split across agents  | Unified    |

## IMPORTANT Task Planning Notes

- Always plan and break many small todo tasks
- Always add a final review todo task to review the works done at the end to find any fix or enhancement needed

Overview

This skill runs multiple development tasks in parallel to accelerate delivery of multi-component work. It decomposes a request into independent work units, assigns ownership to parallel subagents, and enforces coordination rules to avoid conflicts. The goal is faster implementation, testing, and integration while preserving code integrity.

How this skill works

The skill analyzes incoming tasks for independence and builds a dependency graph, then groups tasks into at most three concurrent subagents to limit merge conflicts. Subagents perform research, planning, implementation, and testing in parallel within assigned file ownership boundaries. Integration checkpoints, automated tests, and code reviews consolidate outputs and surface issues for debugging.

When to use it

  • Delivering features that span backend, frontend, and tests simultaneously
  • Large refactors across independent modules where changes can be isolated
  • Writing parallel test suites or test automation while implementation progresses
  • Updating documentation alongside code without blocking developers
  • Time-constrained sprints where speed outweighs coordination overhead

Best practices

  • Verify assumptions against actual code before making changes; inspect usages and implementations
  • Break work into small, clearly owned tasks and add a final review task for integration fixes
  • Respect the dependency graph and schedule sync points at each integration phase
  • Limit concurrent subagents to three and enforce strict file ownership to avoid overlap
  • Use automated tests and a dedicated tester subagent to validate merged outputs

Example use cases

  • Implement authentication: backend API, login UI, and end-to-end tests run in parallel
  • Large-scale refactor: split modules into three parallel owners and verify integration
  • Feature development: backend endpoints, client components, and component tests implemented concurrently
  • Documentation drive: update docs, code samples, and deployment scripts simultaneously with code changes
  • Test expansion: create unit, integration, and e2e tests in parallel while code stabilizes

FAQ

How many subagents should run concurrently?

Keep a maximum of three concurrent subagents to reduce merge conflicts and coordination overhead.

What if a subagent needs to edit the same file as another?

Avoid overlapping file ownership; if unavoidable, serialize the conflicting work or create a clear handoff and merge plan at a sync point.