code-to-spec
Reverse-engineer a SPEC document from an existing project. Analyzes code, config, tests, and structure to produce a comprehensive specification. Triggers on: code-to-spec, reverse spec, generate spec, 逆向规格, 生成规格文档, 生成设计文档, 生成设计方案, extract spec, document this project, what does this project do.
npx skills add smallnest/goal-workflow --skill code-to-spec --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# 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 (reco
- When to Use
- The Job
- Step 1: Scope Confirmation
- Step 2: Deep Scan
- 2.1 Project Identity
- 2.2 Architecture
- 2.3 Tech Stack
- 2.4 Features & Behavior
- 2.5 Data Model
- 2.6 API Surface
- 2.7 Configuration & Environment
- 2.8 External Dependencies
- 2.9 Testing & Quality
- 2.10 Deployment & Operations
What does the code-to-spec skill do?
Reverse-engineer a SPEC document from an existing project. Analyzes code, config, tests, and structure to produce a comprehensive specification. Triggers on: code-to-spec, reverse spec, generate spec, 逆向规格, 生成规格文档, 生成设计文档, 生成设计方案, extract spec, document this project, what does this project do.
How do I install it?
Run `npx skills add smallnest/goal-workflow --skill code-to-spec --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From smallnest/goal-workflow, a repository with 199 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
