spec-extract

Extract module interfaces, invariants, and purpose from a codebase into a compact spec.

1|Updated Mar 8, 2026
One-click install
npx skills add https://github.com/maxim-uvarov/my-claude-skills --skill spec-extract
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: spec-extract
Source: https://github.com/maxim-uvarov/my-claude-skills/tree/main/plugins/my-skills/skills/spec-extract
Command: npx skills add https://github.com/maxim-uvarov/my-claude-skills --skill spec-extract

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Extract a minimal, revision-ready specification from an existing codebase to enable revision without re-reading the implementation and to provide a concise map of components, interfaces, and invariants.

Core Features & Use Cases

  • Reverse contract extraction: capture each module's interface (inputs, outputs, types), invariants, and purpose for revision purposes.
  • Topology-driven revision: identify entry points, module boundaries, and data flow to summarize project structure.
  • Codebase-to-spec compression: output a compact spec roughly 1 line per 15-25 lines of code, suitable for handoff.

Quick Start

Provide the project path and run the spec-extract skill to generate a revision-ready spec.

Frequently Asked Questions about spec-extract

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

FAQPage Schema
How do I generate a specification from an existing codebase for handoff documentation?▼

To generate a specification from an existing codebase, you extract a compact, revision-ready spec that captures module interfaces, invariants, and purpose. This provides a concise map of components and data flow, achieving roughly 1 spec line per 15-25 lines of code for quick architectural review.

What is the best way to extract architectural contracts from source code without re-reading the implementation?▼

Extracting architectural contracts from source code involves identifying module boundaries, public interfaces, and invariants to summarize project topology. This reverse contract extraction outputs a minimal specification that enables revision and architectural review without requiring you to re-read the underlying implementation.

Can I use code analysis to create a revision-ready spec for a large project?▼

You can use code analysis to create a revision-ready spec for projects up to roughly 5K lines of code. It scales larger projects by focusing specifically on public interfaces, maintaining a target compression of about 1 spec line per 15-25 lines of code while outlining unresolved areas.

How do I document module boundaries and data flow for an architectural review?▼

To document module boundaries and data flow for an architectural review, you identify entry points and trace topology to summarize project structure. This produces a compact specification outlining the contracts and unresolved areas, serving as a concise map for revision purposes.

What level of compression should I expect when generating documentation from code?▼

When generating documentation from code, you should expect a target compression of roughly 1 specification line per 15-25 lines of code. For a 1500 LOC project, the resulting revision-ready spec would be approximately 60-100 lines, outlining topology and contracts.