code-to-prd

code-to-prd is a command for Claude Code from ricneves-ai/flowgrammers-skills. It costs 32 tokens per session (740 once invoked), scanned A, original, MIT.

A command that examines a frontend codebase and turns what it finds into a product requirements document, or PRD. A PRD is a written description of a product’s pages, behavior, data, and connections.

In plain words
What is it for?
Use it to inventory pages, routes, APIs, fields, enums, interactions, dependencies, and relationships between screens.
Why use it?
It helps document an existing interface when the original requirements are missing or incomplete. This reduces the need to reconstruct the product manually from scattered files.

Command for Claude Code

Written for Claude Code: a Claude Code command (commands/*.md).

Good fit Use it to inventory pages, routes, APIs, fields, enums, interactions, dependencies, and relationships between screens.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/ricneves-ai/flowgrammers-skills/code-to-prd
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/ricneves-ai/flowgrammers-skills

Made for: Claude Code.

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/commands/ricneves-ai/flowgrammers-skills/code-to-prd/github.svg)](https://agentmods.dev/commands/ricneves-ai/flowgrammers-skills/code-to-prd)
Your own site
<a href="https://agentmods.dev/commands/ricneves-ai/flowgrammers-skills/code-to-prd"><img src="https://agentmods.dev/badge/commands/ricneves-ai/flowgrammers-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/commands/ricneves-ai/flowgrammers-skills/code-to-prd"><img src="https://agentmods.dev/badge/commands/ricneves-ai/flowgrammers-skills/code-to-prd.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 32 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 740 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.00032 $0.00740
Opus 5 $0.00016 $0.00370
Sonnet 5 $0.00006 $0.00148
Haiku 4.5 $0.00003 $0.00074

Measured 7d ago against content hash 576e219b6251, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, 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 7d ago.

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.

commands/code-to-prd.md · 79 lines

How it starts

The opening of the file, as written. The whole thing — 79 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/code-to-prd

Faz engenharia reversa de um codebase frontend e gera um Documento de Requisitos de Produto (PRD) completo.

Uso

/code-to-prd                    # Analisa o projeto atual
/code-to-prd ./src              # Analisa um diretório específico
/code-to-prd /caminho/projeto   # Analisa um projeto externo

O que faz

  1. Varredura — Executa codebase_analyzer.py para detectar framework, rotas, APIs, enums e estrutura do projeto
  2. Esqueleto — Executa prd_scaffolder.py para criar o diretório prd/ com README.md, stubs por página e arquivos de apêndice
  3. Análise — Percorre cada página seguindo o fluxo da Fase 2: campos, interações, dependências de API, relacionamentos entre páginas
  4. Geração — Produz o PRD final com todas as páginas, dicionário de enums, inventário de APIs e mapa de relacionamentos

Etapas

Etapa 1: Analisar

Determina o caminho do projeto (padrão: diretório atual). Executa o analisador:

python3 {skill_path}/scripts/codebase_analyzer.py {project_path} -o .code-to-prd-analysis.json

Exibe um resumo: framework, contagem de páginas, APIs, enums.

Etapa 2: Criar Esqueleto

Gera a estrutura de diretórios do PRD:

python3 {skill_path}/scripts/prd_scaffolder.py .code-to-prd-analysis.json -o prd/

Etapa 3: Preencher

Para cada página no inventário, segue o fluxo da Fase 2 do SKILL.md:

  • Lê os arquivos de componentes da página
  • Documenta campos, interações, dependências de API e relacionamentos
  • Preenche o stub correspondente em prd/pages/

Para projetos grandes (>15 páginas), trabalha em lotes de 3-5 páginas e pede confirmação após cada lote.

Etapa 4: Finalizar

Completa os arquivos de apêndice:

  • prd/appendix/enum-dictionary.md — todos os enums e códigos de status encontrados
  • prd/appendix/api-inventory.md — referência consolidada de APIs
  • prd/appendix/page-relationships.md — mapa de navegação e acoplamento de dados

Remove o arquivo de análise temporário:

rm .code-to-prd-analysis.json

Read the full file on GitHub · 79 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. 7d ago First seen · 79 lines · 0 tokens per session scan A 576e219b6251

Subscribe to this mod's changes

code-to-prd is a command published in the GitHub repository ricneves-ai/flowgrammers-skills (111 stars, last pushed 3mo ago), licensed MIT. It adds 32 tokens to every session and 740 once invoked, about $0.0002 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.