# Subagent Dev

> Use when executing a multi-task plan where each task is independent, or when the user wants parallel or isolated task execution with review.

- **Type:** Skill
- **Install:** `agentstack add skill-huzaifa525-claude-code-optimizer-subagent-dev`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [huzaifa525](https://agentstack.voostack.com/s/huzaifa525)
- **Installs:** 0
- **Category:** [Developer Tools](https://agentstack.voostack.com/c/developer-tools)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [huzaifa525](https://github.com/huzaifa525)
- **Source:** https://github.com/huzaifa525/claude-code-optimizer/tree/master/templates/.claude/skills/subagent-dev
- **Website:** https://www.npmjs.com/package/claude-code-optimizer

## Install

```sh
agentstack add skill-huzaifa525-claude-code-optimizer-subagent-dev
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

Execute a plan using subagent-driven development for: **$ARGUMENTS**

## Iron Law

> **The controller coordinates. Subagents implement. Never mix roles.**

The controller agent (you) MUST NOT write production code directly. You dispatch subagents for each task, review their work, and coordinate the overall plan.

## Architecture

```
Controller (you)
  ├── Read the plan
  ├── For each task:
  │   ├── Dispatch Implementer subagent (fresh context)
  │   ├── Dispatch Spec Reviewer subagent
  │   ├── Dispatch Quality Reviewer subagent
  │   └── Handle status (DONE / CONCERNS / BLOCKED)
  └── Verify all tests pass at the end
```

## Steps

### 1. Load the Plan

Read `task_plan.md` or the user's task list. Extract all tasks with:
- Task description
- Files involved
- Dependencies (what must complete first)
- Acceptance criteria

### 2. Execute Each Task

For each task (respecting dependency order):

#### A. Dispatch Implementer

Launch a subagent with Agent tool:
```
Prompt: "Implement [task description].
Files to modify: [list]
Pattern to follow: [reference file]
Acceptance criteria: [criteria]
Run tests after implementation."
```

Use `model: "sonnet"` for mechanical tasks, `model: "opus"` for complex architecture.

#### B. Check Implementer Status

The implementer should report one of:

| Status | Meaning | Action |
|--------|---------|--------|
| **DONE** | Task complete, tests pass | Proceed to review |
| **DONE_WITH_CONCERNS** | Complete but has questions | Review concerns, decide if acceptable |
| **NEEDS_CONTEXT** | Missing information to proceed | Provide context, re-dispatch |
| **BLOCKED** | Cannot complete (dependency, bug) | Log blocker, skip to next task |

#### C. Two-Stage Review

**Stage 1 — Spec Compliance** (must pass first):
- Does the implementation match the task description?
- Are all acceptance criteria met?
- Were the correct files modified?

**Stage 2 — Code Quality** (only after Stage 1 passes):
- Does it follow existing codebase patterns?
- Are there security issues?
- Is the code clean and maintainable?

If either review fails, send feedback to a new implementer subagent for fixes.

### 3. Verify Everything

After all tasks are done:

```bash
# Run full test suite
[test command]

# Check for uncommitted changes
git status
```

### 4. Report

```
## Subagent Execution Report

### Tasks Completed: X/Y
| Task | Status | Implementer | Review |
|------|--------|-------------|--------|
| [task] | DONE | Pass | Pass |

### Files Changed
- [file list]

### Concerns Raised
- [any DONE_WITH_CONCERNS items]

### Blocked Items
- [any BLOCKED items with reasons]
```

## Anti-Rationalization

| Excuse | Rebuttal |
|--------|----------|
| "This task is too small for a subagent" | Small tasks are the BEST use of subagents — they get clean context |
| "I'll just make this quick fix myself" | You are the controller. Controllers don't write code. |
| "The review is overkill for this change" | Every change gets reviewed. No exceptions. |
| "I'll review everything at the end" | Review after EACH task. Catching issues early is 10x cheaper. |
| "The tests were passing before my changes" | Verify. Don't assume. Run them. |

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [huzaifa525](https://github.com/huzaifa525)
- **Source:** [huzaifa525/claude-code-optimizer](https://github.com/huzaifa525/claude-code-optimizer)
- **License:** MIT
- **Homepage:** https://www.npmjs.com/package/claude-code-optimizer

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-huzaifa525-claude-code-optimizer-subagent-dev
- Seller: https://agentstack.voostack.com/s/huzaifa525
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
