specs-code-cleanup
Provides final code cleanup after task review approval. Removes debug logs, temporary comments, dead code, optimizes imports, and improves readability. Use when asked to clean up code, polish, finalize, tidy up, remove technical debt, or prepare code for completion after review. Not for refactoring logic or fixing bugs—focused solely on cosmetic and hygiene cleanup.
Security Assessment
About specs-code-cleanup
This skill performs final, cosmetic code cleanup after a task's review has been approved, as part of a specification-driven development workflow. It solves the 'last mile' hygiene problem: turning reviewed-but-messy code into production-ready code by removing debug logs, temporary comments, dead code, and unused imports, and by improving readability, without ever changing behavior. It is integrated as a phase (T-7) of a larger task-implementation command and can also be invoked manually with an action flag.
The workflow is an eight-phase, TodoWrite-tracked process: verify the task is in reviewed/implemented status, identify the files to clean from the review report and task metadata, remove technical debt (grepping for console.log, System.out.println, print(, DEBUG/temp/hack markers, and resolved TODO/FIXME), optimize imports, improve readability using project formatters, verify documentation, run linters and tests as a final gate, and update the task status to completed with a cleanup summary. It leans on project-native tooling such as Maven Spotless, npm lint/format, Black, and Ruff, and includes a language-patterns reference for Java, Spring, TypeScript, NestJS, React, Python, and general projects. A core constraint is that logic and signatures are never changed and the process stops if tests fail.
Target users are software teams following a specs-driven workflow, particularly those using the broader developer-kit-specs plugin, who want a disciplined, behavior-preserving cleanup gate before marking work complete. Typical use cases are polishing a feature branch, stripping debug output before merge, and enforcing consistent formatting and import ordering.
FAQ
What exactly does the cleanup do?
It removes debug logs, temporary/hack comments, dead code, and unused imports, applies project formatters, and improves readability across the files touched by a reviewed task, then runs linters and tests to confirm nothing broke.
Will it change my code's behavior?
No. A core constraint is 'clean, not change': logic and method signatures are never modified, behavior must be identical after cleanup, and the process stops and reports if tests fail.
What are the prerequisites for running it?
The target task must be in reviewed or implemented status (not completed) with an approved review report; otherwise the skill stops and tells you to run the task-review step first.
Which languages and tools does it support?
It provides patterns for Java, Spring, TypeScript, NestJS, React, Python, and general projects, using formatters/linters like Maven Spotless, Checkstyle, Prettier/ESLint, and Black/Ruff.
Can I run it outside the full workflow?
Yes. It is integrated as phase T-7 of the task-implementation command but can be invoked manually by passing the cleanup action and a task path.
Install specs-code-cleanup
Quick Setup:
- Copy the skill folder to
.claude/skills/ - Claude will automatically detect and use the skill
Repository
giuseppe-trisciuoglio/developer-kit