Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
jeffallan avatar

Spec Miner

  • 3k installs
  • 10.8k repo stars
  • Updated May 20, 2026
  • jeffallan/claude-skills

spec-miner is an agent skill that reverse-engineers legacy or undocumented codebases into EARS-format specifications using Glob, Grep, and Read exploration with Arch Hat and QA Hat perspectives.

About

spec-miner is a repository analysis skill that walks a structured checklist across eight codebase areas—entry points, routes, models, auth, validation, error handling, external calls, and config—using concrete glob and grep patterns like `**/main.{ts,js,py}`, `**/routes/**/*`, and `**/auth/**/*`. Developers invoke spec-miner when joining a legacy service or auditing an unknown monorepo before refactoring or shipping features. The skill turns raw file trees into an actionable spec map that highlights controllers, DTOs, JWT guards, and test locations. spec-miner reduces blind edits by surfacing architecture boundaries first, so subsequent feature work targets the right modules.

  • 10-area analysis checklist with glob/grep patterns (entry points, routes, models, auth, validation, errors, external cal
  • Four analysis phases: structure discovery, API surface, data layer, and business logic
  • Phase-gated checklists for stack ID, directory map, endpoints, migrations, and state transitions
  • Test files treated as behavioral documentation via **/*.spec.ts and **/*.test.ts patterns
  • Traces integrations via fetch(, axios., queues (@Cron, Bull), and ConfigService/.env patterns

Spec Miner by the numbers

  • 2,999 all-time installs (skills.sh)
  • +92 installs in the week ending Jul 28, 2026 (Skillselion tracking)
  • Ranked #57 of 1,382 Code Review & Quality skills by installs in the Skillselion catalog
  • Security screen: LOW risk (skills.sh audit)
  • Data as of Jul 28, 2026 (Skillselion catalog sync)
From the docs

What spec-miner says it does

Ground all observations in actual code evidence
SKILL.md
npx skills add https://github.com/jeffallan/claude-skills --skill spec-miner

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs3k
repo stars10.8k
Security audit3 / 3 scanners passed
Last updatedMay 20, 2026
Repositoryjeffallan/claude-skills

How do you map routes, models, auth, and business logic in an unfamiliar or undocumented codebase before changing it?

Turn an unfamiliar repo into a structured spec map—entry points, routes, models, auth, and tests—before you change or ship anything.

Who is it for?

Developers onboarding to inherited projects, auditing legacy services, or extracting requirements from implementation before refactors.

Skip if: Skip for greenfield feature design from scratch, pure code generation without exploration, or repos with complete up-to-date docs already.

When should I use this skill?

User asks to reverse engineer, understand legacy code, map an undocumented system, or create architecture documentation from source.

What you get

A reverse spec saved as specs/{project_name}_reverse_spec.md with stack, structure, EARS requirements, uncertainties, and code-location evidence.

  • specs/{project_name}_reverse_spec.md

By the numbers

  • Five-step core workflow: scope, explore, trace, document in EARS format, flag clarifications
  • Four reference guides for analysis process, EARS format, specification template, and checklist

Files

SKILL.mdMarkdownGitHub ↗

Spec Miner

Reverse-engineering specialist who extracts specifications from existing codebases.

Role Definition

You operate with two perspectives: Arch Hat for system architecture and data flows, and QA Hat for observable behaviors and edge cases.

When to Use This Skill

  • Understanding legacy or undocumented systems
  • Creating documentation for existing code
  • Onboarding to a new codebase
  • Planning enhancements to existing features
  • Extracting requirements from implementation

Core Workflow

1. Scope - Identify analysis boundaries (full system or specific feature) 2. Explore - Map structure using Glob, Grep, Read tools

  • _Validation checkpoint:_ Confirm sufficient file coverage before proceeding. If key entry points, configuration files, or core modules remain unread, continue exploration before writing documentation.

3. Trace - Follow data flows and request paths 4. Document - Write observed requirements in EARS format 5. Flag - Mark areas needing clarification

Example Exploration Patterns

# Find entry points and public interfaces
Glob('**/*.py', exclude=['**/test*', '**/__pycache__/**'])

# Locate technical debt markers
Grep('TODO|FIXME|HACK|XXX', include='*.py')

# Discover configuration and environment usage
Grep('os\.environ|config\[|settings\.', include='*.py')

# Map API route definitions (Flask/Django/Express examples)
Grep('@app\.route|@router\.|router\.get|router\.post', include='*.py')

EARS Format Quick Reference

EARS (Easy Approach to Requirements Syntax) structures observed behavior as:

TypePatternExample
UbiquitousThe <system> shall <action>.The API shall return JSON responses.
Event-drivenWhen <trigger>, the <system> shall <action>.When a request lacks an auth token, the system shall return HTTP 401.
State-drivenWhile <state>, the <system> shall <action>.While in maintenance mode, the system shall reject all write operations.
OptionalWhere <feature> is supported, the <system> shall <action>.Where caching is enabled, the system shall store responses for 60 seconds.
See references/ears-format.md for the complete EARS reference.

Reference Guide

Load detailed guidance based on context:

TopicReferenceLoad When
Analysis Processreferences/analysis-process.mdStarting exploration, Glob/Grep patterns
EARS Formatreferences/ears-format.mdWriting observed requirements
Specification Templatereferences/specification-template.mdCreating final specification document
Analysis Checklistreferences/analysis-checklist.mdEnsuring thorough analysis

Constraints

MUST DO

  • Ground all observations in actual code evidence
  • Use Read, Grep, Glob extensively to explore
  • Distinguish between observed facts and inferences
  • Document uncertainties in dedicated section
  • Include code locations for each observation

MUST NOT DO

  • Make assumptions without code evidence
  • Skip security pattern analysis
  • Ignore error handling patterns
  • Generate spec without thorough exploration

Output Templates

Save specification as: specs/{project_name}_reverse_spec.md

Include: 1. Technology stack and architecture 2. Module/directory structure 3. Observed requirements (EARS format) 4. Non-functional observations 5. Inferred acceptance criteria 6. Uncertainties and questions 7. Recommendations

Documentation

Related skills

How it compares

Choose spec-miner over generic code-explainer prompts when you need a repeatable checklist with glob/grep patterns across routes, models, and auth.

FAQ

What does spec-miner produce?

A structured reverse specification with technology stack, module map, EARS observed requirements, non-functional notes, uncertainties, and recommendations.

When should I use spec-miner?

When joining a legacy codebase, planning enhancements to existing features, or extracting requirements from implementation with no documentation.

What tools does spec-miner require?

Read, Grep, and Glob for exploration, with validation checkpoints before documenting and EARS-format observed requirements grounded in code evidence.

Is Spec Miner safe to install?

skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.

Code Review & Qualitybackenddocstesting

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.