reverse-spec

Generate a structured .spec.md specification from existing source code files, directories, or modules.

15|5|Updated Feb 10, 2026
One-click install
npx skills add https://github.com/connor-git-yaml/reverse-spec --skill reverse-spec
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: reverse-spec
Source: https://github.com/connor-git-yaml/reverse-spec/tree/main/skills/reverse-spec
Command: npx skills add https://github.com/connor-git-yaml/reverse-spec --skill reverse-spec

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill converts existing source code into a formal, structured specification that documents intent, interfaces, and business logic for easier maintenance and forward engineering.

Core Features & Use Cases

  • Generate a .spec.md from a single file, a directory, or an entire module to capture architecture and behavior.
  • Identify entry points, exports, dependencies, and data flows to create a comprehensive architectural overview.
  • Use cases include reverse engineering a module, documenting a library, or scaffolding specs from legacy code.

Quick Start

Provide a target path (file, directory, or module) to analyze and trigger the reverse-spec workflow to emit a specs file under the specs directory.

Frequently Asked Questions about reverse-spec

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

FAQPage Schema
How do I generate documentation from existing source code automatically?

To generate documentation from existing source code, you provide a target path to trigger analysis that emits a structured .spec.md file capturing architecture, interfaces, and business logic.

What is the best way to reverse engineer a legacy module into a formal specification?

Reverse engineering a legacy module into a formal specification is done by analyzing source files to identify entry points, exports, and dependencies, outputting a structured spec document for forward engineering.

Can I analyze an entire large repository to create architecture documentation?

Yes, you can analyze an entire large repository to create architecture documentation by using the supported incremental mode, which processes entire modules gradually to document interfaces and data flows.

Does reverse-spec work with multiple programming languages for code analysis?

Yes, reverse-spec works across languages for code analysis, allowing you to apply the specification generation workflow to single files, directories, or entire modules regardless of the programming language.

How are entry points and data flows documented when extracting a specification?

When extracting a specification, entry points and data flows are documented by enforcing a frontmatter entry point with name and description, identifying exports and dependencies to create an architectural overview.