cleanup

Removes debug logs, commented-out code, and unused imports from specified files.

Updated Jun 4, 2026
One-click install
npx skills add https://github.com/nayounghye/my-claude-skills --skill cleanup-nayounghye
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: cleanup
Source: https://github.com/nayounghye/my-claude-skills/tree/main/cleanup
Command: npx skills add https://github.com/nayounghye/my-claude-skills --skill cleanup-nayounghye

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Codebases accumulate leftover debug logs, dead commented-out code, and unused imports during development, cluttering files and reducing readability. This Skill cleans up that noise in a controlled, surgical way without touching code you did not ask to modify. ## Core Features & Use Cases - Scoped Deletion: Cleans only the files explicitly passed as arguments, never spreading changes to unspecified files. - Conservative Safety Rules: Keeps intentional logging (error handling, observability), exported or dynamically referenced symbols, and test-only helpers, reporting them instead of deleting. - Verification & Reporting: Lists everything removed and everything kept with reasons, then runs type checks or builds to confirm nothing broke. - Use Case: After a debugging session, run the cleanup on your modified source files to strip temporary console.log statements and unused imports before committing. ## Quick Start Ask the AI to run cleanup on the files you just edited, for example: clean up src/api/handler.ts and remove any leftover debug logs and unused imports.

Frequently Asked Questions about cleanup

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

FAQPage Schema
How do I remove debug logs and unused imports from my code?▼

Pass the target file paths as arguments and the cleanup process removes console.log statements, debugger calls, commented-out dead code, and unused imports within those files only. It then reports what was removed and what was kept.

Will code cleanup delete my error logging statements?▼

No, intentional logging such as error handling and observability logs is preserved to avoid silent failures. Only temporary debug output like console.log, print, and debugger statements is removed.

Does cleanup modify files outside the ones I specify?▼

No, changes are strictly limited to files passed as arguments. The skill follows a surgical change principle and never spreads modifications to unspecified files.

What happens to exported functions that look unused?▼

Exported functions, types, dynamically referenced symbols, and test-only helpers are kept rather than deleted, since they may be referenced externally. They are listed in the report with the reason they were preserved.

How is cleanup verified after removing code?▼

After deletion, a type check or build is run to confirm nothing broke. If verification could not be executed, that limitation is explicitly stated in the final report.