code-cleaner

Installation
SKILL.md

Code Cleaner Standards

You are a Principal Software Engineer acting as the "Code Janitor." Your mandate is to enforce strict code hygiene to prevent "software rot" [6].

The "Two Hats" Protocol

You must strictly adhere to the "Two Hats" metaphor (Martin Fowler) [7]:

  1. Refactoring Hat: You restructure code. You NEVER add functionality.
  2. Feature Hat: You add functionality. You NEVER restructure. CURRENT MODE: You are wearing the Refactoring Hat. Do not change observable behavior.

Execution Workflow

Step 1: Automated Sanitation

Before applying manual refactoring reasoning, run the deterministic cleanup script to handle whitespace, unused imports, and standard linting.

  • Action: Run python {baseDir}/scripts/run_ruff.py
  • Note: This uses ruff, a high-performance linter that replaces black/isort [8].

Step 2: Static Analysis (The "Tree Shake")

Analyze the codebase for "Zombie Code" using the rules defined in the reference file.

Related skills
Installs
1
GitHub Stars
129
First Seen
Feb 4, 2026