
Specs Code Cleanup
- 1.4k installs
- 318 repo stars
- Updated June 22, 2026
- giuseppe-trisciuoglio/developer-kit
Specs Code Cleanup is a Claude Code skill that runs final hygiene passes removing debug statements, reordering imports, and polishing readability for developers who finish agent-assisted code reviews before merge.
About
Specs Code Cleanup is a language-aware post-review hygiene skill from the developer-kit that strips debug statements, eliminates stale comments, reorders imports, and applies formatter and linter commands after review approval. Reference tables cover Java with ./mvnw spotless:apply and checkstyle, TypeScript with Prettier and ESLint --fix, and Python with black and ruff format plus ruff check. Import ordering rules spell out java.* through project imports for Java and external-to-relative paths for TypeScript including @/ aliases. Common Grep search patterns help agents locate console.log, TODO debris, and unused imports across files. Reach for Specs Code Cleanup when a PR is functionally approved but still carries agent artifacts, inconsistent import blocks, or formatting drift that would fail CI lint gates on merge.
- Removes console.log, System.out.println, print() debug statements across Java, TypeScript and Python
- Applies language-specific formatter and linter commands (mvnw spotless, prettier, black, ruff, eslint)
- Enforces correct import ordering per language (Java, TypeScript)
- Uses targeted grep patterns to locate and eliminate technical debt markers
- Hard-gate: only run after task review approval; hands off to final commit or ship
Specs Code Cleanup by the numbers
- 1,392 all-time installs (skills.sh)
- +146 installs in the week ending Aug 5, 2026 (Skillselion tracking)
- Ranked #91 of 1,352 Code Review & Quality skills by installs in the Skillselion catalog
- Security screen: LOW risk (skills.sh audit)
- Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/giuseppe-trisciuoglio/developer-kit --skill specs-code-cleanupAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 1.4k |
|---|---|
| repo stars | ★ 318 |
| Security audit | 3 / 3 scanners passed |
| Last updated | June 22, 2026 |
| Repository | giuseppe-trisciuoglio/developer-kit ↗ |
How do you clean up code after an agent review?
Run final hygiene passes that remove debug statements, reorder imports, eliminate dead code comments, and polish readability after agent review approval.
Who is it for?
Developers merging agent-generated or reviewed PRs in Java, TypeScript, or Python repos who need a consistent final polish pass.
Skip if: Skip Specs Code Cleanup when the change still needs functional fixes or architectural rework rather than formatting and debug removal.
When should I use this skill?
The user says the review is approved and wants a final cleanup, import sort, or linter pass before merge.
What you get
Formatted source files, ordered imports, removed debug statements, and deleted dead-code comments ready for CI lint.
- Lint-clean source files
- Reordered import blocks
By the numbers
- Covers cleanup patterns for Java, TypeScript, and Python
- Documents separate format and lint commands per language in reference tables
Files
Code Cleanup
Overview
Performs post-review cosmetic cleanup to make code production-ready. This workflow is now integrated as Phase T-7 of /developer-kit-specs:specs.task-implementation. It can also be invoked manually using --action=cleanup.
Input: docs/specs/[id]/tasks/TASK-XXX.md (reviewed status) Output: Cleaned code, task marked completed
When to Use
- Use when asked to clean up code, polish, finalize, tidy up, or remove technical debt after review approval.
- Use to prepare code for completion: remove debug logs, dead code, optimize imports, and improve readability.
- Use as the final quality gate in the specification-driven development workflow.
- Not for refactoring logic or fixing bugs — focused solely on cosmetic and hygiene cleanup.
Arguments
| Argument | Required | Description |
|---|---|---|
--lang | No | java, spring, typescript, nestjs, react, python, general |
--task | Yes | Path to task file |
--action | No | Set to cleanup for manual invocation |
Best Practices
- Clean, not change: Only remove or reorganize — never change functionality
- Preserve behavior: Code must work exactly the same after cleanup
- Use project tools: Prefer
./mvnw spotless:apply,npm run lint:fix,black, etc. - Use TodoWrite: Track progress through all 8 phases
- Stop on failure: If tests fail, stop and report — do not proceed
See references/language-patterns.md for language-specific formatter commands, import ordering, and grep patterns.
Instructions
Phase 1: Task Verification
1. Parse $ARGUMENTS for parameters:
--lang(optional): Target language/framework--task(required): Task ID or file path--spec(optional): Spec folder path (used with task ID)
Support two formats:
- Format 1 (direct path):
--task=docs/specs/001-feature/tasks/TASK-001.md - Format 2 (spec+task):
--spec=docs/specs/001-feature --task=TASK-001
If Format 2 is used, construct the task file path as: {spec}/tasks/{task}.md
2. Read the task file. Verify:
- Status is
reviewedorimplemented(notcompleted) - Review report
TASK-XXX--review.mdexists and is approved
3. If not reviewed → stop and tell user to run /developer-kit-specs:specs.task-review first 4. Extract task ID, title, and provides files
Phase 2: Identify Files to Clean
1. Read TASK-XXX--review.md for files created/modified 2. Read task provides field for file paths 3. Verify files exist; build cleanup list 4. Categorize: source files, test files, config files
Phase 3: Technical Debt Removal
Search files for temporary/debug artifacts with Grep:
console.log,System.out.println,print(,// DEBUG:,// temp,// hack- Resolved
TODO/FIXMEcomments (keep unresolved ones)
Review context for each finding. Remove confirmed debt and document what was removed.
Phase 4: Import Optimization
1. Run language-specific import optimizer if available (see references) 2. Manually remove unused imports if no tool exists 3. Document files changed
Phase 5: Code Readability Improvements
1. Run language-specific formatter if available (see references) 2. If no formatter: fix indentation, break long lines (>120), fix spacing 3. Remove dead code only if obviously safe 4. Document changes
Phase 6: Documentation Verification
1. Verify class/file headers and public API docs 2. Check remaining TODOs are still valid and have context 3. Remove or update outdated comments 4. Document documentation changes
Phase 7: Final Verification
1. Run linters if available 2. Run tests if available 3. Verify no logic or signature changes were introduced 4. If tests fail → stop and report failures
Phase 8: Task Completion
1. Auto-update task status:
- Add a
## Cleanup Summarysection to the task file - Check any remaining boxes in the DoD section
- Hooks automatically update status to
completedand setcompleted_date+cleanup_date
2. Append ## Cleanup Summary to task file with:
- Files cleaned
- Changes made
- Verification checklist (linters, tests, no functionality changes)
3. Mark all todos complete
Examples
Spring Boot Cleanup
/developer-kit-specs:specs.task-implementation --lang=spring --task="docs/specs/001-user-auth/tasks/TASK-001.md" --action=cleanupActions: 1. Verify TASK-001 status is reviewed 2. Files: UserController.java, UserService.java, UserRepository.java 3. Remove 5 System.out.println and 2 resolved TODOs 4. Run ./mvnw spotless:apply 5. Run ./mvnw test -q 6. Mark task completed
TypeScript Cleanup
/developer-kit-specs:specs.task-implementation --lang=typescript --task="docs/specs/002-dashboard/tasks/TASK-003.md" --action=cleanupActions: 1. Verify TASK-003 status is reviewed 2. Files: Dashboard.tsx, useDashboard.ts, Dashboard.test.tsx 3. Remove 8 console.log statements 4. Run npm run lint:fix and npm run format 5. Run npm test 6. Mark task completed
Constraints and Warnings
- Never change logic or signatures during cleanup
- Stop immediately and report if tests fail
- Verify behavior is unchanged before marking complete
Language-Specific Cleanup Patterns
Reference for language-specific formatter commands, import ordering, and search patterns.
Formatters & Linters
| Language | Format | Lint |
|---|---|---|
| Java | ./mvnw spotless:apply | ./mvnw checkstyle:check spotless:check |
| TypeScript | npm run format / npx prettier --write | npm run lint / npx eslint --fix |
| Python | black . / ruff format | ruff check . && black --check . |
Import Ordering
Java: java.* → jakarta.*/javax.* → third-party → project imports TypeScript: external libraries → internal absolute (@/...) → internal relative (./...)
Common Search Patterns
Use Grep to find technical debt:
# JavaScript/TypeScript
grep -rn "console.log" --include="*.ts" --include="*.tsx" [files]
grep -rn "// DEBUG:" --include="*.ts" [files]
# Java
grep -rn "System.out.println" --include="*.java" [files]
# Python
grep -rn "print(" --include="*.py" [files]Related skills
How it compares
Use Specs Code Cleanup after review approval when you need targeted hygiene, not when you need deep static analysis or security auditing.
FAQ
Which languages does Specs Code Cleanup support?
Specs Code Cleanup includes formatter and linter commands for Java (Maven Spotless and Checkstyle), TypeScript (Prettier and ESLint), and Python (black and ruff) with language-specific import ordering rules.
When should Specs Code Cleanup run in a workflow?
Specs Code Cleanup is intended after agent or human review approval as a final pass to remove debug noise, delete stale comments, and align files with project formatters before merge.
Is Specs Code Cleanup safe to install?
skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.