code-to-prd

code-to-prd is a skill for Codex from bestagentkits/agency-skills. It costs 151 tokens per session (4,508 once invoked), scanned A, original, MIT.

A reverse-engineering tool that turns a frontend, backend, or full-stack codebase into a Product Requirements Document. A PRD is a plain-language specification of what a product should do, including pages, interactions, data, and interfaces.

In plain words
What is it for?
Use it to document web pages, state management, API integrations, backend models, status values, and user interactions, or to prepare a reconstruction brief for engineers or AI agents.
Why use it?
Existing software often lacks complete product documentation, making maintenance or rebuilding uncertain. This extracts the implemented routes, components, models, APIs, and user flows into one specification.

Skill for Codex

Written for Codex: agents/openai.yaml present.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is | 1 | User List | /user/list | User Mgmt | [→](./pages/01-user-mgmt-list.md) |.

Good fit Use it to document web pages, state management, API integrations, backend models, status values, and user interactions, or to prepare a reconstruction brief for engineers or AI agents.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/bestagentkits/agency-skills
agentmods
npx agentmods add skills/bestagentkits/agency-skills/code-to-prd

Made for: Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for code-to-prd

README.md
[![agentmods](https://agentmods.dev/badge/skills/bestagentkits/agency-skills/code-to-prd/github.svg)](https://agentmods.dev/skills/bestagentkits/agency-skills/code-to-prd)
Your own site
<a href="https://agentmods.dev/skills/bestagentkits/agency-skills/code-to-prd"><img src="https://agentmods.dev/badge/skills/bestagentkits/agency-skills/code-to-prd/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for code-to-prd

Your own site · 80×15
<a href="https://agentmods.dev/skills/bestagentkits/agency-skills/code-to-prd"><img src="https://agentmods.dev/badge/skills/bestagentkits/agency-skills/code-to-prd.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 151 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,508 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00151 $0.04508
Opus 5 $0.00076 $0.02254
Sonnet 5 $0.00030 $0.00902
Haiku 4.5 $0.00015 $0.00451

Measured 9d ago against content hash 7a11ba564076, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

code-to-prd scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/codebase_analyzer.py, scripts/prd_scaffolder.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/claude-skills/code-to-prd/SKILL.md · 497 lines

How it starts

The opening of the file, as written. The whole thing — 497 lines — stays where its author put it; the contents beside it link to each section on 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

Read the full file on GitHub · 497 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 497 lines · 151 tokens per session scan A 7a11ba564076

Subscribe to this mod's changes

code-to-prd is a skill published in the GitHub repository bestagentkits/agency-skills (11 stars, last pushed 2mo ago), licensed MIT. It adds 151 tokens to every session and 4,508 once invoked, about $0.0008 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

exposure-risk-quantification

FAIR-aligned exposure quantification: turns a pile of recon findings into a defensible 0-100 + A-F org risk score (Likelihood x Impact, three ownership-aware factors: exposure/threat/impact), an ownership + proof demotion cap so unproven or weakly-owned findings can't inflate the number, a $-denominated FAIR…

elementalsouls/Claude-OSINT · 235 tokens

osint-methodology

Comprehensive OSINT methodology for external red-team operations and authorized attack-surface assessments. Covers the 6-stage recon pipeline (seed → asset expansion → enrichment → exposure analysis → convergence → operator-armed active validation) with connector-resilience and stage-vs-gating discipline, asset-graph…

elementalsouls/Claude-OSINT · 150 tokens

bencium-impact-designer

Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics. Based on Anthropic's Frontend Designer Skill.

bencium/bencium-marketplace · 56 tokens

file-processing

Process and analyze CSV, JSON, and text files with data transformation, cleaning, analysis, and visualization capabilities.

aws-samples/sample-strands-agents-agentskills · 24 tokens

design-audit

Premium UI/UX design audit and refinement skill. Conducts systematic visual audits of existing apps and produces phased, implementation-ready design plans. Use this skill whenever the user asks to audit a UI, improve an app's visual design, make an interface feel more polished or premium, review design consistency…

bencium/bencium-marketplace · 140 tokens

bencium-code-conventions

Bence's code style, tech stack, and workflow conventions.

bencium/bencium-marketplace · 19 tokens