Skip to main content
plugin

code-to-prd — Claude Code plugin: what it does, how to install

This plugin analyzes a codebase and turns its structure into a PRD covering pages, APIs, and relationships. Use it to document an existing project from its code.

Install into Claude Code · Plugin marketplace All methods and platforms ↓
/plugin marketplace add alirezarezvani/claude-skills
/plugin install code-to-prd@claude-code-skills
Open on GitHub

What code-to-prd does

The /code-to-prd command analyzes a project and builds a PRD directory. codebase_analyzer.py extracts routes, APIs, models, and enums; prd_scaffolder.py turns that analysis into documents such as a system overview, page or endpoint descriptions, an API inventory, and page relationships.

It supports frontend and backend frameworks including React, Vue, Angular, Next.js, Django, and FastAPI. The package also includes framework-pattern references and a PRD quality checklist. Both scripts use Python’s standard library, so there is no pip install step. Running the scripts separately requires Python 3 and a project path.

What it helps with

  • draft a PRD from an existing codebase
  • document project routes and APIs
  • list models and enum values
  • map relationships between pages

Example prompts for the agent

  • Create a PRD for the project at /path/to/project.
  • Analyze this project’s routes, APIs, and models, then generate its PRD.
  • Generate a PRD for this project named My App.

How to install code-to-prd

Plugin marketplace

/plugin marketplace add alirezarezvani/claude-skills
/plugin install code-to-prd@claude-code-skills

Step by step, with commands for each platform: Claude Code plugins: marketplaces, installing, and building your own

Questions about code-to-prd

How do I install code-to-prd in Claude Code?

Run /plugin marketplace add alirezarezvani/claude-skills, then /plugin install code-to-prd@claude-code-skills.

What does code-to-prd do?

It analyzes a codebase and generates PRD documents from its routes, APIs, models, and enums.

Does code-to-prd need extra Python packages?

No. Its scripts use Python’s standard library; running them step by step requires Python 3.

Source text

code-to-prd · MIT
# Code → PRD

Reverse-engineer any codebase into a complete Product Requirements Document (PRD).

## Quick Start

```bash
# One command
/code-to-prd /path/to/project

# Or step by step
python3 scripts/codebase_analyzer.py /path/to/project -o analysis.json
python3 scripts/prd_scaffolder.py analysis.json -o prd/ -n "My App"
```

## Supported Frameworks

| Stack | Frameworks |
|-------|-----------|
| Frontend | React, Vue, Angular, Svelte, Next.js, Nuxt, SvelteKit, Remix |
| Backend | NestJS, Express, Django, DRF, FastAPI, Flask |
| Fullstack | Next.js (pages + API), Nuxt (pages + server), Django (views + templates) |

## What It Generates

```
prd/
├── README.md                  # System overview
├── pages/
│   ├── 01-user-mgmt-list.md   # Per-page/endpoint docs
│   └── ...
└── appendix/
    ├── enum-dictionary.md      # All enums and status codes
    ├── api-inventory.md        # Complete API reference
    └── page-relationships.md   # Navigation and data coupling
```

## Scripts

| Script | Purpose |
|--------|---------|
| `codebase_analyzer.py` | Scan codebase → extract routes, APIs, models, enums |
| `prd_scaffolder.py` | Generate PRD directory skeleton from analysis JSON |

Both are stdlib-only — no pip install needed. Run `--help` for full usage.

## References

- `references/framework-patterns.md` — Route, state, API, form, and model patterns per framework
- `references/prd-quality-checklist.md` — Validation checklist for completeness and accuracy

## Attribution

Inspired by [code-to-prd](https://github.com/lihanglogan/code-to-prd) by [@lihanglogan](https://github.com/lihanglogan).

## License

MIT

© Alireza Rezvani · MIT · alirezarezvani/claude-skills

Similar plugins

All plugins for Writing and docs →

From the same set463

The whole set →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor