Skills

Middle skill · v2.3.3

Middle

Score a project or improve one selected quality dimension through a scoped, evidence-backed diagnosis and a normally approval-gated correction plan.

Installation

Add it to your agent

Run the command from your project, then let the installer place the selected skill in the agent directories you choose.

npx skills add bastndev/skills --skill middle

Middle is for a project that already works but needs a focused pass. It keeps each run on one quality dimension, backs findings with repository evidence, and separates diagnosis from implementation so broad cleanup does not quietly expand beyond the requested scope.

Use it for a report-only overview or choose the exact kind of improvement you want to make.

Choose one focus

Option Focus Result
0 Overview A report-only health score from 0 to 100
1 Performance Repeated work, hot paths, resource leaks, oversized bundles or assets, and unnecessary rendering
2 UI/UX Usability, accessibility, responsive behavior, and interaction quality
3 Tidy File ordering and comment hygiene only
4 Security Secrets, unsafe inputs, injection surfaces, authorization gaps, and sensitive data exposure
5 Structure Ownership, coupling, responsibility placement, and architectural boundaries
6 Cleanup Dead or unreachable code, unused items, duplication, debug leftovers, and obsolete assets
7 Code quality Naming, complexity, error handling, magic values, copy-paste variation, and consistency

The selected option is a boundary, not a suggestion. A performance pass does not become a redesign, and a cleanup pass does not introduce a new architecture without evidence and approval.

The normal workflow

Middle first establishes the requested scope and checks the current worktree so existing edits can be distinguished from its own work. It inspects the files that own the selected concern, runs relevant read-only checks, and produces a focus score with concrete findings.

For options 1 through 7, the report ends with a compact phased plan. A normal go authorizes exactly one phase. That makes each change set reviewable and gives the maintainer a clear point to adjust direction before the next phase begins.

Evidence and restraint

Findings distinguish confirmed defects from risks, suggestions, and subjective preferences. UI work respects the product’s established visual language. Security claims identify the actual input, boundary, or exposure involved. Dead-code findings verify imports and runtime ownership before removal.

Middle does not add dependencies without authorization, and it does not create a test structure when the project has none. It uses the repository’s package manager and available validation commands, then reports what those checks can—and cannot—prove.

The tidy exception

Option 3 has one narrow fast path: when the request targets a single file of roughly 500 lines or fewer, Middle may directly improve ordering and comment hygiene without first writing a report and waiting for approval.

That exception never authorizes behavioral changes. Tidy leaves logic untouched; only a critical security or data-loss issue outside the selected lens is surfaced, report-only, instead of being folded into the edit.