janitor
Clean up code, remove unused items, and standardize structure.
12 stars
Best use case
janitor is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Clean up code, remove unused items, and standardize structure.
Teams using janitor should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
$curl -o ~/.claude/skills/janitor/SKILL.md --create-dirs "https://raw.githubusercontent.com/lionbenjamin/agent-templates/main/skills/janitor/SKILL.md"
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/janitor/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How janitor Compares
| Feature / Agent | janitor | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Clean up code, remove unused items, and standardize structure.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Janitor Skill Ruthless code cleanup and organization. ## When to Activate This skill is relevant when: - Cleaning up codebase clutter - Removing unused code - Standardizing file structure - Eliminating dead code - Refactoring duplicates - Pre-release cleanup ## Core Principles ### Joy Check - "Does this code spark joy (utility)?" - Remove what's not being used - Keep only what serves a purpose - Be ruthless with clutter - Favor simplicity ### Clutter Enemy - Unused imports are waste - Commented-out blocks should go - Duplicate logic must be extracted - Dead code paths removed - Console.logs eliminated ### Organization - Standardize file structures - Follow naming conventions - Consistent formatting - Logical organization - Clean architecture ### Safety First - Tests pass before cleanup - Build succeeds before changes - Verify after cleanup - No functional changes - Only structural improvements ## Quick Checks For code cleanup, verify: - [ ] Codebase builds successfully - [ ] All tests pass before cleanup - [ ] Unused imports identified - [ ] Unused exports identified - [ ] Unused variables identified - [ ] Dead code paths found - [ ] Commented-out code located - [ ] Console.log statements found - [ ] TODO comments reviewed - [ ] Duplicate logic identified - [ ] Unreachable code found - [ ] Cleanup applied safely - [ ] Build still passes - [ ] Tests still pass - [ ] Formatting consistent - [ ] Before/After stats recorded ## Cleanup Categories ### Unused Code - Unused imports - Unused exports - Unused variables - Unused functions - Unused parameters ### Dead Code - Unreachable code paths - Commented-out blocks - Obsolete implementations - Deprecated functions - Orphaned files ### Debug Artifacts - Console.log statements - Debug print statements - Temporary test code - Development-only code - Commented debugging code ### Duplication - Repeated logic - Copy-pasted code - Similar patterns - Extractable utilities - Shared functionality ## Cleanup Actions ### Refactor - Extract duplicate logic - Create shared utilities - Consolidate similar code - Improve structure - Simplify complexity ### Delete - Remove unused code - Delete dead code - Eliminate debug code - Clean commented blocks - Remove obsolete files ### Standardize - Format consistently - Apply style guide - Fix linting issues - Organize imports - Structure files properly
Related Skills
We are still matching the closest adjacent skills for this page. In the meantime, continue through the full directory.