Agent skill

Spec Miner

by Jeffallan in Jeffallan/claude-skills

Reads an undocumented codebase and writes up what it does: architecture, data flows, observed behavior as EARS requirements, and open questions to confirm.

MITAuto-check passedDevelopment

Install Spec Miner

skills CLI
$ npx skills add Jeffallan/claude-skills --skill spec-miner -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Jeffallan/claude-skills spec-miner --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Jeffallan/claude-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/spec-miner .claude/skills/spec-miner && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
spec-miner
GitHub stars
12k
Token cost
~1.2k tokens
SKILL.md length
362 words
Files
5 (incl. references)
Skills in repo
58
Repo updated
First seen
Licence
MIT

At a glance

Reads an undocumented codebase and writes up what it does: architecture, data flows, observed behavior as EARS requirements, and open questions to confirm.

  • Works in 5 steps: Scope - Identify analysis boundaries… → Explore - Map structure using Glob,… → Trace - Follow data flows and request… → …
  • Getting up to speed on an inherited project with no documentation
  • SKILL.md covers Role Definition, When to Use This Skill, Core Workflow and Reference Guide, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

The agent works from two perspectives, an architecture view of structure and data flows and a QA view of observable behavior and edge cases. It scopes the analysis, explores with Glob, Grep and Read, traces data flows and request paths, writes the observed requirements in EARS format and flags areas that need clarification. A checkpoint requires enough file coverage, so unread entry points, configuration files or core modules mean more exploration before any writing.

The EARS patterns in the skill cover ubiquitous, event-driven, state-driven and optional requirements, each with an example. Reference files cover the analysis process, EARS format, a specification template and an analysis checklist. The skill's allowed tools are Read, Grep and Glob.

When your agent uses it

  • Getting up to speed on an inherited project with no documentation
  • Documenting what an old module actually does
  • Extracting requirements from implementation before a rewrite
  • Onboarding to a new codebase
  • Planning changes to an existing feature

Example prompts

  • “Explore the billing module and write up its behavior as EARS requirements.”
  • “Map the entry points and data flows of this inherited Python service.”
  • “There are no docs for the import job, so figure out what it does and list what is unclear.”
  • “Create an architecture overview of this repository from the code itself.”

Requirements

  • Pre-approved tools (allowed-tools): Read, Grep, Glob

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Scope - Identify analysis boundaries (full system or specific feature)
  2. Explore - Map structure using Glob, Grep, Read tools
  3. Trace - Follow data flows and request paths
  4. Document - Write observed requirements in EARS format
  5. Flag - Mark areas needing clarification

What it can do on your machine

Read from SKILL.md and the folder at commit 1be15d8. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Grep
    • Glob

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • github.com
    • synergetic.solutions
    • jeffallan.github.io

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Spec Miner loads about 1.2k tokens when it runs, and up to ~3.1k if it reads all its reference files. Until then it costs about 146 tokens; SKILL.md has 362 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~146
When it runs · the whole SKILL.md, loaded when a task matches
~1.2k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~3.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from Jeffallan/claude-skills at commit 1be15d8, republished under its MIT licence (© Jeffallan). 362 words, ~1,192 tokens.

Download SKILL.mdSave it as .claude/skills/spec-miner/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.
name
spec-miner
description
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, inherited project, legacy analysis, code archaeology, undocumented features.
allowed-tools
Read, Grep, Glob
license
MIT
metadata.author
https://github.com/Jeffallan
metadata.company
https://synergetic.solutions
metadata.version
1.1.0
metadata.domain
workflow
metadata.triggers
reverse engineer, legacy code, code analysis, undocumented, understand codebase, existing system
metadata.role
specialist
metadata.scope
review
metadata.output-format
document
metadata.related-skills
feature-forge, fullstack-guardian, architecture-designer

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.

Show full SKILL.md (135 more words)Show less

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

Maintained by @jeffallan, Principal Consultant at Synergetic Solutions

Documentation

© Jeffallan, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 4 other files (references) in skills/spec-miner of Jeffallan/claude-skills.

  • SKILL.md
  • references/analysis-checklist.md
  • references/analysis-process.md
  • references/ears-format.md
  • references/specification-template.md

Open the folder on GitHubat commit 1be15d8

Compare with similar skills

Spec Miner next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Spec Miner compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Spec Miner this skillJeffallan/claude-skills12k—~1.2kAutomated safety check: PassMIT
Project Onboarding Guide from Knowledge GraphEgonex-AI/Understand-Anything86k—~1.2kAutomated safety check: PassMIT
Deepwiki Rssopaco/deepwiki-rs3.1k—~748Automated safety check: PassMIT
Acquire Codebase Knowledgegithub/awesome-copilot40k1 repos~2.3kAutomated safety check: PassMIT
Codex Proxy RS Development Guidezyycn/codex-proxy-rs766—~618Automated safety check: PassApache-2.0
Githits Codegithits-com/githits-cli114—~2.6kAutomated safety check: PassApache-2.0

Similar skills

  • Writes an onboarding guide for new team members from a project's existing knowledge graph, after checking that the graph still matches the current commit.

    86k GitHub stars~1.2k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Deepwiki Rs

    sopaco/deepwiki-rs

    AI-powered Rust documentation generation engine for comprehensive codebase analysis, C4 architecture diagrams, and automated technical documentation.

    3.1k GitHub stars~748 tokensUpdated 25 days ago
    DevelopmentAuto-check passed
  • Acquire Codebase Knowledge

    github/awesome-copilot

    Official

    Maps an unfamiliar codebase into seven evidence-backed documents in docs/codebase/, using a scan script and templates, for onboarding or architecture write-ups.

    40k GitHub starsUsed in 1 repo~2.3k tokens
    DevelopmentAuto-check passed
  • Routes development, troubleshooting, review and documentation tasks on the Codex Proxy RS repository to the right section of its docs, instead of loading the whole architecture or contributing guide.

    766 GitHub stars~618 tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Githits Code

    githits-com/githits-cli

    A skill your agent uses whenever invoking the GitHits CLI for open-source code, documentation, or example evidence, including code search/grep, file navigation, source verification, docs lookup, or…

    114 GitHub stars~2.6k tokensUpdated today
    DevelopmentAuto-check passed
  • Evidence-Grounded Explainer

    EveryInc/compound-engineering-plugin

    Produces an evidence-backed explanation of how and why something has its current shape, or what happened over a stretch of work, tuned to its intended reader.

    25k GitHub stars~2.1k tokensUpdated 2 days ago
    DevelopmentAuto-check passed

More from Jeffallan/claude-skills

All 58 skills in this repo
  • API Designer

    Jeffallan/claude-skills

    Designs REST and GraphQL APIs from resource modeling to an OpenAPI 3.1 contract, with versioning, pagination and RFC 7807 error handling.

    12k GitHub starsUsed in 1 repo~2k tokens
    Auto-check passed
  • CLI Developer

    Jeffallan/claude-skills

    Walks through designing, building and polishing a command-line tool: user workflow and command hierarchy, implementation in commander, click, typer or cobra, completions and cross-platform testing.

    12k GitHub starsUsed in 1 repo~1.2k tokens
    Auto-check passed
  • Kubernetes Specialist

    Jeffallan/claude-skills

    Creates and checks Kubernetes manifests, Helm charts, RBAC and network policies, and helps debug pod problems, with kubectl checks and rollback steps.

    12k GitHub starsUsed in 1 repo~2.1k tokens
    Auto-check passed
  • Laravel Specialist

    Jeffallan/claude-skills

    Builds Laravel 10+ applications with Eloquent models, Sanctum authentication, Horizon queues, API resources and Livewire components, tested with Pest or PHPUnit.

    12k GitHub starsUsed in 1 repo~2.1k tokens
    Auto-check passed
  • Pandas Pro

    Jeffallan/claude-skills

    Handles pandas DataFrame work: cleaning, merging, groupby aggregation, pivots, time-series resampling and memory tuning, with checks on dtypes, shapes and nulls.

    12k GitHub starsUsed in 1 repo~1.5k tokens
    Auto-check passed
  • Apache Spark Engineer

    Jeffallan/claude-skills

    Guides writing and tuning Apache Spark jobs: DataFrame and RDD code, Spark SQL, partitioning, caching, shuffle tuning and structured streaming.

    12k GitHub starsUsed in 1 repo~1.7k tokens
    Auto-check passed

Categories

Questions about Spec Miner

What does Spec Miner do?

Reads an undocumented codebase and writes up what it does: architecture, data flows, observed behavior as EARS requirements, and open questions to confirm. The agent works from two perspectives, an architecture view of structure and data flows and a QA view of observable behavior and edge cases. It scopes the analysis, explores with Glob, Grep and Read, traces data flows and request paths, writes the observed requirements in EARS format and flags areas that need clarification.

When should I use Spec Miner?

Spec Miner fits situations like: getting up to speed on an inherited project with no documentation; documenting what an old module actually does; extracting requirements from implementation before a rewrite; onboarding to a new codebase.

How do I install Spec Miner in Claude Code?

Run `npx skills add Jeffallan/claude-skills --skill spec-miner -a claude-code`. Or copy the skill folder (skills/spec-miner in Jeffallan/claude-skills) into .claude/skills/spec-miner in your project. Claude Code loads it when a task matches its description.

How do I install Spec Miner in Codex?

Run `npx skills add Jeffallan/claude-skills --skill spec-miner -a codex`. Or copy the skill folder (skills/spec-miner in Jeffallan/claude-skills) into .agents/skills/spec-miner in your project. Codex loads it when a task matches its description.

Can I use Spec Miner in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Jeffallan/claude-skills --skill spec-miner -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/spec-miner, .gemini/skills/spec-miner, .github/skills/spec-miner and .opencode/skills/spec-miner in your project.

What does Spec Miner need to run?

SKILL.md names no scripts, command-line tools or credentials: Spec Miner is instructions for the agent only. Its frontmatter pre-approves these tools: Read, Grep, Glob.

Does Spec Miner access the network?

SKILL.md names 3 domains. As links in the text: github.com, synergetic.solutions and jeffallan.github.io. This is read from the text; nothing was executed.

Is Spec Miner safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Spec Miner use?

Spec Miner is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Spec Miner use?

About 1.2k tokens (SKILL.md is roughly 4.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.9k tokens, read only when the agent opens those files.

What are the alternatives to Spec Miner?

Skills that share tags, products or a category with Spec Miner: Project Onboarding Guide from Knowledge Graph (Egonex-AI/Understand-Anything, 86k stars), Deepwiki Rs (sopaco/deepwiki-rs, 3.1k stars), Acquire Codebase Knowledge (github/awesome-copilot, 40k stars) and Codex Proxy RS Development Guide (zyycn/codex-proxy-rs, 766 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Spec Miner?

Jeffallan (a GitHub user) maintains it in Jeffallan/claude-skills, which has 11,788 GitHub stars. The repository holds 58 skills in this directory. The repository was last updated on October 3, 2026.

Source: Jeffallan/claude-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.