janitor
NewBehavior-preserving codebase cleanup: removes dead code, splits oversized files and classes, and merges duplicated logic without changing behavior.
Summary
The janitor skill automatically cleans up codebases by removing dead code, splitting oversized files and classes, and merging duplicated logic—all without altering behavior.
- It helps developers maintain a lean, readable, and maintainable codebase by performing safe, behavior-preserving refactoring.
Install & Usage
mkdir -p .claude/skillsAdd the configuration to .claude/skills/janitor.md
/janitorUse Cases
Usage Examples
/janitor remove dead code in src/
/janitor split src/utils.py into smaller files based on function domains
/janitor merge duplicate logic in models/ and services/
Security Audits
Frequently Asked Questions
What is janitor?
The janitor skill automatically cleans up codebases by removing dead code, splitting oversized files and classes, and merging duplicated logic—all without altering behavior. It helps developers maintain a lean, readable, and maintainable codebase by performing safe, behavior-preserving refactoring.
How to install janitor?
To install janitor: create the skills directory (mkdir -p .claude/skills), then add the config to .claude/skills/janitor.md. Finally, /janitor in Claude Code.
What is janitor best for?
janitor is a other categorized under General. Created by Swellshinider.
What can I use janitor for?
janitor is useful for: Remove unused imports, variables, functions, and classes from a legacy codebase.; Split a monolithic 2000-line file into smaller, focused modules based on logical boundaries.; Merge duplicate utility functions scattered across multiple files into a single shared location.; Eliminate dead code paths in a large application before adding new features.; Refactor a god class by extracting cohesive methods into separate classes.; Clean up redundant conditional branches and unreachable code after a major refactor..