A meta-skill that auto-generates three-layer specification documents (01_overview / 02_business_spec / 03_technical_spec) for any project, and builds /spec (spec Q&A) and /spec-maintenance (spec maintenance) skills. Analyzes the codebase to generate specs, leveraging existing specs or documents as input when available. Triggered by keywords like "generate specs", "spec-skills-generator", "setup specification management", "create spec skills", "build spec documents".
How this skill is triggered — by the user, by Claude, or both
Slash command
/spec-skills-generator:spec-skills-generatorThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Generates three-layer specification documents for any project and auto-generates `/spec` and `/spec-maintenance` skills.
Generates three-layer specification documents for any project and auto-generates /spec and /spec-maintenance skills.
Generate spec documents in the language detected from the project's CLAUDE.md <language> tag. If no language is configured, default to English.
Execute the following Phases 1 through 8 in order.
**/spec-skills-generator/**/discover_project.py, then run:python {found_path} "$(pwd)"
Review the following from the output JSON:
spec_files: List of spec document candidates and their heading structuresource_code: Source code structure (primary languages, entry points, shared modules)tests: Test directories, test file counts, test configurationiac: Infrastructure-as-Code filesbuild_system: Build systemclaude_config: Presence of CLAUDE.md, language settings, existing skillsIf spec/document files are detected, Read them to leverage as existing knowledge (parallel reads recommended)
Use AskUserQuestion to confirm the following:
Question 1: Confirm spec output path
docs/specification/ (default)" / "Specify a custom path"docs/specification/Question 2: Confirm use of existing documents (only if files detected in spec_files)
Question 3: Confirm overwrite of existing skills (only if existing /spec or /spec-maintenance skills are found)
Language setting: Use claude_config.detected_language if available. Otherwise, default to English.
Use Glob to locate **/spec-skills-generator/**/references/spec-document-templates.md, then Read it to understand the template structure.
Project name: Use project_name from discover_project.py (directory name) as the spec title. If it seems unnatural (e.g., directory name is src or app), confirm with the user via AskUserQuestion.
Section application rules (the goal is NOT to fill every template section; only document information that exists in the project):
In addition to discover_project.py results, Read the following for deep understanding:
source_code.entry_points → Extract API specs and processing flowssource_code.shared_modules → Understand business logic and domain modelsiac.files → Understand infrastructure configuration (skip if none)tests results from discover_project.py → Understand test directory structure, test counts, and supplement feature listsContext management guidelines (to prevent context exhaustion in large projects):
Generate according to template §1-§6:
Output to: {spec_dir}/01_overview.md
Read and document business logic source code:
Output to: {spec_dir}/02_business_spec.md
Describe technical implementation details:
Output to: {spec_dir}/03_technical_spec.md
Report a summary of the 3 generated files:
Confirm via AskUserQuestion:
After confirmation, proceed to Phase 4
Use Glob to locate **/spec-skills-generator/**/references/spec-skill-template.md, then Read it as a reference template.
The template is a structural reference, not meant for direct variable substitution. After understanding the structure of the specs generated in Phase 3, do the following:
Build a spec map: Analyze the heading structure of each spec file and create a topic → section correspondence table
Set trigger keywords: Extract project-specific keywords from the spec content
AskUserQuestion options: Set 3-4 major topics from the specs as options
Write to .claude/skills/spec/SKILL.md
Use Glob to locate **/spec-skills-generator/**/references/spec-maintenance-template.md, then Read it as a reference template.
Spec structure table: List the main sections of each spec file
Build impact mapping table: Create correspondence between source code structure and spec sections
source_code.entry_points: Entry points → Corresponding spec sectionssource_code.shared_modules: Shared modules → Corresponding spec sectionsiac.files: IaC files → Infrastructure-related spec sectionsUpdate patterns: Describe common update patterns based on the project structure
docs-check command: Configure based on build system
make docs-checknpm run docs-checkpython scripts/check_spec_drift.pyWrite to .claude/skills/spec-maintenance/SKILL.md
Use Glob to locate **/spec-skills-generator/**/references/check-spec-drift-example.py, then Read it as a reference implementation.
The reference implementation contains content specific to the addplus-proxy project. Customize for the project structure:
Path configuration: Adjust PROJECT_ROOT, SPEC_DIR, source directory paths for the project
Component count functions: Create _count_*() functions matching the project structure
Spec table count functions: Adjust regex in _count_spec_*() to match spec headings
_count_table_rows() is generic and can be used as-isFilename coverage check: Adjust for the project's source file structure
Metadata freshness check: Omit if specs don't have a "Last verified date"
Write to scripts/check_spec_drift.py
Use Glob to locate **/spec-skills-generator/**/references/claude-md-section.md, then Read it as a reference template.
Build system integration:
docs-check target
docs-check: ## Check spec-code consistency
python scripts/check_spec_drift.py
"docs-check" to scriptspython scripts/check_spec_drift.py directly)CLAUDE.md update:
Dry-run check_spec_drift.py:
python scripts/check_spec_drift.py
Review the results:
Report generated results to the user:
/spec and /spec-maintenancecheck_spec_drift.py execution resultsreferences/. Understand the project's characteristics and adjust content accordingly/spec or /spec-maintenance skills are foundnpx claudepluginhub byteflare-co/byteflare-skills --plugin spec-skills-generatorScans existing codebase and interviews you to bootstrap SpecKit projects with CLAUDE.md, constitution.md, and full .specify/ scaffolding. Supports presets for Flask-React, FastAPI-Next, CLI-Python, and Express-React stacks.
Routes development tasks to appropriate spec skills (brainstorm, plan, implement, finish). Enforces disciplined workflow phases and hard transitions for any conversation or task.
Establishes spex SDD methodology: workflow routing, process discipline, spec-first principle, skill discovery. Invoke at start of spex conversations to select workflow skills.