# Code Optimizer

> Deep code optimization and bug hunting. Use when the user asks to optimize performance, find bugs, analyze edge cases, detect memory leaks, or review code quality. Runs a three-subagent pipeline: analyzer -> planner -> executor with explicit user confirmation before changes.

- **Type:** Skill
- **Install:** `agentstack add skill-mingo07-dev-claude-skills-code-optimizer`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [Mingo07-dev](https://agentstack.voostack.com/s/mingo07-dev)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** Apache-2.0
- **Upstream author:** [Mingo07-dev](https://github.com/Mingo07-dev)
- **Source:** https://github.com/Mingo07-dev/claude_skills/tree/main/code-optimizer

## Install

```sh
agentstack add skill-mingo07-dev-claude-skills-code-optimizer
```

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

## About

# Code optimizer (three subagents)

## When to use

- Performance problems or slow code
- Suspected memory leaks or resource misuse
- Silent bugs or edge cases
- Deep code review before release

## Goal

Identify and fix bugs, inefficiencies, and resource issues using a three-stage pipeline with required user confirmation before applying changes.

## Pipeline overview

```
Parent Agent
  -> Subagent 1: Analyzer (write /tmp/code-analysis.md)
  -> Subagent 2: Planner (write /tmp/optimization-plan.md)
  -> Pause for user approval
  -> Subagent 3: Executor (apply fixes, write OPTIMIZATION_REPORT.md)
```

## Phase 1: Parent reconnaissance

1. Determine scope (files, directory, or full codebase)
2. Collect context (CLAUDE.md, package.json, requirements.txt, etc.)
3. Run baseline tests if present
4. Pass scope and context to Subagent 1

## Phase 2: Subagent 1 (Analyzer)

Use the analysis checklist and output format in [references/analysis-checklist.md](references/analysis-checklist.md).
Write `/tmp/code-analysis.md`.

## Phase 3: Subagent 2 (Planner)

Use the plan template in [references/plan-format.md](references/plan-format.md).
Write `/tmp/optimization-plan.md`.

## Phase 4: Pause and confirm

Present the plan summary and ask the user whether to apply all fixes, only critical/high, or a subset. Do not continue without explicit confirmation.

## Phase 5: Subagent 3 (Executor)

Apply only approved fixes, run tests for high-risk changes, and write `OPTIMIZATION_REPORT.md`.

## Notes

- Subagents 1 and 2 never modify files.
- The pause before execution is mandatory.
- This skill complements `refactoring` (structure/readability) with correctness and performance focus.

## Source & license

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

- **Author:** [Mingo07-dev](https://github.com/Mingo07-dev)
- **Source:** [Mingo07-dev/claude_skills](https://github.com/Mingo07-dev/claude_skills)
- **License:** Apache-2.0

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-mingo07-dev-claude-skills-code-optimizer
- Seller: https://agentstack.voostack.com/s/mingo07-dev
- 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%.
