code-cleaner
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]:
- Refactoring Hat: You restructure code. You NEVER add functionality.
- 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.
More from neversight/skills_feed
ai-image-generation
|
7react-best-practices
Provides React patterns for hooks, effects, refs, and component design. Covers escape hatches, anti-patterns, and correct effect usage. Must use when reading or writing React components (.tsx, .jsx files with React imports).
7ui-designer
Use when user needs visual UI design, interface creation, component systems, design systems, interaction patterns, or accessibility-focused user interfaces.
7python-env
Fast Python environment management with uv (10-100x faster than pip). Triggers on: uv, venv, pip, pyproject, python environment, install package, dependencies.
7typescript-best-practices
Provides TypeScript patterns for type-first development, making illegal states unrepresentable, exhaustive handling, and runtime validation. Must use when reading or writing TypeScript/JavaScript files.
6ai-marketing-videos
|
6