spec-miner

Extracts behavioral specifications and interfaces from undocumented source code.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/kamushadenes/nix --skill spec-miner-kamushadenes
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: spec-miner
Source: https://github.com/kamushadenes/nix/tree/main/home/common/ai/resources/claude-code/skills/spec-miner
Command: npx skills add https://github.com/kamushadenes/nix --skill spec-miner-kamushadenes

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Reverse-engineer specifications from undocumented code. Use for legacy systems or creating documentation from implementations.

Core Features & Use Cases

  • Ground observations in actual code evidence
  • Map architecture, data flows, and interfaces into formal specs
  • Generate documentation in a structured, testable format

Quick Start

Provide the codebase or a link to the repository and ask the system to produce a comprehensive spec document describing observed behavior, interfaces, and constraints.

Frequently Asked Questions about spec-miner

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

FAQPage Schema
How do I reverse-engineer specifications from undocumented legacy code?

Reverse-engineering specifications from undocumented legacy code requires analyzing code evidence, mapping control and data flows, and producing a formal specification artifact with constraints, interfaces, and acceptance criteria.

What is the best way to extract requirements from an existing codebase?

Extracting requirements from an existing codebase involves identifying observable facts within the code and aligning them into formal specifications that document intended behavior, architecture, and data flows.

Can I generate EARS-format specifications from source code without documentation?

Generating EARS-format specifications from source code involves grounding observations in actual code evidence and mapping interfaces into structured, testable documentation artifacts with acceptance criteria.

Does spec-mining work for cross-language systems and library APIs?

Spec-mining works for cross-language systems and library APIs by analyzing code evidence across different environments to produce comprehensive spec documents describing observed behavior and constraints.

How do I document legacy code interfaces and constraints when the original specs are missing?

Documenting legacy code interfaces and constraints when original specs are missing requires mapping architecture and data flows to generate structured documentation aligning observable facts into formal specifications.

What are the limitations of extracting specifications from codebases automatically?

Extracting specifications from codebases relies on observable code evidence and control flow mapping, meaning it cannot recover original business intent that is not reflected in the implementation's behavior.