ml-cleanup

Identify dead code, unused imports, and duplicated logic in ML experiment scripts.

1|Updated Jan 3, 2022
One-click install
npx skills add https://github.com/daikichiba9511/dotfiles --skill ml-cleanup
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ml-cleanup
Source: https://github.com/daikichiba9511/dotfiles/tree/main/private_dot_codex/skills/ml-cleanup
Command: npx skills add https://github.com/daikichiba9511/dotfiles --skill ml-cleanup

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

ML project codebases accumulate dead code and duplication that waste time and hinder reproducibility.

Core Features & Use Cases

  • Identify dead code, unused imports, and duplicates across experiments.
  • Extract shared logic to common modules to reduce maintenance costs.
  • Generate a structured cleanup plan with optional automated patches to preserve functionality.

Quick Start

Run ml-cleanup on an experiment directory to identify dead code and generate a cleanup plan.

Frequently Asked Questions about ml-cleanup

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

FAQPage Schema
How do I identify and remove dead code from Python ML experiment scripts?

To remove dead code from Python ML experiment scripts, apply a cleanup process to your experiment directory to identify unused imports, duplicated logic, and generate a structured cleanup plan with optional automated patches.

How do I refactor duplicated logic across multiple machine learning experiments?

Refactoring duplicated logic across ML experiments involves identifying shared code and extracting it to common modules, reducing maintenance costs while ensuring functionality is preserved and the workflow remains reproducible.

What is the best way to reduce code bloat in ML project directories without breaking functionality?

Reducing code bloat in ML projects safely requires generating a concise cleanup plan that targets dead code and unused imports, optionally applying automated patches to ensure validation is robust and functionality is preserved.

Can I automatically patch unused imports in Python machine learning codebases?

Yes, you can automatically patch unused imports in Python ML codebases by running a targeted cleanup operation on an experiment directory, which produces optional automated patches to trim the code safely.

Does ML cleanup work on specific experiment folders like src/exp?

Yes, ML cleanup can be applied to a target directory such as src/exp/{exp_dir} or any specific experiment folder to identify dead code, unused imports, and duplicated logic for refactoring.

Why does cleaning up shared logic improve reproducibility in ML workflows?

Cleaning up shared logic improves ML reproducibility by extracting duplicated code into common modules, reducing maintenance overhead and ensuring the experiment workflow remains robust and consistent.