Agent skill · Documentation

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.

smallnestgithub.com/smallnestGitHub ↗
claude-codecodexMIT
Install
npx skills add smallnest/goal-workflow --skill code-to-spec --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 10 KB
Bundled scripts: none
Path: skills/code-to-spec/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 199
Language: HTML

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# 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

What's inside
Steps it walks through
  1. When to Use
  2. The Job
  3. Step 1: Scope Confirmation
  4. Step 2: Deep Scan
  5. 2.1 Project Identity
  6. 2.2 Architecture
  7. 2.3 Tech Stack
  8. 2.4 Features & Behavior
  9. 2.5 Data Model
  10. 2.6 API Surface
  11. 2.7 Configuration & Environment
  12. 2.8 External Dependencies
  13. 2.9 Testing & Quality
  14. 2.10 Deployment & Operations
More from goal-workflow
All skills →
About this skill
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.

Keep going