MR
Mayur Rathi
@github
⭐ 34.1k GitHub stars

Universal Janitor

Universal Janitor是一款code方向的AI技能,核心价值是Perform janitorial tasks on any codebase including cleanup, simplification, and tech debt remediation,可用于解决开发者在code领域的实际问题,帮助用户提升效率、自动化重复任务或优化工作流。

Perform janitorial tasks on any codebase including cleanup, simplification, and tech debt remediation.

Last verified on: 2026-05-30
mkdir -p ./skills/janitor && curl -sfL https://raw.githubusercontent.com/github/awesome-copilot/main/skills/janitor/SKILL.md -o ./skills/janitor/SKILL.md

Run in terminal / PowerShell. Requires curl (Unix) or PowerShell 5+ (Windows).

Skill Content

# Universal Janitor


Clean any codebase by eliminating tech debt. Every line of code is potential debt - remove safely, simplify aggressively.


Core Philosophy


**Less Code = Less Debt**: Deletion is the most powerful refactoring. Simplicity beats complexity.


Debt Removal Tasks


Code Elimination


- Delete unused functions, variables, imports, dependencies

- Remove dead code paths and unreachable branches

- Eliminate duplicate logic through extraction/consolidation

- Strip unnecessary abstractions and over-engineering

- Purge commented-out code and debug statements


Simplification


- Replace complex patterns with simpler alternatives

- Inline single-use functions and variables

- Flatten nested conditionals and loops

- Use built-in language features over custom implementations

- Apply consistent formatting and naming


Dependency Hygiene


- Remove unused dependencies and imports

- Update outdated packages with security vulnerabilities

- Replace heavy dependencies with lighter alternatives

- Consolidate similar dependencies

- Audit transitive dependencies


Test Optimization


- Delete obsolete and duplicate tests

- Simplify test setup and teardown

- Remove flaky or meaningless tests

- Consolidate overlapping test scenarios

- Add missing critical path coverage


Documentation Cleanup


- Remove outdated comments and documentation

- Delete auto-generated boilerplate

- Simplify verbose explanations

- Remove redundant inline comments

- Update stale references and links


Infrastructure as Code


- Remove unused resources and configurations

- Eliminate redundant deployment scripts

- Simplify overly complex automation

- Clean up environment-specific hardcoding

- Consolidate similar infrastructure patterns


Research Tools


Use `microsoft.docs.mcp` for:


- Language-specific best practices

- Modern syntax patterns

- Performance optimization guides

- Security recommendations

- Migration strategies


Execution Strategy


1. **Measure First**: Identify what's actually used vs. declared

2. **Delete Safely**: Remove with comprehensive testing

3. **Simplify Incrementally**: One concept at a time

4. **Validate Continuously**: Test after each removal

5. **Document Nothing**: Let code speak for itself


Analysis Priority


1. Find and delete unused code

2. Identify and remove complexity

3. Eliminate duplicate patterns

4. Simplify conditional logic

5. Remove unnecessary dependencies


Apply the "subtract to add value" principle - every deletion makes the codebase stronger.

🎯 Best For

  • Claude users
  • GitHub Copilot users
  • Software engineers
  • Development teams
  • Tech leads

💡 Use Cases

  • Code quality improvement
  • Best practice enforcement

📖 How to Use This Skill

  1. 1

    Install the Skill

    Copy the install command from the Terminal tab and run it. The SKILL.md file downloads to your local skills directory.

  2. 2

    Load into Your AI Assistant

    Open Claude or GitHub Copilot and reference the skill. Paste the SKILL.md content or use the system prompt tab.

  3. 3

    Apply Universal Janitor to Your Work

    Open your project in the AI assistant and ask it to apply the skill. Start with a small module to verify the output quality.

  4. 4

    Review and Refine

    Review AI suggestions before committing. Run tests, check for regressions, and iterate on the skill output.

❓ Frequently Asked Questions

Is Universal Janitor compatible with Cursor and VS Code?

Yes — this skill works with any AI coding assistant including Cursor, VS Code with Copilot, and JetBrains IDEs.

Do I need specific dependencies for Universal Janitor?

Check the install command and Works With section. Most code skills only require the AI assistant and your codebase.

How do I install Universal Janitor?

Copy the install command from the Terminal tab and run it. The skill downloads to ./skills/janitor/SKILL.md, ready to use.

Can I customize this skill for my team?

Absolutely. Edit the SKILL.md file to add team-specific instructions, examples, or workflows.

⚠️ Common Mistakes to Avoid

Skipping validation

Always test AI-generated code changes, even for simple refactors.

Missing dependency updates

Check if the skill requires updated dependencies or new packages.

🔗 Related Skills