code-to-speclisted
Install: claude install-skill smallnest/goal-workflow
# to-spec — Reverse-Engineer Project Specification
Analyze an existing codebase and produce a structured SPEC document that captures what the project does, how it's built, and what contracts it exposes. The output is a living specification that could be used to rebuild the project from scratch or onboard new contributors.
---
## When to Use
- You want a comprehensive understanding of an existing project
- Onboarding new team members who need a high-level overview
- Documenting a project that was built without a spec
- Comparing actual implementation against intended design
- Preparing for a rewrite or major refactor
- Auditing what a project actually does vs. what people think it does
---
## The Job
1. **Scope confirmation** — ask user what to analyze (entire repo, specific directory, or specific aspect)
2. **Deep scan** — systematically read project structure, entry points, config, tests, and core logic
3. **Synthesize** — produce a structured SPEC document
4. **Review** — present to user for feedback and iteration
5. **Save** — write final SPEC to agreed location
---
## Step 1: Scope Confirmation
Before scanning, ask the user:
```
What should I analyze?
A. Entire repository (recommended for small-medium projects)
B. Specific directory or module: [path]
C. Specific aspect only (e.g., API surface, data model, auth flow)
Depth level:
1. Overview — high-level architecture + tech stack + key features (fast, ~5 min)
2. Standard — includes API contracts, data models,