agentleFS
EternallLightEternallLight/tgc-skills/skills/polish/SKILL.md

polish

Skill9 starsChanged 5 months agoMITView on GitHub

Use only when the user explicitly asks for a combined quality pass over changed code, or when the active ship workflow invokes it — "polish the diff", "polish my changes", "clean up my changes", "run all the reviewers". Diff-scoped by default; accepts an optional path argument.

44 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use overdrive, bolder and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • nikafastovets-langSkill

    overdrive

    Push interfaces past conventional limits with technically ambitious implementations. Whether that's a shader, a 60fps virtual table, spring physics on a dialog, or scroll-driven reveals — make users ask "how did they do that?

    Also in 11 projects that use this

  • mtctSkill

    bolder

    Amplify safe or boring designs to make them more visually interesting and stimulating. Increases impact while maintaining usability.

    Also in 17 projects that use this

  • mtctSkill

    delight

    Add moments of joy, personality, and unexpected touches that make interfaces memorable and enjoyable to use. Elevates functional to delightful.

    Also in 17 projects that use this

  • nikafastovets-langSkill

    arrange

    Improve layout, spacing, and visual rhythm. Fixes monotonous grids, inconsistent spacing, and weak visual hierarchy to create intentional compositions.

    Also in 6 projects that use this

  • zwy123zwySkill

    normalize

    将用户随意输入的提示词规范化为结构清晰、便于大模型执行的标准化提示词。适用于需要整理、统一提示词格式时调用。

    Also in 11 projects that use this

  • mickeylorenziniSkill

    harden

    Audits any substantial deliverable — documents, grant sections, strategies, protocols, skills, configs, roadmaps, plans — against domain-specific quality criteria before delivery. Searches the web for best practices, runs dual-pass thematic and structural audit with severity classification, fixes all issues, and iterates until convergence. Activates when producing deliverables exceeding 4 paragraphs or 20 lines, or when the user says "harden", "audit", "stress test", or "review before delivering", or when re-auditing a modified deliverable for regressions. Does not activate for conversational responses, brainstorming, web search summaries, or rough drafts.

    Also in 15 projects that use this

  • +4 more from mtct
  • +1 more from nikafastovets-lang

The file

We split this skill into the rules it gives an agent

7 rules. 0 are common, 7 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 41 edited versions we read keep these.

  • 7

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If there is nothing to review, say so and stop.

    line 36
  2. Distinctive:

    Do not hardcode a command.

    line 105
  3. Distinctive:

    If a check fails, identify the offending edit, revert just that edit, and move that finding to REVIEW with a note.

    line 113
  4. Distinctive:

    If any edit was reverted in Step 6, list it and why.

    line 123
  5. Distinctive:

    Only report/fix within the resolved scope — don't wander into unrelated files.

    line 127
  6. Distinctive:

    Never git add, commit, or push.

    line 128
  7. Distinctive:

    If a lens returns malformed JSON, ask it once to reformat.

    line 129

“Common” is measured: kept by at least 6 in 10 of the 41 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Polish

One combined quality pass over changed code. Fan out three review lenses as findings-only subagents (they read, they do not edit), merge and dedupe the results, auto-apply only the safe high-confidence findings, verify the result with the repo's own tooling, and hand back the riskier findings for the user to approve.

Proceed only when the surrounding user request explicitly asks for polishing (including direct /tgc-skills:polish invocation) or tgc-skills:ship invokes it. Do not load this skill from unrelated requests because polishing can edit files.

This is quality plus safe bug fixes, not a deep security audit.

Why findings-only subagents

Parallel agents that edit race each other on the same files. So the subagents only report structured findings, and a single orchestrator (you) applies edits sequentially. Fan-out read, fan-in write.

Step 1 — Resolve scope

  • No argument: the current work — union of git diff --name-only, git diff --cached --name-only, and untracked files from git ls-files --others --exclude-standard. If all are empty, fall back to git diff --name-only HEAD~1 and say you did.
  • Path argument: review that file/directory.
  • Skip files a review can't help: lockfiles, generated code, snapshots, binaries, vendored dirs.

If there is nothing to review, say so and stop.

Step 2 — Fan out three lenses (parallel, findings-only)

Dispatch three general-purpose subagents in a single message so they run concurrently. Give each the file list and require it to return only a JSON array against this schema:

[{
  "file": "relative/path.ts",
  "line": 42,
  "lens": "correctness | simplification | over-engineering",
  "confidence": "high | medium | low",
  "behaviorChanging": true,
  "issue": "one-line description of the problem",
  "fix": "concrete, specific proposed change"
}]

The three lens prompts:

  1. correctness — "Review these changed files for correctness bugs only: logic errors, off-by-one, null/undefined handling, wrong conditionals, race conditions, incorrect error handling, broken edge cases. Do NOT report style or simplification. Set behaviorChanging: true for any fix that alters runtime behavior (most bug fixes do). Return findings-only JSON — do not edit files."
  2. simplification — "Review these changed files for clarity and simplification: duplicated logic that could reuse existing helpers, dead flexibility, awkward control flow, wrong altitude, needless intermediate variables. Preserve behavior exactly — every fix must be behaviorChanging: false. Follow the repo's existing idioms and CLAUDE.md conventions. Return findings-only JSON — do not edit files."
  3. over-engineering — "Review these changed files for over-engineering: reinvented standard-library/framework functionality, unnecessary dependencies, speculative abstractions, config for things with one caller, YAGNI violations. For each, say what to delete and what replaces it. Prefer behavior-preserving deletions. Return findings-only JSON — do not edit files."

Each subagent should read the repo's CLAUDE.md/AGENTS.md for local conventions before judging.

Step 3 — Merge & dedupe

Group findings that target the same file and nearby lines with the same intent into one merged finding. Record an agreement count = how many distinct lenses flagged it. Keep the clearest wording and the highest confidence in the group.

Step 4 — Classify each merged finding

  • AUTO (apply automatically) when either:
    • confidence: high AND behaviorChanging: false (mechanical, safe), OR
    • agreement count ≥ 2 AND behaviorChanging: false (independent corroboration).
  • REVIEW (list, do not apply) for everything else — anything behaviorChanging: true (including correct bug fixes), uncorroborated low/medium confidence, anything ambiguous or touching public API/types.

The auto/review line is a risk gate, not a quality gate: a correct bug fix still goes to REVIEW because auto-changing runtime behavior unseen is the dangerous case.

Step 5 — Apply the AUTO set

Apply AUTO findings yourself with Edit, sequentially, one file at a time. Never delegate the writes to parallel agents. If two AUTO findings conflict on the same lines, apply the higher-confidence one and demote the other to REVIEW.

Step 6 — Verify with the repo's own tooling

Do not hardcode a command. Discover it, in this order, and run the narrowest one that applies to the changed files:

  1. The repo's CLAUDE.md / AGENTS.md — a stated lint/typecheck/test command.
  2. The pre-push hook and project scripts — prefer the narrowest documented command that covers the files, using the repo's package/build tool.
  3. Language defaults otherwise (go vet ./..., tsc --noEmit, cargo check, …).

If a check fails, identify the offending edit, revert just that edit, and move that finding to REVIEW with a note. Re-run until clean. If no check can be found, say so explicitly — do not claim the code is verified.

Step 7 — Report

  • Applied (N): each as file:line — issue → fix, grouped by lens, plus which verification command passed.
  • Needs your call (M): the REVIEW findings, most important first. Offer to apply any the user picks.
  • If any edit was reverted in Step 6, list it and why.

Scope guardrails

  • Only report/fix within the resolved scope — don't wander into unrelated files.
  • Never git add, commit, or push. Leave the working tree for the user to review.
  • If a lens returns malformed JSON, ask it once to reformat; if still broken, mark that lens as failed in the report rather than guessing.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.