plugins/developer-kit-specs/skills/specs-code-cleanup/SKILL.md
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.
npx skillsauth add giuseppe-trisciuoglio/developer-kit specs-code-cleanupInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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
| 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 |
./mvnw spotless:apply, npm run lint:fix, black, etc.See references/language-patterns.md for language-specific formatter commands, import ordering, and grep patterns.
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:
--task=docs/specs/001-feature/tasks/TASK-001.md--spec=docs/specs/001-feature --task=TASK-001If Format 2 is used, construct the task file path as: {spec}/tasks/{task}.md
Read the task file. Verify:
reviewed or implemented (not completed)TASK-XXX--review.md exists and is approvedIf not reviewed → stop and tell user to run /developer-kit-specs:specs.task-review first
Extract task ID, title, and provides files
TASK-XXX--review.md for files created/modifiedprovides field for file pathsSearch files for temporary/debug artifacts with Grep:
console.log, System.out.println, print(, // DEBUG:, // temp, // hackTODO/FIXME comments (keep unresolved ones)Review context for each finding. Remove confirmed debt and document what was removed.
Auto-update task status:
## Cleanup Summary section to the task filecompleted and set completed_date + cleanup_dateAppend ## Cleanup Summary to task file with:
Mark all todos complete
/developer-kit-specs:specs.task-implementation --lang=spring --task="docs/specs/001-user-auth/tasks/TASK-001.md" --action=cleanup
Actions:
reviewedUserController.java, UserService.java, UserRepository.javaSystem.out.println and 2 resolved TODOs./mvnw spotless:apply./mvnw test -qcompleted/developer-kit-specs:specs.task-implementation --lang=typescript --task="docs/specs/002-dashboard/tasks/TASK-003.md" --action=cleanup
Actions:
reviewedDashboard.tsx, useDashboard.ts, Dashboard.test.tsxconsole.log statementsnpm run lint:fix and npm run formatnpm testcompleteddevelopment
Explore codebase before committing to a change. Phase executor skill for specs.explore command.
development
Executes real end-to-end verification against a running application after specification implementation. Detects the application type, starts the local runtime (Docker, Node, Spring Boot, etc.), runs real tests (curl for REST APIs, Playwright for web SPAs, computer-use for desktop apps), verifies acceptance criteria from the functional specification, generates a markdown report, and tears down the environment. Use when: user asks to verify a completed spec with real tests, run e2e checks after implementation, validate acceptance criteria in a live environment, or test the feature for real after task completion.
development
Initialize Spec-Driven Development context — detects tech stack, conventions, architecture patterns, and bootstraps persistence backends. Triggers on 'sdd-init', 'init sdd', 'setup sdd', 'initialize sdd', 'setup project', 'initialize project context'. Creates/updates docs/specs/architecture.md & ontology.md (Constitution), and populates knowledge-graph.json.
development
Optimizes raw idea descriptions into structured prompts ready for the brainstorming workflow. TRIGGER when: user says "optimize for brainstorm", "prepare idea for brainstorm", "enhance this idea", "make this ready for brainstorming", "imposta per brainstorm", or wants to improve a feature idea before using /specs.brainstorm. DO NOT TRIGGER for code optimization, refactoring, or general prompt engineering tasks.