code-to-prd
What it does
This skill reads an existing app's code and writes a product requirements document in plain business language. It is for product managers and teams who have a working app but no written spec.
When to use it
- βWhen an existing app has no written product requirements document.
- βWhen you need to document every page, field and endpoint of a codebase.
- βWhen you want a spec detailed enough for engineers or an AI agent to rebuild the app.
Skill link
https://github.com/alirezarezvani/claude-skills/blob/main/product-team/code-to-prd/skills/code-to-prd/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βRead our codebase and write a product requirements document describing every page and API endpoint.β
5 new skills a week. 1 minute to read.
How it works
It scans the project to map routes, components, models and endpoints, then scaffolds the document and fills it in, separating real integrations from mock data.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Name
Code β PRD
Description
Reverse-engineer any frontend, backend, or fullstack codebase into a complete Product Requirements Document (PRD). Analyzes routes, components, models, APIs, and user interactions to produce business-readable documentation detailed enough for engineers or AI agents to fully reconstruct every page and endpoint.
Code β PRD: Reverse-Engineer Any Codebase into Product Requirements
Features
- 3-phase workflow: global scan β page-by-page analysis β structured document generation
- Frontend support: React, Vue, Angular, Svelte, Next.js (App + Pages Router), Nuxt, SvelteKit, Remix
- Backend support: NestJS, Express, Django, Django REST Framework, FastAPI, Flask
- Fullstack support: Combined frontend + backend analysis with unified PRD output
- Mock detection: Automatically distinguishes real API integrations from mock/fixture data
- Enum extraction: Exhaustively lists all status codes, type mappings, and constants
- Model extraction: Parses Django models, NestJS entities, Pydantic schemas
- Automation scripts:
codebase_analyzer.pyfor scanning,prd_scaffolder.pyfor directory generation - Quality checklist: Validation checklist for completeness, accuracy, readability
Usage
# Analyze a project and generate PRD skeleton
python3 scripts/codebase_analyzer.py /path/to/project -o analysis.json
python3 scripts/prd_scaffolder.py analysis.json -o prd/ -n "My App"
# Or use the slash command
/code-to-prd /path/to/project
Examples
Frontend (React)
/code-to-prd ./src
# β Scans components, routes, API calls, state management
# β Generates prd/ with per-page docs, enum dictionary, API inventory
Backend (Django)
/code-to-prd ./myproject
# β Detects Django via manage.py, scans urls.py, views.py, models.py
# β Documents endpoints, model schemas, admin config, permissions
Fullstack (Next.js)
/code-to-prd .
# β Analyzes both app/ pages and api/ routes
# β Generates unified PRD covering UI pages and API endpoints
Role
You are a senior product analyst and technical architect. Your job is to read a frontend codebase, understand every page's business purpose, and produce a complete PRD in product-manager-friendly language.
Dual Audience
- Product managers / business stakeholders β need to understand what the system does, not how
- Engineers / AI agents β need enough detail to fully reconstruct every page's fields, interactions, and relationships
Your document must describe functionality in non-technical language while omitting zero business details.
Supported Stacks
| Stack | Frameworks |
|---|---|
| Frontend | React, Vue, Angular, Svelte, Next.js (App/Pages Router), Nuxt, SvelteKit, Remix, Astro |
| Backend | NestJS, Express, Fastify, Django, Django REST Framework, FastAPI, Flask |
| Fullstack | Next.js (API routes + pages), Nuxt (server/ + pages/), Django (views + templates) |
For backend-only projects, the "page" concept maps to API resource groups or admin views. The same 3-phase workflow applies β routes become endpoints, components become controllers/views, and interactions become request/response flows.
Workflow
Phase 1 β Project Global Scan
Build global context before diving into pages.
1. Identify Project Structure
Scan the root directory and understand organization:
Frontend directories:
- Pages/routes (pages/, views/, routes/, app/, src/pages/)
- Components (components/, modules/)
- Route config (router.ts, routes.ts, App.tsx route definitions)
- API/service layer (services/, api/, requests/)
- State management (store/, models/, context/)
- i18n files (locales/, i18n/) β field display names often live here
Backend directories (NestJS):
- Modules (src/modules/, src/*.module.ts)
- Controllers (*.controller.ts) β route handlers
- Services (*.service.ts) β business logic
- DTOs (dto/, *.dto.ts) β request/response shapes
- Entities (entities/, *.entity.ts) β database models
- Guards/pipes/interceptors β auth, validation, transformation
Backend directories (Django):
- Apps (*/apps.py, */views.py, */models.py, */urls.py)
- URL config (urls.py, */urls.py)
- Views (views.py, viewsets.py) β route handlers
- Models (models.py) β database schema
- Serializers (serializers.py) β request/response shapes
- Forms (forms.py) β validation and field definitions
- Templates (templates/) β serv
FAQ
Which frameworks does it support?
It supports common frontend frameworks such as React, Vue and Next.js, and backend frameworks such as NestJS, Express, Django and FastAPI.
Can it tell real data from mock data?
Yes, it tries to tell real API integrations apart from mock or fixture data.
Does the output need review?
Yes, the skill includes a checklist for completeness and accuracy that you should go through.
Details
Original description by the author
Use when asked to write a PRD or product spec from an existing codebase (reverse-engineer requirements, document pages, fields, routes and endpoints). Maps the code with codebase_analyzer.py and scaffolds the PRD with prd_scaffolder.py.
Popularity
- GitHub stars
- 29k
- Ranking position
- #9688
- License
- MIT
- Updated
- 11/2/2026
Comments
- β¦
More skills from this repository
agent-launcher-orchestrator
29kHelps your agent plan, build, test and schedule a Claude managed agent in your own account, step by step, starting from one clear goal.
grade-iterate
29kLets your agent grade a managed AI agent's work against a rubric and improve it in a fixed number of rounds, so it never loops forever.
interview
29kLets your agent interview you about an AI agent idea and turn your answers into a simple build plan before anything is launched.
run-without-you
29kHelps your agent set up a managed AI agent to run on a schedule or when an event happens, with the cron timing checked before launch.
Similar skills
knowledge-capture
394kTeaches your agent to save decisions, preferences, and key facts to your Knowledge vault as short notes with source attribution.
knowledge-claim-consolidation
394kHelps your agent tidy a Knowledge vault by merging duplicate claims, moving them to the right subject pages, and retiring outdated ones.
knowledge-correct
394kLets your agent fix or withdraw a specific saved Knowledge claim or page at your request, keeping a record of what changed.