Reverse-engineering specialist that extracts specifications from existing codebases. Use when working with legacy or undocumented systems, inherited projects, or old codebases with no documentation. Invoke to map code dependencies, generate API documentation from source, identify undocumented business logic, figure out what code does, or create architecture documentation from implementation. Trigger phrases: reverse engineer, old codebase, no docs, no documentation, figure out how this works, in
Detected risks:
Spec-miner is a reverse-engineering AI skill designed to extract detailed specifications from existing codebases, particularly those that are legacy, undocumented, or inherited. It solves the challenge of understanding complex or opaque software systems by systematically mapping code structure, dependencies, and behavior. This skill is invaluable when documentation is missing or incomplete, allowing developers, engineers, and analysts to quickly gain insight into system functionality, architecture, and business logic without relying on prior knowledge or original authors.
The skill leverages tools such as Read, Grep, Glob, and Bash to explore codebases thoroughly. Its workflow consists of scoping the analysis, exploring files and configurations, tracing data flows and request paths, and documenting findings in EARS (Easy Approach to Requirements Syntax) format. It also provides mechanisms to flag unclear areas or technical debt for further investigation. Core features include identifying entry points, mapping APIs, extracting business logic, and creating architecture documentation. Spec-miner emphasizes grounding all observations in actual code evidence while distinguishing between facts and inferences, ensuring reliability and accuracy.
Target users include developers onboarding to unfamiliar systems, teams managing legacy applications, software architects documenting existing infrastructure, and QA specialists analyzing edge cases or observable behaviors. Use cases range from generating API documentation and understanding undocumented features to planning enhancements and extracting requirements directly from implementation. Essentially, spec-miner equips technical teams with a structured approach to navigate and comprehend complex or poorly documented code environments.
Begin by defining the analysis scope, identifying whether you need to review the full system or specific features. Then use the Explore step with Read, Grep, and Glob to map the code structure and confirm coverage before documenting.
Spec-miner is language-agnostic as long as the code can be accessed and searched using the Read, Grep, and Glob tools. It can be applied to Python, JavaScript, or other text-based codebases.
Yes. Observed behaviors can be documented in EARS format, which can then be compiled into structured specification documents following templates provided in the reference guide.
Spec-miner relies entirely on observable code; it cannot infer undocumented business rules beyond what is implemented. Accuracy depends on thorough exploration and correct use of Read, Grep, and Glob to cover all relevant files.
No. Spec-miner is designed to work even with unfamiliar or inherited projects, providing systematic guidance for discovering architecture, dependencies, and behaviors.
Quick Setup:
.claude/skills/Repository
jeffallan/claude-skills