refine
Skill41 starsChanged 7 days agoMITView on GitHub
Use when improving a draft until it meets a review target — the improve step after Check
42 other projects use a version of this.
Adopted by
Most recently taken up by
- ryanportfolio/winuse-mcptheir own version, first seen Nov 8, 2026
- ghostdogpr/skillstheir own version, first seen Nov 7, 2026
- ryanportfolio/Harness-Firmwaretheir own version, first seen Nov 7, 2026
- ryanportfolio/HarnessFirmware.comtheir own version, first seen Nov 5, 2026
- ryanportfolio/Corewise.Academytheir own version, first seen Nov 5, 2026
- Blakeem/aipromptguide-workflowstheir own version, first seen Nov 4, 2026
Used with
Projects with it also use addskill, apply-firmware 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.
ryanportfolioSkilladdskill
Create, import, update, or install repo or personal skills: runtime ownership, resources, discovery checks.
Also in 6 projects that use this
ryanportfolioSkillapply-firmware
Bring current folder (plain folder, existing repo, old or partial firmware copy) up to full Harness Firmware in place. Mirror external repo → adopt-repo.
Also in 6 projects that use this
- +10 more from ryanportfolio
Other versions42 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 42
- PrimeIntellect-ai/prime-agent★ 23ksame name
- windmill-labs/windmill★ 18ksame name
- skyllwt/OmegaWiki★ 1.7ksame name
- DAIR-AutoResearch/AutoSci★ 1.7ksame name
- PKU-DAIR/AutoSci★ 1.7ksame name
- skyllwt/AutoSci★ 1.7ksame name
- rsi-gear/gear★ 422same name
- AlexPEClub/ai-coding-starter-kit★ 382same name
- automagik-dev/genie★ 351same name
- namastexlabs/automagik-genie★ 351same name
32 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
The file
Show its rules and text
We split this skill into the rules it gives an agent
18 rules. 0 are common, 7 are distinctive, and 11 are very specific to this project.
0
Common
Most of the 37 edited versions we read keep these.
7
Distinctive
This author's own choices. Worth a look.
11
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 24
Run review-fix cycles until a draft meets a target score or verdict, with resumable state on disk.
- Very specific: line 34
Read the current file and record a baseline hash.
- Very specific: line 35
Run /scc:review — this MUST dispatch actual subagents per the review skill spec.
- Very specific: line 43
After reviewers return, extract DoD-N: PASS/FAIL lines and compute per-criterion consensus (majority across reviewers).
- Very specific: line 46
Before reverting a git-tracked file: run git diff --name-only <file>.
- Very specific: line 50
Stop when the target is met, --max is reached, or the verdict plateaus (same verdict for 2 consecutive iterations with no severity …
- Very specific: line 64
When called from a pipeline with input_from, the first file is the draft (--file) and the second (if present) is the initial review report …
- Very specific: line 84
When mmbridge is detected (see references/mmbridge-integration.md) and the previous review cycle used --external, the refine skill can …
- Distinctive: line 88
When a review finding is ambiguous or the editor needs more context before fixing:
- Distinctive: line 95
Use this BEFORE applying fixes when a Critical or Major finding's intent is unclear
- Distinctive: line 100
After the editor applies fixes (Step 3), before dispatching a full internal re-review (Step 4):
- Distinctive: line 108
If resume indicates all external findings are addressed, it counts as a positive signal for the consensus gate
- Very specific: line 112
Followup: when a review finding (especially from [external: mmbridge]) lacks actionable detail
- Very specific: line 114
Skip both: if the original review did not use --external, or if mmbridge is not installed
- Distinctive: line 134
Do not claim improvement without comparing verdicts between iterations.
- Very specific: line 136
Never revert a file whose path contains ../ or resolves outside the project root.
- Very specific: line 137
Do not simulate review inline — always dispatch through /scc:review.
- Distinctive: line 138
Stop early if the verdict stops improving across iterations.
“Common” is measured: kept by at least 6 in 10 of the 37 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.
Files
Resolve runtime paths before file or script operations.
Iron Law
A fix without a review is not a fix.
Red Flags
- "I fixed the wording but the meaning is basically the same" → STOP, because refinement must preserve the author's intent — changing meaning during polish is an unauthorized rewrite.
- "The score went up so the fix must be good" → STOP, because you must compare verdicts between iterations, not just scores — a higher score with new Critical findings is a regression.
- "Let me do one more pass, I can make it even better" → STOP, because the plateau rule (same verdict for 2 consecutive iterations) exists to prevent infinite loops — stop when improvement stalls.
- "I'll skip the completion gate, the last review was already APPROVED" → STOP, because the final
/scc:review --preset quickcheck is mandatory — never declare done without it. - "The reviewers disagreed so I'll just pick the feedback I like" → STOP, because reviewer consensus drives refinement priority — Critical and Major findings from any reviewer must be addressed before Minor ones.
Refine
Run review-fix cycles until a draft meets a target score or verdict, with resumable state on disk.
When to Use
- A draft exists but is not good enough yet
- The user wants a specific quality bar
- Another skill produced output that needs iterative refinement
Workflow
- Read the current file and record a baseline hash. If
--dodis provided, parse the semicolon-separated string into a numbered criteria list and store in state asdod_criteria. - Run
/scc:review— this MUST dispatch actual subagents per the review skill spec. Do NOT simulate review inline or merge reviewer perspectives into one pass. When--dodis active, inject the following block into each reviewer's context alongside any--promisetext:
After reviewers return, extract## DoD Checklist — evaluate each criterion independently 1. [criterion text] 2. [criterion text] ... For EACH criterion, append a line: `DoD-N: PASS` or `DoD-N: FAIL — <reason>`DoD-N: PASS/FAILlines and compute per-criterion consensus (majority across reviewers). Store results in statedod_results. - Apply fixes. When
--dodis active, prioritize FAIL DoD criteria first (up to 3 total including general feedback). If all DoD criteria already pass, fall back to the standard top-3 general feedback. - Re-run
/scc:review(with DoD checklist re-injected) and keep the new baseline only if the verdict improves; otherwise revert. If mmbridge was used in the original review, runmmbridge resumebefore dispatching the full re-review to get the external reviewer's preliminary assessment of fixes (see MMBridge Refinement Enhancement below). Revert strategy:- Before reverting a git-tracked file: run
git diff --name-only <file>. If the file shows uncommitted user changes that are NOT from this refine iteration (i.e., changes that predatebaseline_hash), warn the user and abort the revert unless they explicitly confirm. Never silently overwrite uncommitted work. - Path validation: confirm the file path resolves within the project root — reject any path containing
../traversal or resolving outside the working directory. - For git-tracked files with no external uncommitted changes: use
git checkout -- <file>. - For non-git files (e.g., in
<plugin-data>): restore frombaseline_contentinrefine-active.json.
- Before reverting a git-tracked file: run
- Stop when the target is met,
--maxis reached, or the verdict plateaus (same verdict for 2 consecutive iterations with no severity reduction). When--dodis active, the target is only considered met when all DoD criteria pass AND the score/verdict target is satisfied. - Completion gate: Before declaring done, run
/scc:reviewwith--preset quick(a parameter passed to/scc:review, not a refine option) one final time (with DoD checklist if active). Only exit onAPPROVEDorMINOR FIXESand all DoD criteria PASS. If it returnsMUST FIXorNEEDS IMPROVEMENT, or any DoD criterion is FAIL, continue refining.
Options
| Flag | Values | Default |
--max | 1-10 | 3 |
--target | score (e.g., 4.5) or verdict (e.g., APPROVED) | APPROVED |
--promise | text injected into each reviewer's context as a constraint | none |
--dod | semicolon-separated success criteria checklist (e.g. "no factual errors; every section has examples") | none |
--file | path to the draft to iterate on | required |
--review | path to initial review report (skips first review cycle) | none |
When called from a pipeline with input_from, the first file is the draft (--file) and the second (if present) is the initial review report (--review).
State
Data directory: Resolve
<plugin-data>through the runtime path contract. Before writing state files, verify the directory exists withmkdir -p.
Save active state to <plugin-data>/state/refine-active.json with:
{"goal":"...","file":"...","current_iteration":2,"max":3,"verdicts":["NEEDS IMPROVEMENT","APPROVED"],"scores":[],"baseline_hash":"...","baseline_content":null,"is_git_tracked":true,"feedback_log":[],"dod_criteria":["no factual errors","every section has examples"],"dod_results":[[true,false],[true,true]]}dod_criteria: array of criterion strings parsed from--dod. Empty array when--dodis not used.dod_results: array of arrays — one boolean array per iteration, positionally matchingdod_criteria.true= PASS (majority of reviewers agreed),false= FAIL.baseline_content: stores the full file content whenis_git_trackedis false (non-git files cannot be reverted viagit checkout)is_git_tracked: set at step 1 by runninggit ls-files --error-unmatch <file>. Determines the revert strategy.
MMBridge Refinement Enhancement
When mmbridge is detected (see references/mmbridge-integration.md) and the previous review cycle used --external, the refine skill can leverage mmbridge's session continuity for smarter iterations.
Followup — Clarifying Review Findings
When a review finding is ambiguous or the editor needs more context before fixing:
mmbridge followup --tool kimi --prompt "<specific question about a finding>" --latest --json > /tmp/mmbridge-followup-${RUN_ID}.json--latest: reuses the most recent review session for this project- Use this BEFORE applying fixes when a Critical or Major finding's intent is unclear
- Parse the followup JSON response and provide it to the editor alongside the original finding
Resume — Re-review After Fixes
After the editor applies fixes (Step 3), before dispatching a full internal re-review (Step 4):
mmbridge resume --action followup -y --json > /tmp/mmbridge-resume-${RUN_ID}.json- This asks the original external reviewer to evaluate the fixes against its earlier findings
- The resume result is merged as supplemental context into the next
/scc:reviewcycle - If resume indicates all external findings are addressed, it counts as a positive signal for the consensus gate
When to Use
- Followup: when a review finding (especially from
[external: mmbridge]) lacks actionable detail - Resume: at every re-review cycle if mmbridge was used in the original review
- Skip both: if the original review did not use
--external, or if mmbridge is not installed
Cost Note
Followup and resume reuse existing mmbridge sessions — they are cheaper than dispatching a full new review.
Output
Return the final draft plus an iteration log showing verdict progression and major changes. When --dod is active, append DoD status per iteration:
Round 0 (baseline): 2.0/5 ||||.............. MUST FIX
DoD: [x] no factual errors [ ] every section has examples
Round 1 (post-edit): 3.8/5 |||||||||||||||... MINOR FIXES (+1.8)
DoD: [x] no factual errors [x] every section has examples ✓ ALL PASSGotchas
- Do not claim improvement without comparing verdicts between iterations.
- Revert through
git checkout -- <file>for git-tracked files, or restore frombaseline_contentfor non-git files. Never rely on memory alone. Always checkgit diff --name-only <file>before reverting — abort with a warning if uncommitted user changes are detected outside this refine pass's own edits. - Never revert a file whose path contains
../or resolves outside the project root. - Do not simulate review inline — always dispatch through
/scc:review. - Stop early if the verdict stops improving across iterations.
- The completion gate is mandatory — never skip the final
/scc:review --preset quickcheck.
Subagents
reviewer: { skill: /scc:review, constraint: "return score plus ranked feedback" }
editor: { model: opus, tools: [Read, Edit], constraint: "apply only the top 3 feedback items" }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
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.

