skills/code-polish/SKILL.md
Use for combined simplification and review: polish code, clean up and review/fix, simplify then review, refactor and review, or full code polish on recent changes.
npx skillsauth add paulrberg/dot-agents code-polishInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Run a combined pipeline on recently changed code: code-simplify for readability and maintainability, then code-review --fix for correctness, security, and quality with fixes applied. One scope resolution, one user-facing report, no redundant simplify-phase verification.
--skip-profile <name>: Forward unchanged to code-review. Repeatable._lib.ts into smaller files"): execute during the simplify phase.This skill requires code-simplify and code-review installed as sibling skills.
../code-simplify/SKILL.md or ../code-review/SKILL.md, relative to this file — and follow its instructions inline as if it were invoked with the stated arguments. Flags such as --fix are instructions to interpret, not commands to execute.SKILL.md is missing, stop and report which one.Resolve scope once, then treat the result as fixed for the rest of the run.
git rev-parse --git-dir. If this fails, stop and tell the user to run from a git repository.resolved-scope fenced block with one repo-relative path per line — scope is exactly those targets. Map natural-language subsets to concrete paths before continuing.git diff --name-only --diff-filter=ACMRgit ls-files --others --exclude-standardresolved-scope, one repo-relative path per line. The block is authoritative: do not re-run scope commands or revisit exclusions afterward.resolved-scope block.Run code-simplify (per Running Sub-Skills) with:
resolved-scope block--no-verify and --no-reportTell it not to broaden or rediscover scope.
Run code-review (per Running Sub-Skills) with:
resolved-scope block--fix--skip-profile flags from the userSkip the naming profile only when the user asks for a speed-first pass, never by default.
Produce the Report section below. Both phases must have completed first (see Stop Conditions).
Use these section headings, in this order. Omit sections that do not apply — do not number them and do not leave gaps or placeholders.
Files and functions touched, final state.
Key changes from the simplify phase, derived from the diff when needed — the phase ran with --no-report.
Findings and applied fixes from the review phase, ordered CRITICAL -> HIGH -> MEDIUM -> LOW.
Commands run and outcomes, including skipped checks.
One line per risk: Assumed <assumption>; if wrong, <what breaks>; check via <command or inspection>. Plain language — expand or gloss domain-specific terms. Include questions that need a user decision, phrased directly. Write None. when there are none.
Stop and ask for direction when:
code-simplify or code-review is not installed as a sibling skill.Completion gate: a polish run is complete only after both phases have run over the resolved scope and the Report above is produced. Never end the run after the simplify phase alone; if the review phase did not run, state explicitly that the polish is incomplete and which phase is missing.
testing
Use ONLY to check or update the project-scoped agent skills installed under .agents/skills so they match the current state of the repo. Do not trigger for creating, finding, or installing skills, or for README/AGENTS.md updates.
testing
Use when CSV, TSV, or Excel (.xlsx) is the primary input/output: inspect, clean, transform, dedupe, merge, validate, convert, recalc formulas, or create/fix spreadsheets. Do not trigger when tabular data is incidental.
testing
Use only when explicitly asked to archive/prune/compact/roll over checked tasks from TODO.md into `.ai/todos/TODO_UNTIL_YYYY_MM_DD.md`, leaving unchecked tasks.
development
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved.