一键导入
polish
Find things to improve in the current project
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Find things to improve in the current project
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when executing a multi-step plan and each implementation step should be delegated to subagents and independently reviewed.
Use when reviewing local changes — the working-copy diff, a branch, a commit, or a GitHub PR by number — with fresh reviewer subagents that return structured findings.
Use when a test failure, regression, exception, hang, wrong result, or unexpected behavior needs diagnosis — gathers evidence, traces the relevant path, and verifies the cause before recommending a fix.
Resolve jj (Jujutsu) conflicts. Use when jj log/status shows conflicted revisions, a rebase/squash/abandon reports 'new conflicts appeared', or files contain jj conflict markers.
Use when you want to work in an isolated jj working copy — parallel task, experimental scratch, subagent with its own tree. jj's equivalent of git worktrees: creating a workspace, working inside it from anywhere, and cleaning up without losing history.
Build a mental model of code changes — guided reading order, conceptual grouping, and context.
| name | polish |
| description | Find things to improve in the current project |
Available dimensions:
| Dimension | What it covers |
|---|---|
tests | Coverage gaps, untested public API, missing edge cases, flaky patterns |
docs | Crate/module docs, doc comments on public items, README, examples |
perf | Unnecessary allocations, hot-path inefficiency, lock contention, algorithmic issues |
api | Ergonomics, misuse resistance, consistency, naming, type-level invariants |
correctness | Error handling, safety invariants, panic/crash paths, resource leaks, thread safety |
If $ARGUMENTS is empty, run all five dimensions.
If $ARGUMENTS names specific dimensions (e.g. /polish tests docs), run only those. Accept common aliases: test→tests, doc/documentation→docs, performance→perf, ergonomics→api, sound/soundness/safety/unsafe→correctness.
If $ARGUMENTS contains something else, treat it as custom focus instructions and pass it verbatim (delimited by triple backticks) to all agents.
Launch one Agent subagent per selected dimension, all in a single message. Each agent receives the shared analysis guidelines (below) followed by its dimension-specific guidelines.
Each agent should use Read, Glob, and Grep extensively to examine the full codebase — this is not diff-scoped.
Include the following in every subagent prompt.
Analyze the entire codebase, not just recent changes. Read every source file relevant to your dimension. The goal is to find what's missing, incomplete, or improvable — not to review a specific change.
What to flag — gaps or issues that: (a) would meaningfully improve the project if addressed; (b) are specific and actionable; (c) aren't nit-picks or style preferences; (d) the author would likely agree with.
Don't flag — things that are fine as-is for the project's current scope, speculative future needs, or patterns that are idiomatic even if imperfect.
Priorities — tag each finding: [P0] blocking issue, must fix; [P1] high-value, should do; [P2] worth doing; [P3] nice-to-have.
Format — number findings with the dimension prefix (T1, D1, F1, A1, C1, …). For each: priority tag, file path with line number where relevant, one-paragraph explanation. Be specific — "add tests for X" not "improve test coverage." Report in under 500 words.
Identify gaps in test coverage and test quality.
Don't suggest tests for trivial getters/setters or boilerplate impls. Focus on behavioral gaps.
Evaluate documentation completeness and quality.
Don't flag missing docs on items where the name and type signature are self-explanatory.
Look for performance issues and optimization opportunities.
Don't flag micro-optimizations that don't matter at the project's scale. Focus on issues that would matter with realistic workloads.
Evaluate the public API surface for usability and safety.
Don't suggest API changes that would bloat the surface area for hypothetical use cases.
Audit for correctness and safety issues in the existing codebase.
This is not a review of a diff — audit the code as it stands today.
Once all agents return: