code-clean

Official

Tidy research code without changing results.

AuthorUnaryLab
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Clean up an existing codebase safely by removing dead code, debug cruft, and style issues while preserving behavior and outputs.

Core Features & Use Cases

  • Behavior-preserving cleanup with an explicit safety-net (tests or golden/characterization snapshots) and verify-after-each-batch discipline.
  • Risk-tiered refactoring that treats any changed outputs (especially numerical results) as regressions to revert.
  • Evidence-based dead-code removal using tool detection plus reference checks, while avoiding deletion of entry points, public APIs, or dynamically dispatched code.
  • Use cases: presenting experiment code, removing unused imports and debug prints, extracting hardcoded paths/hyperparameters into config, and preparing code for release or handoff.

Quick Start

Run behavior-preserving cleanup for the codebase on your branch by first capturing a baseline (tests or a golden outputs snapshot) and then applying safe formatting/lint fixes followed by evidence-backed dead-code removal.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: code-clean
Download link: https://github.com/UnaryLab/ai-for-research/archive/main.zip#code-clean

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.