← ClaudeAtlas

optimize-approachlisted

Reviews whether a change takes the most optimal approach for its stated intent and, when it does not, researches the code, validates a concretely better approach via holistic analysis, and either proposes it (report mode) or applies it behind a confidence gate (apply mode). Judges four axes — codebase-fit, simplicity, performance, robustness — at the approach level, deferring line-level and failure-mode findings to code-quality, critical, and holistic-review. Stays silent when the approach is already optimal (quiet early-exit). A `plan` mode reviews a drafted plan's approach at plan time (aw-planner Phase 1) — the cheapest moment to switch. Called by the reviewer and pr-reviewer agents, the polish skill, and aw-planner as a default-on lens; also runnable standalone. Triggers on "is this the best approach", "better way to do this", "is this optimal", "optimize this approach", "rethink the approach", "/optimize-approach".
mthines/agent-skills · ★ 13 · Code & Development · score 79
Install: claude install-skill mthines/agent-skills
# Optimize Approach Given a change and its intent, decide whether it takes the **most optimal approach** — and if not, propose or apply a concretely better one. This skill is the fourth review lens in this repo, distinct from the three that already exist: | Lens | Question | Applies? | | --- | --- | --- | | `holistic-analysis` review | Does the diff *do what it claims* and *fit the system*? | No | | `critical` | How could this *fail*? | No | | `code-quality` simplify | Can this be *mechanically* simpler? | Yes — Class M only | | **`optimize-approach`** *(this skill)* | Is this the *most optimal approach*, and if not what is? | Yes — gated | > **This `SKILL.md` is a thin index.** Detailed rules live in `rules/*.md` and load on demand. --- ## Mode Detection Parse the **first token** of `$ARGUMENTS`. | Mode | Default | Trigger | What it does | | --- | --- | --- | --- | | `report` | **yes** | No mode token, or `report` | Emit a structured proposal (or nothing when optimal). Never edits files. | | `apply` | | First token `apply` | Same analysis, then apply the top proposal behind a confidence gate. Own-work contexts only. | | `plan` | | First token `plan` | Review a drafted plan's approach at plan time (aw-planner Phase 1). Returns plan-level proposals; the planner revises the plan. See [`rules/plan-mode.md`](./rules/plan-mode.md). | ## Flags | Flag | Applies to | Effect | | --- | --- | --- | | `--no-confidence-gate` | `apply` | **Human-only override.** Bypasses the `con