spec-gen-generate

Extract OpenSpec specifications from codebases using static analysis and LLM-assisted inference.

270|34|Updated Jan 31, 2026
One-click install
npx skills add https://github.com/clay-good/spec-gen --skill spec-gen-generate
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: spec-gen-generate
Source: https://github.com/clay-good/spec-gen/tree/main/examples/mistral-vibe/skills/spec-gen-generate
Command: npx skills add https://github.com/clay-good/spec-gen --skill spec-gen-generate

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Many codebases lack up-to-date, machine-readable specifications, forcing engineers and agents to infer behavior from scattered source files and outdated documentation; this Skill extracts the actual behavior and produces structured OpenSpec documentation grounded in code evidence.

Core Features & Use Cases

  • Automated Spec Extraction: Performs a codebase survey and deep analysis to identify domains, entities, APIs, and implementation links, then emits OpenSpec-compliant spec.md files.
  • Evidence-Based Requirements: Traces each requirement and scenario back to concrete source files and preserves existing openspec/config.yaml while appending generated metadata.
  • Drift Detection & Integration: Maps code changes to specs to surface gaps, stale references, uncovered files, or orphaned specs and supports CLI-driven workflows for verification and CI gates.
  • Use Case: Run against a monorepo to generate domain-level specifications, an architecture overview, and a drift report to prioritize test and refactor work.

Quick Start

Run the spec-gen-generate skill to reverse-engineer OpenSpec specifications from the target repository and output openspec/specs.

Frequently Asked Questions about spec-gen-generate

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

FAQPage Schema
How do I generate OpenSpec specifications from an existing codebase?▼

To generate OpenSpec specifications from an existing codebase, you use static analysis and LLM-assisted inference to extract domains, API surfaces, and entities. This process produces OpenSpec-compliant spec.md files grounded in concrete source code evidence.

What programming languages are supported for extracting domain specifications and API definitions?▼

Domain specifications and API definitions can be extracted from repositories written in TypeScript, JavaScript, Python, Go, Rust, Java, C++, and Swift. The static analysis surveys these codebases to identify domains, entities, and implementation links.

Can I trace generated requirements back to concrete source files?▼

Yes, you can trace generated requirements back to concrete source files. The spec extraction process identifies implementation links and preserves existing openspec/config.yaml metadata while appending evidence-based requirement traces.

How do I detect documentation drift between my source code and specifications?▼

You detect documentation drift by mapping code changes to existing specifications. This surfaces gaps, stale references, uncovered files, and orphaned specs, producing a drift report to help prioritize testing and refactoring work.

What is the best way to reverse-engineer architecture documentation for a monorepo?▼

The best way to reverse-engineer architecture documentation for a monorepo is running automated spec extraction. It performs deep codebase analysis to generate domain-level specifications, an architecture overview, and a drift report.