.claude/skills/speckit-workflows.cleanup/SKILL.md
Validate and reorganize spec-kit artifacts with proper numbering and structure
npx skillsauth add pradeepmouli/lspeasy speckit-workflows.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.
The user input to you can be provided directly by the agent or as a command argument - you MUST consider it before proceeding with the prompt (if not empty).
User input:
$ARGUMENTS
This workflow validates the organization of all spec-kit artifacts in the specs/ directory, checking for:
IMPORTANT: This workflow only validates and reorganizes documentation in specs/. It NEVER moves or modifies code files.
Understand the request: Parse the user input for:
Run the cleanup script from the repo root:
For validation only (dry-run):
.specify/extensions/workflows/scripts/bash/create-cleanup.sh --json --dry-run "$ARGUMENTS"
For validation with auto-fix:
.specify/extensions/workflows/scripts/bash/create-cleanup.sh --json --auto-fix "$ARGUMENTS"
For validation only:
.specify/extensions/workflows/scripts/bash/create-cleanup.sh --json "$ARGUMENTS"
Parse the JSON output which includes:
status: "success" or "issues_found"message: Summary messageissues: Array of issues found (with severity)actions: Array of actions taken or suggestedPresent the results to the user:
If status is "success":
Spec structure validation complete
No issues found - all spec-kit artifacts are properly organized!
If status is "issues_found":
Spec structure validation found issues
**Issues detected: [count]**
[List issues from JSON with severity badges]
**Actions [taken/suggested]: [count]**
[List actions from JSON]
**Next Steps:**
- Review the issues and actions
- Apply fixes (`--auto-fix` or agent-driven) after user confirmation
- Rerun the script in `--dry-run` mode to verify it reports no issues
- Repeat fix + dry-run until clean, then commit the cleanup separately from feature work
Provide guidance based on issues (automatic vs. agent-driven fixes):
bugfix-001-* under specs/ instead of specs/bugfix/001-*). The agent should: inspect contents, propose the target path, ask for confirmation, then move.NNN-description rename, ask for confirmation, then apply.specs/ that are neither numbered specs nor known workflow folders (e.g., specs/copilot/). The agent should summarize contents and ask whether to move/rename/ignore.bug-report.md, refactor-spec.md, or spec.md). The agent should suggest creating the required file and ask before doing so.Validation before release:
/speckit.workflows.cleanup "validate before v2.0 release"
Fix numbering after merge:
/speckit.workflows.cleanup --auto-fix "fix numbering after merge"
Dry-run to see what would change:
/speckit.workflows.cleanup --dry-run --auto-fix "check organization"
Remind users that:
specs/ directoryAfter merging branches: Specs from different branches may have overlapping numbers. Cleanup detects duplicates and can renumber automatically.
Before releases: Validate that all specs are properly organized before tagging a release.
Periodic maintenance: Monthly or quarterly cleanup runs help keep specs organized as the project grows.
After reorganization: If you manually moved or renamed specs, run cleanup to validate the new structure.
Remember: This workflow is about organization and validation, not content. It ensures specs are numbered and located correctly but doesn't change what's written in them.
tools
Use for ANY rename, file-move, or move-symbol refactor — especially rename-heavy work across multiple files. Claude Code's built-in LSP tool is READ-ONLY (find references, but no rename / file-move / move-symbol). Hand-editing those refactors silently misses re-exports, aliased imports, type-only imports, and {@link} doc references. This skill drives a real language server via the `lspeasy` CLI to apply a correct WorkspaceEdit that catches every reference. Trigger when the user asks to rename a function/class/variable/type project-wide, move a file and fix its importers, or pull a symbol out into another module.
tools
Documentation site for lspeasy Use when: You are building a browser-based LSP client, a WebSocket-backed language....
tools
Documentation site for lspeasy Use when: You are implementing a custom client layer and need the same validation....
tools
Use when working with lspeasy (client, core, server). Covers: lsp, language-server-protocol, lsp-client, language-client, jsonrpc, transport, lsp-server, language-server.