
Code To Prd
Scan an existing app repo and turn detected routes, APIs, dependencies, and structure into a structured PRD-style artifact for solo builders onboarding or rescoping a live product.
Overview
Code-to-prd is an agent skill most often used in Validate (also Build, Idea) that scans a codebase and produces a structured PRD-oriented inventory of routes, APIs, stack, and layout.
Install
npx skills add https://github.com/alirezarezvani/claude-skills --skill code-to-prdWhat is this skill?
- Emits structured JSON for project root, framework detection, and key dependency versions
- Maps frontend pages and backend API routes with source file paths
- Summarizes repo structure totals (files, components/modules, route and API dirs)
- Supports fullstack detection (e.g. Next.js app router plus API routes)
- Useful baseline for gap analysis before rewrite or feature planning
- Example scan output includes total_files, route count, and split frontend_pages vs backend_endpoints
- Detects stack_type such as fullstack with named framework versions in key_dependencies
Adoption & trust: 548 installs on skills.sh; 17.5k GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
You inherited or forgot the real surface area of your app and need a fast, accurate map of pages and APIs before you can scope the next release.
Who is it for?
Solo builders documenting a Next/React or similar fullstack repo before validation conversations or agent-driven refactors.
Skip if: Greenfield ideas with no repository yet, or teams that need legal/compliance narrative without tying claims to scanned code.
When should I use this skill?
You have a running codebase and need a structured PRD-style snapshot of routes, APIs, and project layout.
What do I get? / Deliverables
You get a structured project and route report you can paste into specs, onboarding docs, or agent prompts for the next planning or implementation pass.
- Structured JSON project, structure, routes, and endpoints report
- Framework and dependency version summary for spec handoff
Recommended Skills
Journey fit
Spans multiple journey phases - primary shelf plus alternate fits below.
Canonical shelf is Validate because the primary job is proving and documenting what the product already is before you change roadmap or pitch investors. Scope subphase fits reverse-engineering file counts, pages, and endpoints into an explicit product surface area definition.
Where it fits
Produce a route and API inventory before committing to a v2 rewrite scope.
Seed onboarding docs with detected frameworks, dependencies, and page list.
Compare your shipped surface area against a competitor checklist from a prior audit.
How it compares
Use instead of manually grepping the repo or asking the agent to hallucinate a feature list from memory.
Common Questions / FAQ
Who is code-to-prd for?
Indie and solo builders who ship with AI coding agents and need an evidence-based product map from an existing repository.
When should I use code-to-prd?
During validate scope work before a rewrite, during build docs/pm when onboarding collaborators, or during idea research when comparing what you built versus competitor offerings.
Is code-to-prd safe to install?
Treat it like any community skill: review the Security Audits panel on this Prism page and limit what paths or secrets your agent can read when scanning the repo.
SKILL.md
READMESKILL.md - Code To Prd
{ "project": { "root": "/path/to/my-app", "name": "my-app", "framework": "next", "detected_frameworks": ["next", "react"], "key_dependencies": { "next": "14.1.0", "react": "18.2.0", "tailwindcss": "3.4.1", "axios": "1.6.5", "@tanstack/react-query": "5.17.0" }, "stack_type": "fullstack" }, "structure": { "total_files": 87, "components": { "components": 42, "modules": 35 }, "route_dirs": ["/path/to/my-app/app"], "api_dirs": ["/path/to/my-app/app/api"], "state_dirs": ["/path/to/my-app/src/store"], "i18n_dirs": [], "controller_dirs": [], "model_dirs": [], "dto_dirs": [] }, "routes": { "count": 8, "frontend_pages": [ {"path": "/", "source": "app/page.tsx", "filesystem": true}, {"path": "/dashboard", "source": "app/dashboard/page.tsx", "filesystem": true}, {"path": "/users", "source": "app/users/page.tsx", "filesystem": true}, {"path": "/users/:id", "source": "app/users/[id]/page.tsx", "filesystem": true}, {"path": "/settings", "source": "app/settings/page.tsx", "filesystem": true} ], "backend_endpoints": [ {"path": "/api/users", "method": "GET", "source": "app/api/users/route.ts", "type": "backend"}, {"path": "/api/users", "method": "POST", "source": "app/api/users/route.ts", "type": "backend"}, {"path": "/api/users/:id", "method": "GET", "source": "app/api/users/[id]/route.ts", "type": "backend"} ], "pages": [] }, "apis": { "total": 5, "integrated": 4, "mock": 1, "endpoints": [ {"path": "/api/users", "method": "GET", "source": "services/user.ts", "integrated": true, "mock_detected": false}, {"path": "/api/users", "method": "POST", "source": "services/user.ts", "integrated": true, "mock_detected": false}, {"path": "/api/users/:id", "method": "GET", "source": "services/user.ts", "integrated": true, "mock_detected": false}, {"path": "/api/users/:id", "method": "PUT", "source": "services/user.ts", "integrated": true, "mock_detected": false}, {"path": "/api/dashboard/stats", "method": "GET", "source": "services/dashboard.ts", "integrated": false, "mock_detected": true} ] }, "enums": { "count": 2, "definitions": [ {"name": "UserRole", "type": "enum", "values": {"ADMIN": "admin", "USER": "user", "MANAGER": "manager"}, "source": "types/user.ts"}, {"name": "STATUS_MAP", "type": "constant_map", "values": {"active": "Active", "inactive": "Inactive", "suspended": "Suspended"}, "source": "constants/status.ts"} ] }, "models": { "count": 0, "definitions": [] }, "summary": { "pages": 5, "backend_endpoints": 3, "api_endpoints": 5, "api_integrated": 4, "api_mock": 1, "enums": 2, "models": 0, "has_i18n": false, "has_state_management": true, "stack_type": "fullstack" } } # Enum Dictionary All enums, status codes, and constant mappings found in the codebase. ## UserRole **Source:** `types/user.ts` **Type:** TypeScript enum | Value | Label | Description | |-------|-------|-------------| | `admin` | Admin | Full system access, can manage all users | | `manager` | Manager | Can view and edit users, cannot delete | | `user` | User | Read-only access | ## STATUS_MAP **Source:** `constants/status.ts` **Type:** Constant map | Key | Display Value | Color | Description | |-----|--------------|-------|-------------| | `active` | Active | Green | Normal active account | | `inactive` | Inactive | Gray | Account disabled by user | | `suspended` | Suspended | Red | Account suspended by admin | # User List > **Route:** `/users` > **Module:** User Management > **Generated:** 2026-03-17 ## Overview Displays all system users in a searchable, paginated table. Supports creating, editing, and deleting users. Only ADMIN and MANAGER roles can access this page. ## Layout - **Top bar**: Search input + "Create User" button - **Main are