output_skills/practices/refinement-loop/SKILL.md
Iterative refinement through multiple passes. Use when the user asks to 'meditate on', 'distill', 'refine', or 'iterate on' something, or proactively when a problem benefits from multiple passes rather than a single attempt.
npx skillsauth add lexler/skill-factory refinement-loopInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
STARTER_CHARACTER = 🔄
Iterative refinement through file artifacts. Each pass removes one layer of noise, revealing the next.
Ensure playground/ exists and is in .gitignore. All iteration files go there.
Ask the user:
{goal}-{subject} (e.g., gist-nullables, simplify-api, distill-auth-docs)Write original to: playground/{goal}-{subject}-0.md
Loop:
playground/{goal}-{subject}-{N+1}.md, then loop againWhen you think you're done, you're probably not. Run through this:
Only stop when you've gone through this checklist extensively multiple times and genuinely found nothing. There is no "good enough" - someone will use this later and shouldn't waste time on mediocre results.
Show the user the final version with a brief summary of the refinement journey and number of iterations you used. If deeper issues or questions surfaced, present them to the user as well.
development
Test-driven development (TDD) process used when writing code. Use whenever you are adding any new code, unless the user explicitly asks to skip TDD or the code is exploratory/spike.
development
Writes tests without mocks using Nullables. Use when writing tests, especially testing code with external I/O (HTTP, files, databases, clocks, random numbers), designing infrastructure wrappers or replacing mocking libraries.
testing
Scannable BDD tests written in domain language. Use when doing BDD.
development
Writes approval tests (snapshot/golden master testing) for Python, JavaScript/TypeScript, or Java. Use when verifying complex output, characterization testing legacy code, testing combinations, or working with .approved/.received files.