/soong:polishfrom soong
Run a code review with autofix, then a simplification pass, then commit the result. Use when the user runs /polish, or asks to review and clean up the current changes in one shot, autofix the review findings, or "review and simplify and commit". Runs unattended - it applies fixes and commits without asking.
Ships in soong. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Review the changed code, fix what is broken, simplify what is left, then commit. You do the work yourself. Do not dispatch an agent.
This skill runs unattended. The user chose autofix and auto-commit, so apply every finding and do not ask for approval.
Find the changed code. When a caller passed a base, use it. Absent one, resolve it:
gh pr view --json baseRefName -q .baseRefName (if a PR exists).git rev-parse --abbrev-ref --symbolic-full-name @{u}.Then check for work to review:
git status --porcelain
git rev-list --count <base>..HEAD
If the tree is clean and the count is zero, there is nothing to review.
Say so in one line and stop. Otherwise the changed code is
git diff <base>...HEAD plus the working tree. Review the changed lines and
the code they touch. Do not fix a problem that was already there before this
branch.
Pass 1: correctness. Find bugs that make the code do the wrong thing, then fix them.
Look for: off-by-one and boundary errors, wrong comparison operators, inverted conditions, missing null and empty cases, missing tenant or scope filters on queries, unhandled error paths, resource leaks, race conditions, and state mutated where a copy was meant.
For each candidate, write the failure first: the input or state that reaches it, and the wrong output or crash it produces. A candidate with no such failure is not a bug. Drop it. Apply the smallest fix that removes the failure.
Pass 2: simplification. Only after pass 1 is applied. Simplifying over buggy code simplifies the wrong thing.
Look for: code that reimplements something the repository or the standard library already provides, an abstraction with one implementation, a parameter or branch nothing reaches, a hand-rolled loop where an existing helper fits, and repeated work that a single call covers.
Match the surrounding code. Never change behaviour in this pass. Never touch a file outside the changed set. If a fix needs a decision you cannot make, leave the code alone and report it as not applied.
Verify. Figure out how this repo verifies a build before running anything. Look at CLAUDE.md / README, the build config, and lockfiles. Prefer what the project documents. Checks can live as scripts beside the code, so look there too. When a caller already resolved the check, use it.
If the failure looks like stale or missing dependencies, run the install command once before treating it as real.
If the check still fails, do not commit. Report the failure with the command output and stop.
If the project declares no check, say so. Never claim verification that did not run.
Commit. If the current branch is the repository default branch, branch before committing:
git switch -c polish/$(git rev-parse --short HEAD)
Never do this when another skill invoked polish. A caller has already named the branch it expects to push. When a caller invoked polish on the default branch, stop and say so.
Stage the files you edited, by path, and commit:
git add <path> [<path>...]
git commit -m "refactor: apply code review and simplification findings"
Use fix: instead of refactor: when you fixed a real bug. Add a body only
when the fixes are not obvious from the diff. When you changed nothing, do
not commit.
Never git add -A or git commit -a: the tree can hold unrelated edits.
Never add a generated-by footer or a Claude attribution tag.
One sentence per finding. No preamble, no restatement of the diff, no next-step suggestions.
Reviewed 6 files.
Fixed
- Token expiry check used `<`, so a token expiring this second passed.
Simplified
- Replaced the hand-rolled retry loop with the existing `withRetry` helper.
Checked with `<the project's own check>`. Committed as a1b2c3d.
Review found nothing. or Nothing to simplify.No project check configured.Not applied: <one sentence>.| Case | Response |
|---|---|
| A fix leaves a merge conflict marker or a broken file | Report the file and stop before the commit. |
| On the default branch, invoked by another skill | Stop and say so. Do not switch branches under a caller. |
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
9 skills in this plugin
/developTake a Notion roadmap item and build its whole task stack as stacked pull requests, one pull request per task, asking any questions the task cards leave open before writing code. Use when the user runs /develop, or asks to implement a roadmap item, build out a stack of tasks, or start development from prepared task cards. Requires the repo to be configured via soong-setup first./manage-prUse for any work on a pull request — writing or rewriting its title and description when creating or editing a PR, and responding to reviewers on your own open PR. Enforces the Conventional-Commits-with-scope title format, an optional Notion ticket id suffix, and a simple-prose description style. Walks unresolved review threads one-by-one with the user, then posts all replies in one batch after approval. Forbids generated-by footers and Claude attribution tags on both. Also persists a project/branch -> notion card + last commit record outside the repo for later querying. Triggers on "open a PR", "create a pull request", "write the PR title/description", "address the PR feedback", "reply to the reviewers", "go through the review comments", "respond to the PR comments", or any `gh pr create` / `gh pr edit` / `gh pr comment`./mergeMerge a base branch into the current feature branch and push the result, resolving conflicts file-by-file. Use when the user asks to "merge", "merge back", catch a feature branch up with its base, or pull base-branch changes into the current branch. "Base" most likely means the branch the feature was cut from or the PR's base branch, not necessarily a branch literally named "development".npx claudepluginhub konvoulgaris/soong --plugin soong