spec-miner — скилл для Claude Code: анализ кода без документации
Скилл для реверс-инжиниринга кодовых баз. Извлекает спецификации из существующего кода, строит схемы зависимостей и создаёт документацию для наследованных проектов и систем без документов.
npx skills add Jeffallan/claude-skills --skill spec-miner -a claude-codeЧто делает spec-miner
spec-miner работает в двух режимах: анализирует архитектуру системы и отслеживает наблюдаемое поведение код через инструменты Read, Grep и Glob. Скилл исследует структуру проекта, прослеживает потоки данных, затем документирует найденное в формате EARS (Easy Approach to Requirements Syntax). Каждое наблюдение привязано к коду с указанием файлов и строк.
Пригодится при онбординге на новый проект, планировании расширений существующих функций и извлечении требований из реализации. Скилл требует внимательного изучения — пропускает допущения без доказательств в коде и помечает неясные места отдельно. Полезен для унаследованных систем, где документация устарела или вообще отсутствует.
Какие задачи решает
- восстановить требования из кода наследованного проекта
- создать документацию для системы без specs
- разобраться, как работают чужие функции и модули
- выявить скрытую бизнес-логику в старом коде
- спланировать изменения, поняв текущую архитектуру
Примеры запросов агенту
- Проанализируй эту кодовую базу, обнаружь API и ключевую бизнес-логику
- Создай спецификацию для наследованного проекта, используя format EARS
- Отследи потоки данных через приложение и нарисуй диаграмму
Как установить spec-miner
1Через Skills CLI (Vercel)
npx skills add Jeffallan/claude-skills --skill spec-miner -a claude-code2Вручную: положить файлы
~/.claude/skills/spec-miner/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/spec-miner/
1Через Skills CLI (Vercel)
npx skills add Jeffallan/claude-skills --skill spec-miner -a codex2Вручную: положить файлы
.agents/skills/spec-miner/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add Jeffallan/claude-skills --skill spec-miner -a cursor2Вручную: положить файлы
.cursor/skills/spec-miner/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install Jeffallan/claude-skills spec-miner2Вручную: положить файлы
.github/skills/spec-miner/SKILL.md1Через Skills CLI (Vercel)
npx skills add Jeffallan/claude-skills --skill spec-miner -a gemini-cli2Командой платформы
gemini skills install https://github.com/Jeffallan/claude-skills --path skills/spec-minerВручную: положить файлы
.devin/skills/spec-miner/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add Jeffallan/claude-skills --skill spec-miner -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
Из того же набора61
Весь набор →Похожие
Вопросы о spec-miner
Как установить spec-miner в Claude Code?
Запусти npx skills add Jeffallan/claude-skills --skill spec-miner -a claude-code. Скилл добавится в ~/.claude/skills/spec-miner/SKILL.md.
Что делает spec-miner?
Анализирует кодовую базу, извлекает спецификации, строит схемы зависимостей и создаёт документацию в формате EARS. Используется для понимания наследованных систем и проектов без документов.
Какие инструменты использует скилл?
Read для чтения файлов, Grep для поиска паттернов, Glob для сканирования структуры проекта.
Исходный текст
SKILL.md · MIT
---
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."
license: MIT
allowed-tools: Read, Grep, Glob
metadata:
author: https://github.com/Jeffallan
company: https://synergetic.solutions
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
---
# 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:
| Type | Pattern | Example |
|------|---------|---------|
> See `references/ears-format.md` for the complete EARS reference.
## Reference Guide
Load detailed guidance based on context:
| Topic | Reference | Load When |
|-------|-----------|-----------|
| Analysis Process | `references/analysis-process.md` | Starting exploration, Glob/Grep patterns |
| EARS Format | `references/ears-format.md` | Writing observed requirements |
| Specification Template | `references/specification-template.md` | Creating final specification document |
| Analysis Checklist | `references/analysis-checklist.md` | Ensuring 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](https://github.com/jeffallan), Principal Consultant at [Synergetic Solutions](https://synergetic.solutions)
[Documentation](https://jeffallan.github.io/claude-skills/skills/workflow/spec-miner/)
© https://github.com/Jeffallan · MIT · Jeffallan/claude-skills