CodeSlobCleanup

Code Slob Cleanup Documentation

Welcome to the documentation for the Code Slob Cleanup project. This project provides an automated toolchain and a packaged skill for coding agents, designed to identify, refactor, and rigorously verify Python code to remove “code slob”—subtle technical debt, unnecessary verbosity, and complexity often introduced by AI coding agents or rapid development.

Getting Started

Installation

Simply run curl -LsSf https://raw.githubusercontent.com/Jazz23/CodeSlobCleanup/refs/heads/main/install.sh | sh.

During the first run, a code-slob-cleanup.json file will be auto-generated in your project root to manage exclusions and track edits for potential reverts. During the cleanup process, a temporary directory .code-slob-tmp will be created. It is recommended to add this to your .gitignore file.

For manual installation:

Usage

There are multiple workflows you can trigger with natural language. Below is a comprehensive list of example prompts to utilize Code Slob Cleanup:

Exclusions

See exclusions for how to specify functions, files, or folders to ignore during the cleanup process.

Slob Identifiers

How It Works

Code Slob Cleanup identifies, tests, and applies code refactorings in a rigorous multi-stage workflow.

  1. Scanner: Detects “slob” candidates using static analysis (complexity, LoC) and semantic analysis using your agent.
  2. Verifier: Ensures that refactoring does not break functionality using Hypothesis for property-based testing.
  3. Refactor Applies refactored code to the codebase if verification passes.

Documentation Sections