Install
openclaw skills install code-polishPre-release code review - runs lint/type checks, then launches 3 parallel review agents (cleanliness, design, efficiency) to analyze the diff, synthesizes a unified report, and fixes with approval. Use before committing, pushing, or releasing changes. Triggers on "review code", "check before commit", "cleanup before release", "review changes", "is this ready to ship", "polish before release", "simplify".
openclaw skills install code-polishCurrent branch: !git rev-parse --abbrev-ref HEAD
Uncommitted changes: !git diff --stat 2>/dev/null | tail -1
logger.info, logger.error) from debug leftovers (console.log, console.debug)Run the project's lint + type-check command. Check CLAUDE.md for the correct validation command (commonly pnpm check, just check, cargo clippy, uv run ruff check, etc.).
If checks fail:
If no validation command is found in CLAUDE.md, ask the user what to run.
Determine what changed:
git diff + git diff --cachedgit diff main...HEADRead every changed file fully. Understand what each change does and why.
Use the Agent tool to launch all three agents concurrently in a single message. Pass each agent the full diff and the list of changed files so it has the complete context.
Fast, mechanical, high-confidence. Looks for junk that should be removed.
console.log, console.debug, console.warn added during development; temporary debug variables, hardcoded test values. NOT structured logger calls (logger.info, logger.error, c.var.logger)TODO/FIXME/HACK markers left by Claude (not by the user); unnecessary type annotations where the language infers correctly; emoji in code or comments (unless the project uses them)0, 1, true, HTTP status codesRequires codebase exploration beyond the diff. Looks for structural and design issues.
Looks for runtime performance and resource issues.
r.ok), unhandled promise rejections on external calls, missing error handling at I/O boundariesBefore presenting anything, verify every finding from the agents against actual code. Drop any finding that fails validation.
For each finding:
logger.*, c.var.logger.*)Only findings that survive validation proceed to the report.
Synthesize validated findings into a single deduplicated report. If multiple agents flagged the same code, merge into one finding. Group by category:
## Review Findings
### Cleanliness (N issues)
1. `path/to/file.ts:42` - console.log("debug response")
2. ...
### Design (N issues)
1. `path/to/file.ts:15-18` - hand-rolled path join, use existing `resolveAssetPath` from shared/utils
2. ...
### Efficiency (N issues)
1. `path/to/file.ts:30-45` - sequential awaits on independent API calls, use Promise.all
2. ...
**Total: X issues across Y categories**
**Awaiting approval before proceeding with fixes.**
If zero issues found, report "Clean - no issues found" and stop.
The report MUST end with the line "Awaiting approval before proceeding with fixes." (or "Clean - no issues found"). Do not proceed to Phase 6 until the user explicitly approves.
After user approves: