Code → PRD: Reverse-Engineer Any Codebase into Product Requirements

This skill reverse-engineers any frontend, backend, or fullstack codebase into a complete Product Requirements Document (PRD). It 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.

✨ What it does

  • 3-phase workflow: global scan, page-by-page analysis, structured document generation.
  • Supports frontend frameworks (React, Vue, Angular, Svelte, Next.js, Nuxt) and backend frameworks (NestJS, Django, Expres
  • Detects mock data vs real API integrations.
  • Extracts enums, constants, and database models.
  • Generates per-page Markdown docs, an enum dictionary, page relationships, and an API inventory.
  • Provides automation scripts for scanning and scaffolding.

🎯 When to use it

  • When you need to generate a PRD from an existing codebase.
  • When you want to reverse-engineer requirements from code.
  • When you need to document page logic, fields, and interactions for a frontend or fullstack app.
  • When you need to document API endpoints and backend routes.
  • When you want to create a functional inventory or extract product specs from code.

🚀 How to use

Trigger: /code-to-prd

Trigger the skill with the slash command /code-to-prd followed by a path to the codebase, or ask in natural language to 'generate a PRD from this code' or 'reverse-engineer requirements from code'. The skill expects a file path to a project directory. Example prompts:

/code-to-prd ./src
Generate a PRD from the codebase in /path/to/project

📄 Output: A prd/ directory containing a README.md, per-page Markdown documents, and appendix files (enum dictionary, page relationships, API inventory).

📦 Add this skill to Claude Code

# 1. Get the skills repo
git clone --depth 1 https://github.com/alirezarezvani/claude-skills /tmp/claude-skills

# 2. Copy this skill into your project (or ~/.claude/skills for all projects)
mkdir -p .claude/skills
cp -r /tmp/claude-skills/product-team/code-to-prd/skills/code-to-prd .claude/skills/code-to-prd

Skill source: product-team/code-to-prd/skills/code-to-prd/SKILL.md

⚠️ Good to know

The skill requires a codebase with a supported framework; it may not handle all edge cases or undocumented code perfectly.

❓ FAQ

What frameworks are supported?

Frontend: React, Vue, Angular, Svelte, Next.js, Nuxt, SvelteKit, Remix, Astro. Backend: NestJS, Express, Fastify, Django, Django REST Framework, FastAPI, Flask.

How does the skill handle mock data?

It detects mock data via signals like setTimeout, Promise.resolve, or mock files, and then reverse-engineers the required API spec from page functionality.

What output does the skill produce?

It generates a prd/ directory with a README.md, per-page docs, and appendix files including an enum dictionary, page relationships, and API inventory.

🤖 Overview, features, install steps and FAQ were generated from the project's SKILL.md on Sep 4, 2026. Always check the original source before running commands.