clean
Skill4 starsChanged 6 months agoMITView on GitHub
Project-agnostic, behavior-preserving cleanup, semantic clarity refactor, codebase slimming, and test audit pass for existing codebases. Use when Codex needs to clean up a changed area, make code leaner without product changes, reduce ambiguity in names, types, fields, status objects, or string unions, remove dead or misleading code, cut bloat and excess indirection, collapse duplicate branches, align nearby tests with the real contract, trim brittle or duplicate tests, or add focused regression coverage without broadening into product changes or architecture work. Trigger on requests like 'clean this up', 'make this leaner', 'cut bloat', 'simplify this without changing behavior', or 'remove dead code.'
18 other projects use a version of this.
Adopted by
Most recently taken up by
- hemal08ce094/DesignSkillsSwiftUItheir own version, first seen Nov 8, 2026
- Mrbaeksang/skillstheir own version, first seen Nov 8, 2026
- cekrauseee/harnesstheir own version, first seen Nov 1, 2026
- snuffish/dotfilestheir own version, first seen Nov 1, 2026
- mystilleef/spae-frameworktheir own version, first seen Oct 28, 2026
- flavien-ia/hypervibe-crafttheir own version, first seen Oct 25, 2026
Used with
Projects with it also use expressive, friendly 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.
bergsideSkillexpressive
Vibrant, personality-driven design with bold colors, playful graphics, and dynamic layouts that balance creativity with structure.
Also in 4 projects that use this
bergsideSkillfriendly
Approachable, intuitive design with rounded elements, ample whitespace, and soft pastel color palettes.
Also in 4 projects that use this
- +10 more from bergside
Other versions18 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 18
- bergside/awesome-design-skills★ 2.9ksame name
- aimeos/pagible★ 602same name
- kurtosis-tech/kurtosis★ 558same name
- OutThisLife/brooklyn-skills★ 207same name
- flavien-ia/hypervibe-craft★ 50same name
- flavien-ia/hypervibe-harness★ 50same name
- VoTruongDanh/Skills-Agent★ 4same name
- andalabx/skills★ 2same name
- mystilleef/spae-framework★ 2same name
- Mrbaeksang/skills★ 1same name
8 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.
In this repository10 other files it gives its agents.
- clean-commitSkill
- clean-merge-pushSkill
- evolutionary-5-stepSkill
- investigate-fixSkill
- owner-checkSkill
- owner-cleanSkill
- stateful-planning-protocolSkill
- technical-design-dossierSkill
- tty-designSkill
- writing-ticksSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
32 rules. 0 are common, 29 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 16 edited versions we read keep these.
29
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 10
Run one constrained, behavior-preserving cleanup pass.
- Distinctive: line 12
Do not turn cleanup into product work, architecture redesign, dependency churn, or style-only sweeping across unrelated files.
- Very specific: line 16
If cleanup involves canonical paths, duplicated state, fallback behavior, compatibility shims, cache/state ownership, lifecycle authority, …
- Distinctive: line 18
Use the ownership decision to rank pruning candidates: false owners, duplicate representations, downstream heuristics, stale aliases, …
- Distinctive: line 34
If no useful test exists, add one focused regression only when it protects real behavior better than nearby coverage.
- Distinctive: line 38
Before broad searching, discover the current repo's rules and tools:
- Very specific: line 40
Read local instructions such as AGENTS.md, CLAUDE.md, .github/CONTRIBUTING.md, README*, and nearby package docs when present.
- Distinctive: line 42
Prefer repo-provided navigation, dependency, xref, dead-code, rename, typecheck, lint, format, and test commands over generic guesses.
- Distinctive: line 43
Use project-specific tools only when the current repo exposes them or local instructions require them.
- Very specific: line 44
If the repo has no obvious tools, fall back to rg, language-native tests, and direct call-site inspection.
- Distinctive: line 48
Keep the cleanup radius to touched files, immediate callers or callees, shared types or status objects, and closest tests.
- Distinctive: line 73
Treat static dead-code tools as candidate generators, not proof.
- Distinctive: line 75
Before deleting, de-exporting, or renaming a symbol, check:
- Distinctive: line 77
import and text consumers
- Distinctive: line 81
If code is still used only inside its own module or package, prefer removing unnecessary exports over deleting live behavior.
- Distinctive: line 94
Prefer one canonical internal name per concept.
- Distinctive: line 96
Avoid keeping old and new names live together inside the same semantic layer.
- Distinctive: line 100
Prefer these in order:
- Distinctive: line 102
Delete dead code, stale comments, obsolete branches, invalidated tests, and fallback paths with no real boundary consumer.
- Distinctive: line 110
Do not add abstraction just for style or DRY instinct.
- Distinctive: line 114
Default to deleting compatibility aliases, dormant commands, noop fallbacks, and test-only protocol names once the canonical path is proven.
- Distinctive: line 116
Keep a compatibility shim only for a named external boundary such as public APIs, wire contracts, persisted data, migrations in flight, …
- Distinctive: line 122
If it stays, what exact boundary requires it?
- Distinctive: line 124
If no real boundary consumer can be named, delete it in the cleanup pass.
- Distinctive: line 130
keep tests that prove public behavior, product-critical paths, bug fixes, or meaningful edge cases
- Distinctive: line 133
delete tests for removed code or obsolete behavior
- Distinctive: line 136
Do not weaken assertions just to pass.
- Distinctive: line 140
When the surface is large enough and the user explicitly allows subagents, write a split before delegating:
- Distinctive: line 146
Do not delegate the main semantic judgment call, final verification summary, or scope decision.
- Distinctive: line 150
Use the discovered project tools.
- Distinctive: line 158
When deleting dead code, include any build, config, binary, CLI, or runtime command needed to prove non-import edges still resolve.
- Distinctive: line 160
If verification cannot run, state the exact command that was unavailable and the remaining risk.
“Common” is measured: kept by at least 6 in 10 of the 16 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
Clean
Goal
Run one constrained, behavior-preserving cleanup pass. Prefer less code, fewer concepts, narrower APIs, clearer names, and tests that describe the real contract.
Do not turn cleanup into product work, architecture redesign, dependency churn, or style-only sweeping across unrelated files.
Ownership-Sensitive Cleanup
If cleanup involves canonical paths, duplicated state, fallback behavior, compatibility shims, cache/state ownership, lifecycle authority, sync/reconnect authority, render authority, or any question of who should own a behavior, perform one owner-check pass before editing, then resume this cleanup workflow.
Use the ownership decision to rank pruning candidates: false owners, duplicate representations, downstream heuristics, stale aliases, obsolete wrappers, and compatibility paths with no named external boundary should be removed in the cleanup pass.
Before Editing
Work through this five-step frame explicitly:
- Goal: what the cleanup should improve.
- Problems: what blocks that outcome in the current code.
- Root cause: why the ambiguity, bloat, dead seam, or test drift exists.
- Design: the smallest behavior-preserving change that addresses it.
- Implementation: the exact edit and verification sequence.
Use test-driven cleanup:
- For bug-risk or behavior-risk cleanup, write or identify a focused failing or characterization test before changing implementation.
- For pure refactor, run the narrowest existing contract test first, then keep it green.
- If no useful test exists, add one focused regression only when it protects real behavior better than nearby coverage.
Discover The Project
Before broad searching, discover the current repo's rules and tools:
- Read local instructions such as
AGENTS.md,CLAUDE.md,.github/CONTRIBUTING.md,README*, and nearby package docs when present. - Inspect manifests such as
package.json,pyproject.toml,Cargo.toml,go.mod,Gemfile,pom.xml,build.gradle,Makefile,justfile,Taskfile*, or CI configs. - Prefer repo-provided navigation, dependency, xref, dead-code, rename, typecheck, lint, format, and test commands over generic guesses.
- Use project-specific tools only when the current repo exposes them or local instructions require them.
- If the repo has no obvious tools, fall back to
rg, language-native tests, and direct call-site inspection.
Scope
Keep the cleanup radius to touched files, immediate callers or callees, shared types or status objects, and closest tests. Go wider only when a shared semantic helper, public boundary, or compatibility layer forces it.
Make the top 1-3 highest-signal improvements and stop unless verification exposes a directly related issue.
Rank candidates by:
- semantic confusion
- dead code or stale protocol vocabulary
- excess indirection
- duplicate branches
- branch complexity
- stale or misleading tests
- brittle assertions
- duplicate coverage
- missing high-value regressions
Contract Inference
Infer the contract in this order:
- focused tests and observed runtime behavior
- public types, schemas, and wire or persistence contracts
- repeated production usage
- docs and comments
Treat static dead-code tools as candidate generators, not proof.
Before deleting, de-exporting, or renaming a symbol, check:
- import and text consumers
- runtime string references, subprocess entrypoints, worker paths, plugin hooks, config-discovered files, CSS-only usage, binaries, migrations, and out-of-repo boundaries
- nearest tests and fixtures that may encode the boundary
If code is still used only inside its own module or package, prefer removing unnecessary exports over deleting live behavior.
Semantic Cleanup
Separate concepts before renaming or extracting:
- product label vs internal behavior
- display wording vs behavior switch
- runtime phase vs transport or persistence value
- platform/device term vs domain concept
- one field, status object, or union carrying multiple meanings
- repeated ad hoc checks spread across files
Prefer one canonical internal name per concept. If an external boundary still needs a legacy name or value, translate it at ingress or egress only.
Avoid keeping old and new names live together inside the same semantic layer.
Implementation Moves
Prefer these in order:
- Delete dead code, stale comments, obsolete branches, invalidated tests, and fallback paths with no real boundary consumer.
- Inline or remove pass-through wrappers and low-value indirection.
- Rename misleading concepts toward semantic roles.
- Flatten control flow and merge duplicate paths.
- Move tightly related logic together.
- Introduce shared constants, predicates, type aliases, normalization helpers, or a small semantics module only when reuse is real and ambiguity is reduced.
- Narrow accidental API surface by reducing unnecessary exports, helper visibility, parameters, or return-shape width.
Do not add abstraction just for style or DRY instinct.
Compatibility
Default to deleting compatibility aliases, dormant commands, noop fallbacks, and test-only protocol names once the canonical path is proven.
Keep a compatibility shim only for a named external boundary such as public APIs, wire contracts, persisted data, migrations in flight, plugin surfaces, or caller-owned integration points. Make the boundary explicit and state the removal condition.
For each legacy seam, answer:
- Who still calls or consumes it in production?
- Is that caller inside the current semantic layer or at a true external boundary?
- If it stays, what exact boundary requires it?
If no real boundary consumer can be named, delete it in the cleanup pass.
Tests
Audit nearby tests as part of cleanup:
- keep tests that prove public behavior, product-critical paths, bug fixes, or meaningful edge cases
- tighten tests that over-specify incidental markup, ordering, timing, formatting, or snapshots
- collapse duplicate tests that cover the same contract
- delete tests for removed code or obsolete behavior
- rename tests so failures describe the contract, not the implementation step
Do not weaken assertions just to pass. Do not replace meaningful behavioral tests with larger snapshots.
Parallel Fanout
When the surface is large enough and the user explicitly allows subagents, write a split before delegating:
- main thread: contract inference, cleanup ranking, rename strategy, integration, final verification
- sidecar 1: consumer/dead-code/test-boundary map
- sidecar 2: one disjoint cleanup slice or nearby test cleanup
Do not delegate the main semantic judgment call, final verification summary, or scope decision. If not launching sidecars, say whether the surface is too small, too sequential, or delegation is unavailable.
Verification
Use the discovered project tools. Prefer this ladder:
- narrow characterization or regression test
- narrow touched-surface test
- narrow typecheck or build
- lint or format check when the repo treats it as correctness
- repo-wide gate only when shared behavior changed, local instructions require it, or the user asks
When deleting dead code, include any build, config, binary, CLI, or runtime command needed to prove non-import edges still resolve.
If verification cannot run, state the exact command that was unavailable and the remaining risk.
Report Back
Cover only what applies:
- semantic ambiguities found
- bloat or indirection removed
- clarifying helper or normalization introduced
- code and test cleanup performed
- compatibility shims removed or boundary-scoped
- verification run
- tempting cleanup left out of scope and why
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.

