Skip to content
Back to skills

Opt Review

ASecurity

Reviews a code diff for unnecessary bloat and over-engineering — speculative parameters, premature abstractions, dead code, hand-rolled standard library features, and redundant narration comments. Outputs a concise delete-list with exact line counts saved. Use before opening a PR or committing changes.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 17, 2026
ai-agentsshellnoderailsdebugginggit

Security analysis

A100/100

Scanned October 17, 2026

npx -y skills add airshell/ai-optimizer --skill opt-review --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Opt Review?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Opt Review
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/airshell-opt-review/badge)](https://www.skillsdirectory.com/skills/airshell-opt-review)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: opt-review
description: >-
  Reviews a code diff for unnecessary bloat and over-engineering — speculative
  parameters, premature abstractions, dead code, hand-rolled standard library
  features, and redundant narration comments. Outputs a concise delete-list
  with exact line counts saved. Use before opening a PR or committing changes.
license: MIT
metadata:
  origin: AI Optimizer
  maintainer: Airshell (https://github.com/airshell)
---

# Code Diff & Waste Pruner (`opt-review`)

Inspect a git diff or pull request specifically for code that should be **deleted**. Unlike standard code reviewers that focus on stylistic nitpicks, `opt-review` identifies speculative code, duplicate abstractions, and verbosity that unnecessarily inflate model context and codebase maintenance costs.

## When to Use

- Before committing changes or submitting a pull request
- When asked to "review this diff", "find bloat", "trim this change", or "clean up this code"
- To verify that an AI-generated solution adhered to strict YAGNI principles

## What to Flag for Deletion

1. **Speculative Over-Engineering**:
   - Parameters or configuration options added for hypothetical future requirements.
   - Single-caller wrapper functions or helper classes that obscure simple logic.
   - Hand-rolled utilities that native standard libraries already provide (`node:path`, `crypto`, `itertools`, `fetch`).
   - Adding a third-party package for functionality achievable in 3-5 lines of native code.
2. **Commentary & Prose Bloat**:
   - Dead code or commented-out debugging statements.
   - Redundant comments that simply restate what the code already says.
   - Verbose boilerplate and unnecessary intermediate variables.

## What NEVER to Cut (Protected Guardrails)

Never suggest cutting:
- Input validation, schema parsing, and boundary sanitization.
- Error handling, status codes, and exception boundaries.
- Authentication, authorization, and credential protection.
- Accessibility attributes (`aria-*`, keyboard handlers, semantic elements).
- Unit tests proving non-trivial logic.

## Output Format: Actionable Delete List

Present findings ordered by lines saved (deepest savings first):

```markdown
path/to/file.ext:line — cut [what]; [one-clause reason] (-N lines)
```

End with a summary line:
`Total: -N lines across M findings.`

If the diff is already minimal and clean, output:
`Verified: No over-engineering or dead code detected. Diff is lean and focused.`

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.