improve-code
Installation
SKILL.md
Goal
Reduce demonstrated maintenance cost while preserving supported behavior, or return an assessment of proposed changes and checks.
Definition of Done
- Maintenance cost, preserved contracts, callers, and relevant failures are identified.
- Assessment returns candidates and checks without transformations or execution.
- An authorized change is minimal and has before/after caller evidence.
- Unverified transformations and remaining risk are explicit.
- Current validation accepts the selected mode; an unmet required criterion remains REVISE or BLOCKED.
Workflow
- Resolve maintenance cost, contracts, scope, mode, preservation criteria, and evidence from the request, consumer rules, configuration, and loaded principles. Inspect application, test, build, deployment, and recovery consumers before declaring code unused.
- Establish an authorized baseline. When architecture, test coverage, or runtime performance is in scope, use the relevant Code architecture, Code test management, or Runtime performance procedure; use Workspace Turborepo only for a consumer using Turborepo whose workspace boundary is in scope. Pass mode, scope, candidate, and evidence; in assessment mode, inspect criteria and propose checks only. Prefer deletion or existing interfaces. Rank candidates by demonstrated benefit and preservation risk; drop cosmetic churn and consolidate overlapping work.
- In change mode, make the smallest authorized transformation while preserving dependency direction, validation, errors, documentation, and unique test protection.
- In change mode, exercise affected real callers before and after, including applicable success, failure, denial, compatibility, packaging, and build behavior.
- Before reporting substantive work, validate the change or ranked assessment shortlist through Quality validation, passing mode, scope, candidate, and evidence. If unavailable, self-assess, obtain independent review and critique, repair within mode, and renew affected checks and verdicts.