polish
Iteratively refines any artifact (prose, spec, prompt, API design, SKILL.md, code snippet) by running a decoupled evaluator → generator loop until explicit…
Skill by griffinwork40
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/griffinwork40-polish
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: design, backend, agent-building
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 26, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/polish
What's inside
- Skill name
polish- Description
- Iteratively refines any artifact (prose, spec, prompt, API design, SKILL.md, code snippet) by running a decoupled evaluator → generator loop until explicit criteria are met or an iteration cap is reached. Locks criteria in Wave 1, isolates the evaluator from generation history to prevent sycophancy, and emits the best version with any remaining gaps flagged at cap.
- License
- Apache-2.0
- Instructions
- 136 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
## Sub-agent contract
/contract
`polish` is a three-wave evaluator-optimizer loop that applies to any artifact at any workflow stage. Wave 1 locks concrete, testable criteria. Waves 2 and 3 alternate (evaluator → generator) until all criteria pass or the iteration cap is reached. The evaluator is always spawned stateless — it never sees prior generation history — eliminating the sycophancy failure mode that plagues shared-context review loops.
The orchestrator coordinates but never edits the artifact directly. All revisions are produced by the Wave 3 generator, which receives only the `blocking_gaps` list from the evaluator (not its full reasoning). This constraint prevents scope-creep revisions and keeps each iteration focused on the delta between current state and the locked criteria.
On cap exhaust the orchestrator emits the best-scoring version plus a structured `remaining_gaps` report so the caller can decide whether to extend the cap, escalate to a human, or ship with known gaps documented.
---
## Inputs
| Field | Required | Description |
|---|---|---|
| `artifact` | yes | The text, spec, prompt, design doc, or code snippet to refine |
| `goal` | yes | Natural-language quality intent ("make this safe for external stakeholders") |
| `criteria` | no | Pre-supplied testable criteria — skips Wave 1 extraction if provided |
| `threshold` | no | `pass_all` (default) or `pass_N` where N is an integer |
| `cap` | no | Max refinement iterations (default: 4, max: 8) |
---
## Wave 1 — Criteria Extraction
**Trigger:** Always, unless `criteria` were supplied by the caller.
**Agent:** Single subagent. Reads `artifact` + `goal`. Produces:
```json
{
"criteria": [
{ "id": "C1", "text": "<concrete, binary-testable criterion>" },
...
],
"threshold": "pass_all | pass_N",
"cap": 4
}
```
**Rules:**
- Criteria must be falsifiable — "no jargon visible to end-users", not "improve clarity".
- Maximum 8 criteria. If the goal implies more, merge related ones.
- Criteria are **locked** after Wave 1. The evaluator may not add or modify them.
**Exit:** Emit `criteria.json`. Proceed to Wave 2.
---
## Wave 2 — Evaluation (stateless)
**Agent:** Single subagent, spawned fresh with **no generation history**. Receives:
- Current artifact (text only)
- Locked `criteria.json`
**Produces:**
```json
{
"scores": [
{ "criterion_id": "C1", "pass": true, "gap": "" },
{ "criterion_id": "C2", "pass": false, "gap": "<specific, actionable description of what is missing or wrong>" }
],
"overall": "pass | fail",
"blocking_gaps": ["C2: <gap text>", ...]
}
```
**Rules:**
- If `overall: pass` (threshold met) → skip Wave 3, emit final artifact, terminate loop.
- If iteration count == cap → skip Wave 3, emit best version + `remaining_gaps`, terminate loop.
- Gap text must be specific enough for Wave 3 to act on without re-reading evaluator reasoning.
---
## Wave 3 — Revision
**Agent:** Single subagent. Receives:
- Current artifact
- `blocking_gaps` list (text only — NOT the evaluator's full `scores` object)
- Original `goal` (for orientation only, not as new criteria)
**Produces:** Revised artifact (full text, not a diff).
**Rules:**
- Address only the `blocking_gaps`. Do not make unrequested changes.
- Do not invent new criteria or second-guess passing scores.
- Output is the next artifact fed into Wave 2.
---
## Loop Control
```
iteration = 0
artifact = <input>
Wave 1 → criteria.json
loop:
iteration += 1
result = Wave 2(artifact, criteria.json)
if result.overall == "pass":
emit artifact, result.scores, iteration_count
DONE
if iteration == cap:
emit artifact, result.remaining_gaps, "CAP_REACHED"
DONE
artifact = Wave 3(artifact, result.blocking_gaps)
```
---
## Outputs
| State | Emitted |
|---|---|
| Converged | Final artifact + `{status: "CONVERGED", iterations: N, scores: [...]}` |
| Cap reached | Best artifact + `{status: "CAP_REACHED", iterations: cap, remaining_gaps: [...]}` |From griffinwork40/agent-framework, Apache-2.0.
More from griffinwork40/agent-framework
- 0.646score
shadow-verify
griffinwork40
Dispatch a parallel adversarial verifier wave after any high-stakes sub-agent investigation (code reviews, audits, findings reports, large refactors, gap…
SkillAFreshness: A★ 23Claude Code +9 - 0.646score
ship
griffinwork40
Release pipeline for already-done local work.
SkillAFreshness: A★ 23Claude Code +9 - 0.646score
review
griffinwork40
Dispatches parallel dimension agents across a diff, PR (URL or number), commit SHA, branch, staged changes, or patch file — covering security, correctness…
SkillAFreshness: A★ 23Claude Code +9 - 0.646score
simplify
griffinwork40
Discovers incidental complexity, duplication, and dead code in a codebase and produces a ranked, behavior-preserving reduction plan — optionally applying safe…
SkillAFreshness: A★ 23Claude Code +9 - 0.646score
ground-state
griffinwork40
Before starting any non-trivial implementation, run a pre-flight reconnaissance pass to triangulate git state, project infrastructure, and prior-session memory.
SkillAFreshness: A★ 23Claude Code +9 - 0.646score
fix-pr
griffinwork40
One-verb pipeline for the operator's highest-frequency manual loop: fetch a PR's unresolved reviewer feedback (inline review comments, review-summary bodies…
SkillAFreshness: A★ 23Claude Code +9 - 0.646score
refactor
griffinwork40
Orchestrates safe, large-scale structural changes across a codebase — symbol renames, API migrations, pattern standardizations, layer restructurings.
SkillAFreshness: A★ 23Claude Code +9 - 0.645score
forge-friction
griffinwork40
Surface recurring friction from session telemetry and generate targeted skills.
SkillAFreshness: A★ 23Claude Code +9 - 0.641score
diagnose
griffinwork40
Parallel root-cause analysis for bugs and failing tests.
SkillAFreshness: A★ 23Claude Code +9 - 0.641score
automate
griffinwork40
Set up a scheduled headless Claude run that sends summaries to Telegram.
SkillAFreshness: A★ 23Claude Code +9 - 0.640score
research
griffinwork40
Dispatches two sub-agents in parallel to gather external and local context for the current task.
SkillAFreshness: A★ 23Claude Code +9 - 0.606score
resolve
griffinwork40
Resolves PR code review feedback.
SkillBFreshness: B★ 23Claude Code +9
Signals
- Stars
- 23
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Aug 18, 2026 (2 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- Apache-2.0
- Repository
- github.com/griffinwork40/agent-framework
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from griffinwork40
- 0.646score
ship
griffinwork40
Release pipeline for already-done local work.
SkillAFreshness: A★ 23Claude Code +9 - 0.646score
simplify
griffinwork40
Discovers incidental complexity, duplication, and dead code in a codebase and produces a ranked, behavior-preserving reduction plan — optionally applying safe…
SkillAFreshness: A★ 23Claude Code +9 - 0.646score
shadow-verify
griffinwork40
Dispatch a parallel adversarial verifier wave after any high-stakes sub-agent investigation (code reviews, audits, findings reports, large refactors, gap…
SkillAFreshness: A★ 23Claude Code +9 - 0.646score
ground-state
griffinwork40
Before starting any non-trivial implementation, run a pre-flight reconnaissance pass to triangulate git state, project infrastructure, and prior-session memory.
SkillAFreshness: A★ 23Claude Code +9 - 0.646score
refactor
griffinwork40
Orchestrates safe, large-scale structural changes across a codebase — symbol renames, API migrations, pattern standardizations, layer restructurings.
SkillAFreshness: A★ 23Claude Code +9 - 0.646score
fix-pr
griffinwork40
One-verb pipeline for the operator's highest-frequency manual loop: fetch a PR's unresolved reviewer feedback (inline review comments, review-summary bodies…
SkillAFreshness: A★ 23Claude Code +9
Cite this page
polish skill. Agent Mart. https://agentmart.dev/skills/griffinwork40-polish (last updated 2026-10-24)