All skills
jeffallan avatar

/spec-miner

@efebc44
by jeffallanjeffallan/claude-skills12k stars
1,124

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.

Use this Skill: https://skilld.dev/gh/jeffallan/claude-skills/spec-miner

This session only. Nothing lands on disk.

referencesears-format.md

≈459 tokens on demand. Your agent reads this file only when SKILL.md points to it.

EARS Format

EARS Syntax

Easy Approach to Requirements Syntax for clear, unambiguous requirements.

Basic Patterns

Ubiquitous (Always)

The system shall [action].

Event-Driven

When [trigger], the system shall [action].

State-Driven

While [state], the system shall [action].

Conditional

While [state], when [trigger], the system shall [action].

Optional

Where [feature enabled], the system shall [action].

Example Observations

Authentication

OBS-AUTH-001: Login Flow

While credentials are valid, when POST /auth/login is called,
the system shall return JWT access token (15m) and refresh token (7d).

OBS-AUTH-002: Token Refresh

While refresh token is valid, when POST /auth/refresh is called,
the system shall issue new access token.

OBS-AUTH-003: Invalid Token

When expired or invalid token is provided,
the system shall return 401 Unauthorized.

User Management

OBS-USER-001: User Creation

While email is unique, when POST /users is called with valid data,
the system shall create user with bcrypt-hashed password (rounds=12).

OBS-USER-002: Email Validation

When email format is invalid,
the system shall return 400 with error message "Invalid email format".

Input Validation

OBS-INPUT-001: Required Fields

When required fields are missing,
the system shall return 400 with field-specific error messages.

Quick Reference

Type Pattern Example Trigger
Ubiquitous shall [action] Always true
Event When [X], shall On button click
State While [X], shall While logged in
Conditional While [X], when [Y], shall While admin, when delete
Optional Where [X], shall If feature enabled

Source: SKILL.md on GitHub

1 alert16d5 checks · Risk CRITICAL
  • Gen Agent Trust Hub16d

    The skill facilitates reverse-engineering of codebases but directs the agent to access sensitive credentials in .env files and environment configurations. Security scanners have flagged the skill file itself and its external documentation links as potentially malicious.

  • Socket16d

    No alerts

  • Snyk16d

    Risk: LOW · No issues

  • Runlayer6mo

    1/5 files flagged

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at efebc44. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 months ago.

Steadyupdated 5 months ago
What it can do
Reads files Runs commands
All 4 allowed tools
ReadGrepGlobBash
Other metadata
metadata
{
  "author": "https://github.com/Jeffallan",
  "version": "1.1.0",
  "domain": "workflow",
  "triggers": "reverse engineer, legacy code, code analysis, undocumented, understand codebase, existing system",
  "role": "specialist",
  "scope": "review",
  "output-format": "document",
  "related-skills": "feature-forge, fullstack-guardian, architecture-designer"
}
  • Documentation
  • reverse-engineering
  • legacy-code
  • code-analysis
  • codebase-exploration
  • requirements-extraction
  • architecture
  • undocumented-systems

README badge

README badge for jeffallan/claude-skills/spec-miner

Extracts specifications from undocumented or legacy codebases by systematically exploring code structure, tracing data flows, and documenting observed behavior in EARS format. Use this skill when onboarding to inherited projects, creating documentation from implementation, or understanding systems with no written specification.

Generated from the current SKILL.md.

What tools can this skill use to explore a codebase?
The skill uses Read, Grep, Glob, and Bash to map file structure, locate patterns, trace data flows, and extract observable behaviors from source code.
Does this skill generate documentation in a specific format?
Yes. It documents observed requirements using EARS (Easy Approach to Requirements Syntax) format, which structures behavior as ubiquitous, event-driven, state-driven, or optional rules.
Can this skill work on any codebase or language?
The skill is language-agnostic and designed for any codebase, but examples in the documentation focus on Python (Flask, Django) and Express. Adjustment of Glob and Grep patterns may be needed for other languages or frameworks.
Does this skill make assumptions or only report what it finds in code?
The skill must ground all observations in actual code evidence and distinguish between observed facts and inferences. It documents uncertainties in a dedicated section rather than making unsupported assumptions.
What does the skill output?
It produces a specification document saved as `specs/{project_name}_reverse_spec.md`, including technology stack, module structure, observed requirements, non-functional observations, inferred acceptance criteria, uncertainties, and recommendations.

Generated from the current SKILL.md. These answers refresh after source changes.