Code → PRD for Openclaw

A powerful reverse-engineering tool that transforms frontend, backend, or fullstack codebases into comprehensive, business-readable Product Requirements Documents.

alirezarezvani
v2.1.1
Mar 20, 2026
0
491
3

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install code-to-prd

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install code-to-prd using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Code → PRD?

Code → PRD is a specialized tool within the Openclaw Skills ecosystem designed for senior product analysts and technical architects. It bridges the gap between raw source code and high-level product documentation by deep-scanning repository structures to identify business logic, user interactions, and system architecture. Whether you are dealing with a legacy React frontend or a complex NestJS backend, this skill translates technical implementation into functional specifications.

The skill is built to serve a dual audience: providing stakeholders with a clear understanding of system capabilities while offering engineers and AI agents the granular detail required to reconstruct pages, endpoints, and data models accurately. By automating the extraction of routes, enums, and API dependencies, it ensures that your documentation remains the single source of truth for the entire product lifecycle.

Code → PRD Use Cases

  • Technical debt auditing: Documenting legacy systems where the original PRD is missing or outdated.
  • Onboarding: Providing new developers or product managers with a functional inventory of a complex application.
  • AI-Assisted Migration: Generating detailed specs from an old codebase to facilitate a rewrite using AI agents.
  • Competitive Analysis: Reverse-engineering public or internal repositories to understand feature sets and workflows.
  • Quality Assurance: Creating a baseline of expected behaviors for manual or automated testing suites.

How Code → PRD Works

  1. Project Global Scan: The skill identifies the framework (e.g., Next.js, Django) and maps the project structure, including routes, shared components, and global state.
  2. Inventory Building: It extracts a complete inventory of pages or API endpoints, mapping file paths to functional routes.
  3. Page-by-Page Deep Analysis: Every identified page or resource is analyzed for field inventories, interaction logic (action → response), and API dependencies.
  4. Mock vs. Real Detection: The tool distinguishes between integrated API calls and hardcoded mock data, suggesting backend specs where integrations are missing.
  5. Document Generation: A structured prd/ directory is created, containing a system-wide README, individual page markdown files, and an appendix for enums and API references.

Code → PRD Setup

To start using this feature within your Openclaw Skills environment, you can use the built-in scripts or slash commands:

# 1. Analyze the project structure
python3 scripts/codebase_analyzer.py /path/to/project -o analysis.json

# 2. Scaffold the PRD directory structure
python3 scripts/prd_scaffolder.py analysis.json -o prd/ -n "Project Name"

# 3. Alternative: Use the direct slash command
/code-to-prd /path/to/project

Code → PRD Data Schema & Taxonomy

The skill organizes generated documentation into a standardized taxonomy to ensure clarity and scannability:

Directory File / Content Purpose
prd/ README.md High-level system overview and module mapping.
prd/pages/ [01-name].md Standalone documentation for every unique UI page or resource.
prd/appendix/ enum-dictionary.md Centralized list of status codes, types, and constants.
prd/appendix/ api-inventory.md Full reference of all detected and required API endpoints.
prd/appendix/ page-relationships.md Navigation map showing inbound and outbound data flow.

Code → PRD Advanced Features

  • Multi-framework support covering React, Vue, Angular, Svelte, Next.js, NestJS, Django, and FastAPI.
  • Automatic Model Extraction for parsing Django models, NestJS entities, and Pydantic schemas.
  • i18n Integration that pulls field display names directly from translation files rather than just variable names.
  • Interactive logic mapping that describes complex state transitions and permission-based visibility rules.
  • Built-in Quality Checklist to validate the completeness and readability of the generated PRD.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*