From f77bb8a5174684b70fcc03ece0dbcbf1db5ff030 Mon Sep 17 00:00:00 2001 From: Claude Code Date: Sun, 29 Mar 2026 05:27:11 +0000 Subject: [PATCH] =?UTF-8?q?docs:=20=E6=B7=BB=E5=8A=A0=E5=9C=BA=E6=99=AF?= =?UTF-8?q?=E5=88=86=E7=B1=BB=E4=B8=8E=E7=9B=AE=E5=BD=95=E7=BB=93=E6=9E=84?= =?UTF-8?q?=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在 Step 2 添加场景分类章节,明确三种场景: 1. 纯桌面端项目 2. 纯移动端项目 3. 桌面端+移动端混合项目(推荐) 明确不推荐使用两个独立目录(prototype + prototype-mobile), 强调统一目录结构的管理优势。 Co-Authored-By: Claude Sonnet 4.6 --- .../skills/generate-prototype-grid/SKILL.md | 72 +++++++++++++++++++ 1 file changed, 72 insertions(+) diff --git a/.claude/skills/generate-prototype-grid/SKILL.md b/.claude/skills/generate-prototype-grid/SKILL.md index bf04195..9657462 100644 --- a/.claude/skills/generate-prototype-grid/SKILL.md +++ b/.claude/skills/generate-prototype-grid/SKILL.md @@ -141,6 +141,78 @@ prototype/ └── device-management.html # 设备管理(独立文件) ``` +#### 📁 场景分类与目录结构 + +根据项目需求,选择合适的目录结构: + +**场景 1: 纯桌面端项目** +- 适用对象:管理后台、数据看板、桌面应用 +- 目录结构: + ``` + prototype/ + ├── admin-index.html # 桌面端平铺入口 + ├── index.html # 统一入口 + ├── docs-index.html # 文档中心 + ├── view-doc.html # 文档查看器 + ├── server.js + └── pages/ + └── admin/ # 桌面端管理页面 + ``` + +**场景 2: 纯移动端项目** +- 适用对象:移动应用、手机网页 +- 目录结构: + ``` + prototype/ + ├── mobile-index.html # 移动端平铺入口 + ├── index.html # 统一入口 + ├── docs-index.html # 文档中心 + ├── view-doc.html # 文档查看器 + ├── server.js + └── pages/ + └── mobile/ # 移动端页面 + ``` + +**场景 3: 桌面端+移动端混合项目(推荐)⭐** +- 适用对象:全栈应用、多端支持 +- 目录结构: + ``` + prototype/ + ├── index.html # 统一入口 + ├── admin-index.html # 桌面端平铺入口 + ├── mobile-index.html # 移动端平铺入口 + ├── docs-index.html # 文档中心 + ├── view-doc.html # 文档查看器 + ├── server.js # 唯一服务器 + └── pages/ + ├── admin/ # 桌面端管理页面 + └── mobile/ # 移动端页面 + ``` + +#### ⚠️ 不推荐的方案 + +**❌ 错误示例:使用两个独立目录** +``` +prototype/ # 桌面端 +├── server.js +└── pages/admin/ +prototype-mobile/ # 移动端 +├── server.js # 重复! +└── pages/mobile/ +``` + +**为什么不推荐:** +- ❌ 维护困难:需要同步更新两个目录 +- ❌ 资源浪费:两个 server.js,两个端口 +- ❌ 代码重复:文档系统、工具函数重复 +- ❌ 不符合统一管理原则 + +**✅ 正确做法:统一管理** +- ✅ 一个 prototype/ 目录 +- ✅ 一个 server.js +- ✅ 通过 pages/admin/ 和 pages/mobile/ 组织页面 +- ✅ 共享文档系统和工具函数 + #### 桌面端页面结构(独立 HTML 文件) ```html