mcpField
P
page-best-practice

page-best-practice

github.com/forge-town开发742 次安装8 周前更新
代码仓库

关于 page-best-practice

供 AI Agent 使用的页面生成技能,可选择有监督或无监督模式,并按规范指导页面结构与决策。

主要功能

  1. 01有监督与无监督生成模式
  2. 02参考页面结构和决策逻辑
  3. 03依次生成 Content、Wrapper、Index
  4. 04遵循模板和示例代码结构

适用场景

  1. 01由 AI 自动决策生成页面
  2. 02创建页面时逐项确认关键选择
  3. 03生成需要 Store 的页面

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/forge-town/skills --skill page-best-practice

安装后在 Claude Code 中输入/page-best-practice确认已加载。

包含的文件

除 SKILL.md 外,安装时一起下载的参考资料和脚本。

best-practice-examples/simple-no-store/
index.ts
SimpleNoStorePage.tsx
SimpleNoStorePageContent.tsx
best-practice-examples/standard-with-store/
index.ts
StandardWithStorePage.tsx
StandardWithStorePageContent.tsx
best-practice-examples/standard-with-store/_store/
README.md
references/
ANATOMY.md
checklist.md
judgeHasStore.ts
judgeUIComplexity.ts
schema.ts
TEMPLATE_INDEX.md
TEMPLATE_VIEW.md
TEMPLATE_WRAPPER.md

README 原文English

来自项目 README

README 暂无中文译文,以下为英文原文;中文介绍见上方。

页面生成器 (Page Generator Skill)

使用说明

首先询问用户选择生成模式:

  • 无监督模式:AI 自动推导所有选项,全程无需人工干预
  • 有监督模式:每个关键决策点向用户确认
  1. 参照 ANATOMY.md 了解页面解剖结构规范
  2. 阅读 judgeHasStore.ts 和 judgeUIComplexity.ts 了解决策逻辑
  3. 严格参照 best-practice-examples/ 中的代码结构
  4. 依次生成:Content → Wrapper → Index(若需 Store 则先触发 store-best-practice)

模板文件: TEMPLATE_WRAPPER.md、TEMPLATE_VIEW.md、TEMPLATE_INDEX.md

评论

支持 Markdown