安装方式
命令行安装
在项目根目录执行以下命令,完成 Skill 安装。
npx bzskills add zai-org/GLM-skills --skill glmv-prd-to-app Build a complete, production-ready full-stack web application from PRD documents, prototype images, and resource files. Handles the entire pipeline: system design, database schema, seed data, backend API, frontend UI, visual verification against prototypes, and deployment script generation. Use this skill whenever the user: - Provides a PRD (product requirement document) and wants a working app built - Says things like "根据PRD开发", "build from PRD", "implement this product", "把需求文档做成应用", "develop this app from requirements" - Has prototype images + requirements and wants full-stack implementation - Wants to turn product specifications into a running web application - Mentions building an app from wireframes/mockups combined with a requirements doc Trigger this skill even if the user just says "帮我开发" or "build this" with PRD materials present in the working directory.
40
下载量
命令行安装
在项目根目录执行以下命令,完成 Skill 安装。
npx bzskills add zai-org/GLM-skills --skill glmv-prd-to-app name: glmv-prd-to-app
description: >
Build a complete, production-ready full-stack web application from PRD documents,
prototype images, and resource files. Handles the entire pipeline: system design,
database schema, seed data, backend API, frontend UI, visual verification against
prototypes, and deployment script generation.
Use this skill whenever the user:
- Provides a PRD (product requirement document) and wants a working app built
- Says things like "根据PRD开发", "build from PRD", "implement this product",
"把需求文档做成应用", "develop this app from requirements"
- Has prototype images + requirements and wants full-stack implementation
- Wants to turn product specifications into a running web application
- Mentions building an app from wireframes/mockups combined with a requirements doc
Trigger this skill even if the user just says "帮我开发" or "build this" with PRD
materials present in the working directory.Language: Respond in the same language the user uses. Code comments should match.
Build a complete, deployed web application from PRD + prototypes + resources.
The result must be fully reproducible via a single bash /workspace/start.sh.
---
Before anything else, understand what you're working with.
/workspace/prd.md ← Product requirement document
/workspace/prototypes/*.jpg ← UI prototype images (the visual truth)
/workspace/resources/**/* ← Images, videos, icons, and other assets
If the materials are in a different location, adapt accordingly. Read the PRD fully.
For every prototype image:
List all files in /workspace/resources/ and map each to where it appears in the prototypes.
Every resource file must be used in the final application where relevant.
---
Produce a comprehensive design document at /workspace/docs/design.md.
For each entity, specify:
Example:
products table:
id SERIAL PRIMARY KEY
name VARCHAR(200) NOT NULL ← from product card title
price DECIMAL(10,2) NOT NULL ← from product card price label
image_url TEXT NOT NULL ← from product card image
category_id INTEGER REFERENCES categories(id) ← from category filter
...
For every page interaction, define an API endpoint:
Choose based on PRD complexity. Recommended defaults:
| Layer | Choice | When to use |
|---|---|---|
| Frontend | React + TypeScript + Vite | Default for SPAs |
| Frontend | Next.js | If SSR/SEO needed |
| Styling | Tailwind CSS | Default |
| Backend | Node.js + Express | Simple APIs |
| Backend | Python + FastAPI | If PRD mentions Python |
| Database | SQLite | Simple apps, <10 tables |
| Database | PostgreSQL | Complex apps, relationships |
| ORM | Prisma (Node) / SQLAlchemy (Python) | Match backend |
Document the choice and reasoning.
/workspace/
├── frontend/ ← or client/
│ ├── src/
│ │ ├── components/
│ │ ├── pages/
│ │ ├── hooks/
│ │ ├── services/ ← API client
│ │ ├── types/
│ │ └── assets/ ← copied from /workspace/resources
│ └── ...
├── backend/ ← or server/
│ ├── src/
│ │ ├── routes/
│ │ ├── models/
│ │ ├── controllers/
│ │ ├── middleware/
│ │ └── seed/
│ └── ...
├── docs/
│ ├── design.md
│ └── README.md
├── start.sh
└── prd.md
---
Seed data is critical — it makes the app look real from the first launch.
images must appear in seed data. Read each prototype image again and transcribe content.
/workspace/resources/ to seed data entries. Use relative paths or copy to public/static dir.
placeholder.com images.error scenarios as specified in the PRD.
Save seed data as:
Place in /workspace/backend/src/seed/ (or equivalent).
---
For each endpoint from the design doc:
---
This is where visual fidelity matters most. The prototypes are the definitive reference.
Before building components, establish:
For each prototype image, in order:
/workspace/resources/ to frontend assets---
This phase is what separates a good implementation from a great one.
Repeat this loop for every page.
Use Playwright to capture the running application:
python ${SKILL_DIR}/scripts/render_page.py \
--url "http://localhost:3000/page-path" \
--output "/workspace/docs/screenshots/page_name.png" \
--width 1280
Read both images (prototype and screenshot) side by side:
/workspace/prototypes/For each difference found:
Max 3 iterations per page. Focus on the most impactful differences first.
---
Run the API health checker to verify all endpoints:
python ${SKILL_DIR}/scripts/check_api.py \
--base-url "http://localhost:3000/api" \
--endpoints-file "/workspace/docs/endpoints.json"
Or manually test each endpoint with curl:
curl -s http://localhost:3000/api/products | head -c 200
Walk through every user flow defined in the PRD:
http://localhost:3000Address integration issues: CORS, API URL mismatches, data format mismatches, etc.
---
Generate /workspace/start.sh — the single command that makes everything work from scratch.
The script must:
http://localhost:3000#!/bin/bash
set -e
echo "=== PRD-to-App: Starting deployment ==="
# 1. System dependencies
echo "[1/7] Checking system dependencies..."
# Install Node.js, npm, etc. if missing
# Install database if needed
# 2. Backend setup
echo "[2/7] Setting up backend..."
cd /workspace/backend
npm install # or pip install -r requirements.txt
# 3. Database initialization
echo "[3/7] Initializing database..."
# Drop existing DB / reset
# Run migrations
# Load seed data
# 4. Frontend setup
echo "[4/7] Setting up frontend..."
cd /workspace/frontend
npm install
# 5. Copy resources
echo "[5/7] Copying resource files..."
# cp -r /workspace/resources/* /workspace/frontend/public/assets/
# 6. Start backend
echo "[6/7] Starting backend server..."
cd /workspace/backend
npm run dev & # or equivalent
BACKEND_PID=$!
# 7. Start frontend
echo "[7/7] Starting frontend..."
cd /workspace/frontend
PORT=3000 npm run dev &
FRONTEND_PID=$!
echo ""
echo "=== Application is running at http://localhost:3000 ==="
echo "Backend PID: $BACKEND_PID"
echo "Frontend PID: $FRONTEND_PID"
echo "To stop: kill $BACKEND_PID $FRONTEND_PID"
wait
After generating start.sh:
chmod +x /workspace/start.shbash /workspace/start.shhttp://localhost:3000 responds---
/workspace/docs/design.md)Already created in Phase 1 — update with any changes made during implementation:
/workspace/README.md)# [Project Name]
## Overview
[From PRD product overview]
## Technology Stack
- Frontend: ...
- Backend: ...
- Database: ...
## Quick Start
\`\`\`bash
bash start.sh
\`\`\`
Then visit http://localhost:3000
## Project Structure
[Directory tree]
## Database
[Schema overview, how to re-seed]
## API Reference
[Key endpoints]
---
Before declaring done, verify every item:
bash /workspace/start.sh works from a clean statehttp://localhost:3000---
for visual/layout decisions.
database via APIs. No hardcoded data in frontend components.
"minor" features. Don't merge separate pages into one.
/workspace/resources/, use that file. Don't substitute with placeholder URLs.
start.sh must work from absolute zero. If it needs Node 18+,it installs Node 18+. If it needs PostgreSQL, it sets up PostgreSQL.
your output against prototypes. Use API checks to verify endpoints. Run start.sh to verify
deployment.