purify
Skill2 starsChanged 15 days agoMITView on GitHub
- Code contains visible waste, ceremony, duplication, or dead paths. - Existing implementation looks correct but heavier than necessary. - Performance, readability, or maintainability can improve without changing intended behavior. - Remove KISS, YAGNI, Idiomatic, and Hygiene violations: dead code, redundant abstractions, over-engineering, non-idiomatic patterns, and hygiene debt. - Reduce code to the smallest clear, idiomatic, maintainable form. - Improve efficiency only through safe, verified changes. - Strengthen tests when simplification or optimization exposes coverage gaps. - Keep test suites…
1 other project uses a version of this.
Adopted by
Most recently taken up by
- Natsuki-Kaede/purify-codextheir own version, first seen Oct 25, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- Natsuki-Kaede/purify-codex★ 1same name
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.
In this repository21 other files it gives its agents.
- auto-commitSkill
- cleanSkill
- code-reviewSkill
- coverageSkill
- documentSkill
- puritySkill
- refactorSkill
- spae-buildSkill
- spae-checkSkill
- spae-fixSkill
- spae-inspectSkill
- spae-orchestrateSkill
- spae-planSkill
- spae-prepareSkill
- spae-spawnSkill
- spae-specSkill
- spae-verifySkill
- structureSkill
- testSkill
- tipSkill
- troubleshootSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
30 rules. About 0 are common, 17 are distinctive, and 13 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈17
Distinctive · estimate
This author's own choices. Worth a look.
13
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 21
Remove KISS, YAGNI, Idiomatic, and Hygiene violations: dead code, redundant abstractions, over-engineering, non-idiomatic patterns, and …
- Distinctive: line 28
Keep test suites small and fast: prune redundant tests, speed slow ones, preserve protection.
- Very specific: line 49
When scope includes test files, see references/test-pruning-guide.md for the bloat smell catalog, deletion evidence, and speed fixes.
- Very specific: line 70
If scope resolves to current changes, the project contains TypeScript or JavaScript sources, and fallow resolves (fallow --version): run …
- Very specific: line 78
When scope includes test files, read references/test-pruning-guide.md and detect bloat using its smell catalog.
- Very specific: line 90
When detected waste carries high regression risk resisting safe verification under existing tests: record in Findings, omit edits, and emit …
- Distinctive: line 101
Remove dead code, unused branches, redundant state, obsolete helpers, and needless comments.
- Distinctive: line 107
Add or update tests only when needed to lock behavior around modified code.
- Very specific: line 112
Run relevant tests after each ACT step.
- Distinctive: line 129
Prefer deletion over abstraction.
- Distinctive: line 130
Prefer direct, idiomatic language features over custom machinery.
- Distinctive: line 131
Prefer data flow that reads once, transforms directly, and avoids hidden mutation.
- Distinctive: line 134
Keep public interfaces stable unless the user requested an interface cleanup.
- Distinctive: line 136
Treat comments as debt unless they explain intent, invariants, or external constraints.
- Distinctive: line 138
Remove dependencies, files, and configuration only after confirming nothing uses them.
- Very specific: line 147
No Confirmation Halts: Never halt to request user scope confirmation or interactive direction.
- Very specific: line 150
Never introduce SOLID or coupling violations.
- Distinctive: line 154
Don't expand feature scope.
- Distinctive: line 155
Don't mask failing tests; fix root causes or report blockers.
- Very specific: line 156
Delete a test only with the evidence references/test-pruning-guide.md requires.
- Distinctive: line 175
Don't rewrite large areas when small deletions or focused edits suffice.
- Distinctive: line 179
No hacks, workarounds, or shortcuts.
- Very specific: line 181
Never edit build or tool configuration files.
- Very specific: line 184
Never suppress or disable compiler or linter diagnostics.
- Very specific: line 186
Never weaken type contracts to silence errors.
- Distinctive: line 191
Every detection line names code examined or why none applies—restating the category never counts.
- Distinctive: line 196
Test pruning leaves coverage at the pre-pruning baseline and lowers test count or suite runtime.
- Very specific: line 200
No self-introduced cleanup violation remains per references/cleanup-guide.md.
- Distinctive: line 208
Keep prose terse while ensuring clarity.
- Distinctive: line 210
Use lists and sub-lists for long sentences and dense paragraphs.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Purification agent
When to use
- Code contains visible waste, ceremony, duplication, or dead paths.
- Existing implementation looks correct but heavier than necessary.
- Performance, readability, or maintainability can improve without changing intended behavior.
Goal
- Remove
KISS,YAGNI,Idiomatic, andHygieneviolations: dead code, redundant abstractions, over-engineering, non-idiomatic patterns, and hygiene debt. - Reduce code to the smallest clear, idiomatic, maintainable form.
- Improve efficiency only through safe, verified changes.
- Strengthen tests when simplification or optimization exposes coverage gaps.
- Keep test suites small and fast: prune redundant tests, speed slow ones, preserve protection.
Input
Determine scope by the first available source:
- Files or folders provided by the user.
- Current changes in the repository.
Abort if no scope exists.
Current changes: staged and unstaged edits, deletions, and renames
of tracked files, plus new untracked files. Requires a versioned
project, abort with a clear message if none detected.
Testing
See references/testing-guide.md for test structure, isolation,
mocking, assertion, and performance standards.
When scope includes test files, see references/test-pruning-guide.md
for the bloat smell catalog, deletion evidence, and speed fixes.
Shell commands
See references/shell-command-guide.md for command safety, timeouts,
redirects, and non-interactive environment directives.
Cleanup
See references/cleanup-guide.md for the self-introduced-artifact
checklist and diff-only audit scope.
Workflow
- GATE—Survey scope and establish baseline. Inspect target code,
tests, build commands, and recent changes. Detect waste using the
KISS,YAGNI,Idiomatic, andHygienesections ofreferences/refactoring-guide.md. Readreferences/shell-command-guide.md. Run relevant tests; identify why verification can't run if tests don't pass.- If scope resolves to current changes, the project contains
TypeScript or JavaScript sources, and
fallowresolves (fallow --version): rungit --no-pager diff --no-ext-diff HEAD | fallow audit -f json -q --diff-stdinand treat confirmed findings as additional dead-code signal. Treat all findings as unverified candidates; apply judgment during PLAN. Skip silently iffallowcannot be found or the project lacks TS/JS sources. - When scope includes test files, read
references/test-pruning-guide.mdand detect bloat using its smell catalog. - Record one detection line per category:
KISS,YAGNI,Idiomatic,Hygiene, and test-suite bloat when scope includes test files. Each line names code examined (or why none applies) and violations found. - Once every category carries a line, exit if the survey finds none
of: dead code, redundant abstractions, unused helpers,
over-engineered constructs, non-idiomatic patterns, hygiene debt,
or test-suite bloat. Emit
Result: No Changesvia the template below and halt. - When detected waste carries high regression risk resisting safe
verification under existing tests: record in
Findings, omit edits, and emitResult: No Changes.
- If scope resolves to current changes, the project contains
TypeScript or JavaScript sources, and
- ORIENT—State goal and scope in one sentence. Name what won't
change: behavior, public interfaces, and feature scope. Capture
pre-task baseline snapshot per
references/cleanup-guide.md. - PLAN—Read
references/testing-guide.mdandreferences/cleanup-guide.md. Declare minimal changes: which violations to remove, which files to touch, and in what order. Check ambiguous or risky slices before acting. - ACT—Execute only what PLAN declared. Nothing more.
- Remove dead code, unused branches, redundant state, obsolete helpers, and needless comments.
- Inline thin wrappers, merge duplicate paths, simplify conditions, reduce parameters, and replace overbuilt abstractions.
- Improve hot or wasteful paths only when output and intended behavior stay unchanged.
- Add or update tests only when needed to lock behavior around modified code.
- Prune test bloat per
references/test-pruning-guide.md, after production edits verify green and a fresh baseline exists.
- VERIFY—Loop over every criterion in
Verification:- Run relevant tests after each
ACTstep. - Audit task edits against the pre-task baseline using the
Self-cleanup checklist in
references/cleanup-guide.md; remove every self-introduced artifact before proceeding. - For each unmet criterion: backtrack to last known-good state,
return to
ACT, and re-enterVERIFY. - Exit only when all criteria pass.
- Halt only for out-of-scope blockers (failing baseline tests, compilation errors, or missing runtime environments); never treat complex code cleanups as blockers.
- Run relevant tests after each
- PERSIST—Confirm all edits written. Run final compilation or type-check where applicable.
- REPORT—Emit the result following the result directives and using the result template. Confirm what changed matches ORIENT.
Directives
- Prefer deletion over abstraction.
- Prefer direct, idiomatic language features over custom machinery.
- Prefer data flow that reads once, transforms directly, and avoids hidden mutation.
- Replace cleverness with direct code.
- Keep public interfaces stable unless the user requested an interface cleanup.
- Treat comments as debt unless they explain intent, invariants, or external constraints.
- Remove dependencies, files, and configuration only after confirming nothing uses them.
- Optimize measurable or visible waste; avoid speculative tuning.
- Surface detection as one
Actionsline (for example,detection: 4/4 categories; 1 found); keep per-category detail out of the result.
Constraints
- No Confirmation Halts: Never halt to request user scope
confirmation or interactive direction; execute the smallest safe
cleanup within detected scope or emit
Result: No Changes. - Never introduce
SOLIDor coupling violations; check against theSOLIDsections ofreferences/refactoring-guide.md. - Preserve intended behavior and user-visible output unless the user explicitly requests otherwise.
- Don't expand feature scope.
- Don't mask failing tests; fix root causes or report blockers.
- Delete a test only with the evidence
references/test-pruning-guide.mdrequires; otherwise record inFindingsand keep it. - Edit only test files in scope; survivors may live outside scope. Place new helpers and fixtures in an in-scope file.
- Track Own Edits Only: Capture each file's content before this run's first edit to it. Revert means rewriting captured content back, or deleting files this run created—never a git-level reset, stash, checkout, or restore, which erases uncommitted work from earlier phases in the same tree.
- Never Leave It Broken: End every purify pass with tests passing again or the offending edits reverted, regardless of why VERIFY halts.
- Self-Inflicted Failures Stay In-Scope: A failure this pass's own
edits cause never qualifies as an out-of-scope blocker; loop
VERIFY's backtrack step instead of halting. - Bug Found Mid-Purify: A pre-existing bug this pass exposes counts as out-of-scope. Revert the edits that surfaced it, then report the bug as a separate finding—fixing it here would expand feature scope and change preserved behavior.
- Don't rewrite large areas when small deletions or focused edits suffice.
- Abort and report if verification needs unavailable services, secrets, or destructive setup.
- No hacks, workarounds, or shortcuts.
- Forbid laziness; fix issues properly, correctly, and idiomatically.
- Never edit build or tool configuration files; for example,
tsconfig.json,.eslintrc.*,webpack.config.*,vite.config.*,jest.config.*,Makefile,pyproject.toml,Cargo.toml. - Never suppress or disable compiler or linter diagnostics; for example,
@ts-ignore,eslint-disable,@SuppressWarnings,# type: ignore. - Never weaken type contracts to silence errors; for example,
as any,!non-null assertions, or broadening union types.
Verification
- Every detection line names code examined or why none applies—restating the category never counts.
- Relevant tests pass with no new failures.
- Code compiles or type-checks where applicable.
- Coverage protects modified behavior or documented gaps remain.
- Test pruning leaves coverage at the pre-pruning baseline and lowers test count or suite runtime.
- Complexity, duplication, dependency count, or runtime cost decreases where measurable.
- No self-introduced cleanup violation remains per
references/cleanup-guide.md. Result: Failedonly follows a working tree the agent restores to the pre-purify baseline; never a suite left red.
Result directives
- Minimum words. Maximum signal.
- Keep prose terse while ensuring clarity.
- Optimize prose for agent, token, and context efficiency.
- Use lists and sub-lists for long sentences and dense paragraphs.
- Emit the result template as live markdown—never in a code fence.
- Output nothing outside the template.
Result template
<!-- prettier-ignore-start -->### Execution Summary
- **Actions**:
- [Terse list of actions taken]
- **Files**:
- [Terse list of affected files]
- **Findings**:
- [Terse list of notable findings]
- **Summary**:
- [Terse list of summary of changes]
> **Purify Status** • `[scope]`
> **Result**: [Complete | No Changes | Failed]
> **Impact**: [Terse impact statement]<!-- prettier-ignore-end -->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.

