speckit-cleanup

Validate and reorganize spec-kit artifacts in the specs/ directory with sequential numbering.

Updated Mar 13, 2026
One-click install
npx skills add https://github.com/refactory-lang/refactory-template --skill speckit-cleanup
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: speckit-cleanup
Source: https://github.com/refactory-lang/refactory-template/tree/main/.claude/skills/speckit-cleanup
Command: npx skills add https://github.com/refactory-lang/refactory-template --skill speckit-cleanup

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill ensures that all spec-kit artifacts within the specs/ directory are correctly numbered, structured, and validated, preventing organizational chaos and ensuring discoverability.

Core Features & Use Cases

  • Sequential Numbering: Validates and reorganizes spec files with proper 001, 002 numbering.
  • Directory Structure Validation: Checks for correct placement of workflow-specific directories.
  • File Presence Check: Ensures required files for each spec type are present.
  • Use Case: After merging multiple feature branches, spec files might have conflicting or non-sequential numbers. This Skill can automatically renumber and reorganize them to maintain a clean and logical structure.

Quick Start

Run the speckit cleanup script to validate the organization of all spec-kit artifacts in the specs directory.

Frequently Asked Questions about speckit-cleanup

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

FAQPage Schema
How do I reorganize spec files with non-sequential numbering after merging branches?

To reorganize spec files with non-sequential numbering, run a validation and cleanup script. It automatically parses the specs directory, identifies numbering conflicts or duplicates, and renumbers artifacts sequentially to maintain a logical structure.

What is spec-kit artifact validation and when do I need it?

Spec-kit artifact validation is the process of checking the specs directory for correct sequential numbering, directory structure, and file presence. You need it after merging feature branches to prevent organizational chaos and ensure artifact discoverability.

How do I check for misplaced directories and invalid names in my specs folder?

To check for misplaced directories and invalid names in your specs folder, execute a cleanup script. It validates the placement of workflow-specific directories and flags unrecognized directories or invalid file names by parsing JSON status output.

Does the spec-kit cleanup script require any dependencies to run?

The spec-kit cleanup script does not require any external dependencies to run. It operates via internal bash scripts to validate and reorganize artifacts, requiring only an existing specs directory containing your workflow documentation.

How does the cleanup script report missing spec files and validation issues?

The cleanup script reports missing spec files and validation issues by generating and parsing JSON output. This structured output provides a clear status of your specs directory, highlighting any non-sequential numbering or file presence errors for resolution.