speckit-workflows.cleanup

Validate and reorganize spec-kit artifacts in the specs/ directory with JSON output.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

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

Core Features & Use Cases

  • Validates Spec Structure: Checks for sequential numbering, proper directory hierarchy, and required files.
  • Automated Reorganization: Can automatically fix numbering gaps, misplaced directories, and invalid names.
  • Use Case: After merging several feature branches, you can run this Skill to ensure all new specifications are correctly numbered and placed within their respective workflow directories (e.g., specs/feature/001-new-feature.md).

Quick Start

Run the cleanup script from the repo root to validate the organization of all spec-kit artifacts in the specs/ directory.

Frequently Asked Questions about speckit-workflows.cleanup

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

FAQPage Schema
How do I fix non-sequential numbering and gaps in spec files?

To fix non-sequential numbering and gaps in spec files, run the cleanup script to validate the specs/ directory and automatically reorganize artifacts into correct sequential order.

How do I validate the directory structure of spec-kit artifacts?

You validate the directory structure of spec-kit artifacts by running the cleanup script from the repo root, which checks for proper directory hierarchy, sequential numbering, and required files.

What causes misplaced directories and duplicate numbers in specs/ folders?

Misplaced directories and duplicate numbers in specs/ folders typically occur after merging multiple feature branches, disrupting sequential numbering and correct workflow structure.

Can I get a JSON report of spec validation errors?

Yes, you can get a JSON report of spec validation errors because the validation script operates via bash scripts and provides JSON output for detailed reporting of organizational issues.

Does the spec-kit cleanup script automatically rename invalid spec file names?

Yes, the spec-kit cleanup script can automatically reorganize artifacts by fixing numbering gaps, misplaced directories, and invalid names to ensure correct workflow structure.

When should I run a spec directory validation workflow?

You should run a spec directory validation workflow after merging several feature branches to ensure all new specifications are correctly numbered and placed within their respective workflow directories.