Skip to content
Skillpedia
Tasks & projects29k Β· #9688

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.md

Copy 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

Use this skill to help me: https://github.com/alirezarezvani/claude-skills/blob/main/product-team/code-to-prd/skills/code-to-prd/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute β†’

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.py for scanning, prd_scaffolder.py for 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

  1. Product managers / business stakeholders β€” need to understand what the system does, not how
  2. 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.

repo: alirezarezvani/claude-skills

Popularity

GitHub stars
29k
Ranking position
#9688
License
MIT
Updated
11/2/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills