Help us improve
Share bugs, ideas, or general feedback.
Analyzes a codebase and generates a pure requirements specification (SPEC.md). Use when asked to "extract requirements", "create a spec", "generate a blueprint", or "distill this project".
npx claudepluginhub tsilva/claudeskillz --plugin project-spec-extractorHow this skill is triggered — by the user, by Claude, or both
Slash command
/project-spec-extractor:project-spec-extractorThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Extract a pure requirements specification from a codebase — capturing *what* the project does without *how* it's built. The output SPEC.md serves as a portable blueprint: an agent can rebuild the project from scratch, resulting in simpler, cleaner code with the same features.
Reverse-engineers specifications from legacy, undocumented, or inherited codebases. Maps dependencies, generates API docs, identifies business logic, and produces architecture documentation.
Creates technical specifications interactively by gathering requirements, exploring codebases, running planning interviews, drafting with Mermaid diagrams, expert review, and iteration. For new features or projects needing architecture and decisions.
Generates structured feature specifications with demoable units, functional requirements, and proof artifacts. Use when defining what to build before writing code.
Share bugs, ideas, or general feedback.
Extract a pure requirements specification from a codebase — capturing what the project does without how it's built. The output SPEC.md serves as a portable blueprint: an agent can rebuild the project from scratch, resulting in simpler, cleaner code with the same features.
| Mode | Flag | Behavior |
|---|---|---|
| Tech-preserving (default) | (none) | Section 6 lists specific stack: languages, frameworks, databases, services by name |
| Tech-agnostic | --tech-agnostic | Section 6 describes abstract capabilities: "persistent relational storage", "server-side rendering framework" |
Execute these four phases sequentially. Read the directory tree first, then selectively read representative files — do NOT read every file.
Purpose: Establish what the project IS.
Read: README, CLAUDE.md, package manifests (package.json, pyproject.toml, Cargo.toml, go.mod), .env.example, docker-compose.yml, config files.
Extract:
Purpose: Discover what the project DOES.
Read by project type:
Method: Read directory tree first to understand structure, then read representative files from each functional area. Group features by user-facing domain, not code organization.
Purpose: Map data entities and external dependencies.
Read: Schema/migration files, ORM models/entities, .env.example for third-party services, auth middleware, API client configurations.
Extract:
Purpose: Confirm completeness by cross-referencing against tests.
Read: Test file names and descriptions (not test implementation), error types/messages, configuration keys.
Verify:
Write the specification using exactly these 9 sections. Scale the document to project complexity: ~1 page for a CLI tool, 3-5 pages for a full-stack app. Omit sections that don't apply (e.g., skip Non-Functional Requirements for simple projects).
# SPEC.md — {Project Name}
## 1. Purpose
{1-3 sentences: what the project does, who it's for, why it exists.}
## 2. User-Facing Features
{Group by domain. Describe behaviors only — what users can do, not how it works internally.}
### {Domain Group}
- {Feature behavior description}
- {Feature behavior description}
## 3. User Flows
{Numbered steps from the user's perspective. Primary flows only — trust the rebuilding agent for edge cases.}
### {Flow Name}
1. {User action}
2. {System response}
3. {Next step}
## 4. Data Entities
| Entity | Description | Relationships |
|--------|-------------|---------------|
| {Name} | {What it represents} | {How it relates to other entities} |
## 5. External Integrations
| Service | Purpose | Required |
|---------|---------|----------|
| {Name} | {What it's used for} | Yes/No |
## 6. Technology Constraints
{Tech-preserving: list specific stack by name.}
{Tech-agnostic: describe abstract capabilities needed.}
## 7. Configuration & Environment
| Key | Purpose | Required |
|-----|---------|----------|
| {KEY_NAME} | {What it controls} | Yes/No |
## 8. Non-Functional Requirements
{Only include if relevant. Examples: performance targets, security requirements, accessibility standards.}
## 9. Acceptance Criteria
{Checkbox list of testable pass/fail behaviors. Every feature and integration should have at least one criterion.}
- [ ] {Testable behavior statement}
- [ ] {Testable behavior statement}
Follow these rules strictly when drafting SPEC.md:
Before saving SPEC.md, verify every item:
uv run shared/detect_project.py --path "$(pwd)"
$ARGUMENTS for --tech-agnostic flag and optional path