work-clean
Skill2 starsChanged 4 months agoMITView on GitHub
Read-only code-simplification analysis that always uses one gpt-5.6-sol xhigh analyst and returns a self-contained cleanup plan suitable for a lower-capability execution model. Use when the user asks to clean code, remove smells, reduce overengineering, refactor helpers, or assess package choices.
In this repository12 other files it gives its agents.
- AGENTS.mdAGENTS.md
- workSkill
- work-auditSkill
- work-checklistSkill
- work-concernSkill
- work-helpSkill
- work-ideateSkill
- work-initSkill
- work-planSkill
- work-qualitySkill
- work-statusSkill
- work-testSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 16
If the exact subagent model, effort, or goal tools are unavailable, return blocked with the missing capability.
- Distinctive: line 28
Prefer an explicit path, subsystem, feature, or diff.
- Distinctive: line 31
Keep helpers that communicate intent, isolate side effects, improve testing, or have genuine reuse.
- Distinctive: line 35
Prefer durable architecture over a stopgap intended to be replaced later.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 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
Work / 8. Clean
Find defensible simplifications without editing. The Sol xhigh analyst remains read-only; the parent owns every cleanup decision and any later execution route.
Preserve reliability, restraint, user data, meaningful tests, and the simplest complete implementation. Remove obsolete paths instead of preserving compatibility, and require evidence for every deletion or abstraction change.
Fixed route
- If the exact subagent model, effort, or goal tools are unavailable, return
blockedwith the missing capability. Do not substitute a model or perform the cleanup analysis in the parent. - Launch exactly one
gpt-5.6-solsubagent atxhigheffort withfork_turns: none. - Give it a fun call sign, the exact task statement, exact scope, source of truth, behavior boundaries, package constraints, acceptance checks, and validation requirements.
- Require independent analysis and concrete evidence for every proposed deletion or shared component; do not accept a status report, speculative smell, or “routine” migration.
- Require it to call
create_goalwith the exact cleanup-analysis goal before inspection andupdate_goal completeonly after the required checks pass. - Let the analyst run until it returns the cleanup plan, a real blocker, or a user-input request. Do not cancel it because a polling window or arbitrary wall-clock interval elapsed; a wait timeout is not a failure.
- The analyst must not edit, commit, deploy, spawn, or delegate.
- Scale depth to the scope. Inspect only relevant paths, direct consumers, and evidence needed to prove each simplification; return the plan without process narration and stop when every candidate has a supported disposition.
- Report the successful launch as a compact table with
Agent,Working on,Goal,Ownership, andModel.
Analysis
- Prefer an explicit path, subsystem, feature, or diff; otherwise use the smallest scope clearly implied by the request.
- Inspect instructions, status, relevant diffs, consumers, registrations, generated outputs, existing tests, public APIs, and actual user flows.
- Identify dead code, needless indirection, duplicate behavior, speculative abstractions, and unclear boundaries.
- Keep helpers that communicate intent, isolate side effects, improve testing, or have genuine reuse. Simplify the consumer path; do not merely move complexity into a new wrapper or hide it behind a renamed abstraction.
- Consider packages in this order: standard library/platform, an existing project dependency, a mature and battle-tested external package, then focused local code. Check existing dependency documentation and types before reimplementing functionality or adding a package. Choose a package only when its reliability, maintenance, license, runtime fit, and reduced complexity earn the dependency cost; record chosen and rejected options with reasons.
- Challenge cleanup candidates against exact behavior, error paths, partial state, retries, interruption, permissions, upgrades, and recovery before recommending removal.
- Preserve meaningful tests and remove only tests that are demonstrably obsolete, tautological, framework-level, or detached from a real contract. Do not add coverage-only tests.
- Prefer durable architecture over a stopgap intended to be replaced later. Do not propose behavior, API, persistence, security, UX, test, or type weakening without explicit authorization.
Require every cleanup candidate to remove a real cost: a duplicate behavior, branch, dependency, concept, indirection, or unclear ownership boundary. Do not extract a shared component until multiple consumers share a stable behavior, not merely similar markup or coincidental syntax.
Handoff
Return a detailed, executor-agnostic cleanup plan:
## Work / 8. Clean
**Scope:** <paths, symbols, or diff>
**Goal:** <one exact cleanup goal>
**Remove or simplify**
- <smell and concrete transformation>
**Preserve**
- <behavior, API, tests, helpers, or duplication intentionally retained>
**Evidence**
- <exact path, command, trace, or test supporting each change>
**Alternatives rejected**
- <approach and concrete reason, or "None">
### Cleanup map
| Step | File / symbol | Exact transformation | Cost removed | Invariant |
|---|---|---|---|---|
| 1 | <path and symbol> | <implementation-complete change> | <branch, concept, dependency, duplication, or indirection> | <behavior that must remain true> |
**Executor assignments:** <call sign, assignment, goal, and ownership, or "One executor">
**Done when:** <observable criteria>
**Does not count:** <format-only churn, hidden complexity, behavior changes, or unproven deletions>
**Packages considered:** <chosen/rejected package and one reason each, when relevant>
| Validation command or flow | Expected evidence | Proves |
|---|---|---|
| <exact check> | <expected result or artifact> | <preserved behavior or reduced cost> |
**Testing**
- **Behavior being protected:** <observed behavior or "No test change justified">
- **Why it matters:** <user or system consequence>
- **Test level:** <unit, integration, or end-to-end, or "None">
- **Exact observable assertion:** <assertion, or "None">
- **Tests deliberately not added or removed:** <scope and reason>Assume the plan may be executed by a lower-capability model with no hidden context. Spell out exact files and symbols, ordered transformations, behavior to preserve, obsolete paths to remove, package decisions, validation commands, expected evidence, and choices the executor must not reinterpret. The parent verifies the plan before approving any execution route. A smaller diff is not automatically a better result: reject cleanups that only move complexity, weaken behavior, or preserve obsolete paths through a new wrapper. If the route is blocked, state the exact gap and require a materially new mechanism before another round. Do not launch an executor or edit files from this skill. For execution, hand the verified plan to $work.
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.

