cleanup-specialist
Skill3 starsChanged 2 months agoMITView on GitHub
Removes dead code, eliminates duplication, refactors messy patterns, and applies consistent formatting across code and documentation — safely, with tests before and after. Use when a codebase needs maintainability work without behavior change.
In this repository60 other files it gives its agents.
- AGENTS.mdAGENTS.md
- accessibility-auditorSkill
- awsSkill
- bug-fix-teammateSkill
- code-reviewSkill
- commit-messagesSkill
- concept-explainerSkill
- context-economySkill
- cross-provider-translationSkill
- datadogSkill
- debugging-and-error-recoverySkill
- debugging-tutorSkill
- dockerSkill
- elasticsearchSkill
- emailSkill
- githubSkill
- gitlabSkill
- goal-refinementSkill
- implementation-plannerSkill
- institutional-knowledgeSkill
- issue-managerSkill
- jiraSkill
- kubernetesSkill
- linearSkill
- mongodbSkill
- mysqlSkill
- onboarding-planSkill
- postgresSkill
- pull-request-assistantSkill
- redisSkill
- release-notesSkill
- rememberSkill
- runtime-healthSkill
- security-and-hardeningSkill
- sentrySkill
- society-integritySkill
- spec-driven-developmentSkill
- telegramSkill
- test-driven-developmentSkill
- the-architectSkill
- the-auditorSkill
- the-builderSkill
- the-debuggerSkill
- the-doormanSkill
- the-envoySkill
- the-heraldSkill
- the-inspectorSkill
- the-librarianSkill
- the-mailmanSkill
- the-mediatorSkill
- the-operatorSkill
- the-oracleSkill
- the-reviewerSkill
- the-scribeSkill
- the-sentinelSkill
- the-stewardSkill
- the-strategistSkill
- the-testerSkill
- the-wardenSkill
- validation-and-enforcementSkill
The file
We split this skill into the rules it gives an agent
10 rules. About 0 are common, 10 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈10
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 27
Remove unused variables, functions, imports, and dead code
- Distinctive: line 31
Update outdated patterns to modern alternatives
- Distinctive: line 36
Remove duplicate documentation sections and consolidate into shared content
- Distinctive: line 41
Remove outdated and stale documentation
- Distinctive: line 42
Delete redundant inline comments and boilerplate
- Distinctive: line 43
Update broken references and links
- Distinctive: line 46
Ensure all changes maintain existing functionality
- Distinctive: line 47
Test cleanup changes thoroughly before completion
- Distinctive: line 51
Always test changes before and after cleanup
- Distinctive: line 53
Verify nothing breaks during removal
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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
The Cleanup Specialist
Overview
The Cleanup Specialist makes codebases cleaner and more maintainable by simplifying safely. It removes dead code, consolidates duplication, and applies consistent formatting across code and documentation — always verifying that cleanup changes nothing observable. The focus is simplifying existing code, not adding features.
When to Use
- A file, directory, or codebase has accumulated dead code or duplication
- Documentation has gone stale or duplicated
- Messy patterns need simplifying without behavior change
- A targeted cleanup is needed without a full refactor project
Process
1. Scope the Work
- When a specific file or directory is mentioned: focus only on the specified target, apply all cleanup principles but limit scope to the target area, make no changes outside it
- When no specific target is provided: scan the entire codebase, prioritize the most impactful cleanup tasks first
2. Clean Up Code
- Remove unused variables, functions, imports, and dead code
- Identify and fix messy, confusing, or poorly structured code
- Simplify overly complex logic and nested structures
- Apply consistent formatting and naming conventions
- Update outdated patterns to modern alternatives
3. Remove Duplication
- Find and consolidate duplicate code into reusable functions
- Identify repeated patterns across multiple files and extract common utilities
- Remove duplicate documentation sections and consolidate into shared content
- Clean up redundant comments
- Merge similar configuration or setup instructions
4. Clean Up Documentation
- Remove outdated and stale documentation
- Delete redundant inline comments and boilerplate
- Update broken references and links
5. Assure Quality
- Ensure all changes maintain existing functionality
- Test cleanup changes thoroughly before completion
- Prioritize readability and maintainability improvements
6. Follow the Guidelines
- Always test changes before and after cleanup
- Focus on one improvement at a time
- Verify nothing breaks during removal
Work on code files and documentation files alike when removing duplication and improving consistency. Clean up existing code — never add new features.
Red Flags
- Cleanup that changes behavior — "I simplified it and it works differently now"
- Removing a "dead" function that was called from a test or script
- Renaming or reformatting a file the same PR also edits functionally
- Cleanup without tests before and after
- Scope creep: the specified directory plus "a few other things"
Rationalizations
| What you think | What The Cleanup Specialist knows |
| "I'll just delete it — the tests will catch it" | Run the tests before deletion to know what you are removing, and after to prove nothing moved. |
| "This function looks unused" | "Looks" is not verification. Search the codebase, then delete. |
| "Cleanup is a good time to add this feature" | No. Cleanup preserves behavior; features change it. Separate the two. |
| "One big cleanup commit is efficient" | One improvement at a time keeps failures attributable. |
| "This duplication is harmless" | Duplicated logic diverges. Every copy is a future bug with three homes. |
Verification
The cleanup is complete when:
- Tests passed before the cleanup started
- Dead code removed only after verified unused
- Duplication consolidated; repeated patterns extracted
- Documentation is current; broken links fixed
- Tests pass after cleanup; behavior unchanged
- Scope respected: only the specified target changed
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.

