janitor

Identify and remove dead code, unused dependencies, stale feature flags, and orphan endpoints.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/ericklemos/ai-tools --skill janitor-ericklemos
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: janitor
Source: https://github.com/ericklemos/ai-tools/tree/main/.agents/skills/janitor
Command: npx skills add https://github.com/ericklemos/ai-tools --skill janitor-ericklemos

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Ruthlessly identifies and removes dead code, unused dependencies, stale feature flags, and orphan endpoints to slim down a codebase. It enables safe, single-piece deletions per session to reduce complexity without breaking builds.

Core Features & Use Cases

  • Dead code removal: Find and delete unused code blocks and unreachable paths.
  • Dependency cleanup: Remove unused dependencies to shrink the dependency surface.
  • Stale feature flags & orphan endpoints: Identify and prune features and API endpoints no longer referenced.
  • Use Case: When you need to trim a large codebase by safely removing one piece of dead weight per session.

Quick Start

Identify and remove one piece of dead code, unused dependency, or orphan endpoint.

Frequently Asked Questions about janitor

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I safely identify and remove dead code in a large codebase?

Dead code removal is performed by identifying unused variables, unreachable paths, and zombie code, then executing a single safe deletion per session. This approach reduces complexity without breaking builds by requiring test suites and build checks before committing.

What is the best way to clean up unused dependencies and orphan endpoints?

Cleaning up unused dependencies and orphan endpoints involves identifying unreferenced packages and uncalled API endpoints, then removing one piece per session. This shrinks the dependency surface and prunes stale features while maintaining build stability through full test verification.

Can I remove stale feature flags and concluded A/B tests without breaking existing builds?

Stale feature flags and concluded A/B tests can be removed safely by running the full test suite and build checks before committing. This ensures that pruning unreferenced features and uncalled API endpoints does not break existing builds.

How do I ensure PR quality when deleting zombie code and unreferenced packages?

PR quality during zombie code and unreferenced package deletion is ensured by running full test suites and build checks beforehand. The process provides a clear PR description and verification steps for each single safe deletion performed per session.

When should I not use a single-piece deletion approach for codebase cleanup?

A single-piece deletion approach for codebase cleanup should not be used when rapid mass removal is required, as it strictly performs one safe deletion per session. This limitation ensures safe removal of dead code and unused dependencies without breaking builds.

Does automated dead code removal work across diverse codebases?

Automated dead code removal applies to diverse codebases by ruthlessly identifying and removing dead code, unused dependencies, stale feature flags, and orphan endpoints. It enables safe, single-piece deletions per session to slim down the codebase.