spec-mine

Analyze a codebase to generate .autopilot/spec.md describing existing behavior.

Updated Mar 12, 2026
One-click install
npx skills add https://github.com/Nerfherder16/BrickLayer --skill spec-mine
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: spec-mine
Source: https://github.com/Nerfherder16/BrickLayer/tree/main/.claude/skills/spec-mine
Command: npx skills add https://github.com/Nerfherder16/BrickLayer --skill spec-mine

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Inverse spec-writer mines existing code into a .autopilot/spec.md describing what the code DOES. Analyzes public API, data models, business logic, test coverage gaps.

Core Features & Use Cases

  • Analyze public API surfaces, data models, and business logic to produce a formal spec describing implemented behavior.
  • Identify test coverage gaps and missing documentation to streamline onboarding and refactor planning.
  • Output is a ready-to-review .autopilot/spec.md that describes current implementation for future work.

Quick Start

Run spec-mine against a path or module to generate a .autopilot/spec.md describing the code's current behavior.

Frequently Asked Questions about spec-mine

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

FAQPage Schema
How do I generate documentation for a legacy codebase before refactoring?

Generate legacy code documentation by analyzing a codebase to produce a .autopilot/spec.md file. This spec describes existing behavior, public API, data models, and business logic to prepare for refactoring.

What is the best way to analyze code to find test coverage gaps?

To find test coverage gaps, analyze code to identify missing tests and undocumented behavior. The process outputs a spec marking coverage gaps as actionable tasks, streamlining onboarding and refactor planning.

Can I extract a formal spec from existing source code automatically?

You can extract a formal spec from existing source code automatically. The analysis reads implemented behavior and outputs a ready-to-review .autopilot/spec.md detailing public API surfaces and data models.

Does spec-mine work for onboarding developers onto unfamiliar modules?

Spec-mine works for developer onboarding by analyzing a given path or module to describe what the code currently does. It generates a formal spec detailing business logic and test gaps for new team members.

What limitations exist when mining code into behavior specifications?

When mining code into behavior specifications, the output is limited to describing existing implementation details like public APIs and data models. It identifies coverage gaps as tasks but does not generate new code.