面向AI产品团队的一站式文档解决方案,覆盖从产品定义到API上线的全链路文档:PRD(功能规格说明书)、Product Brief(投资人/团队轻量介绍)、Experience Framework(体验验证方法论,含四维模型+埋点指标+SUS/EV/NPS/SAM量表设计)、API Console...
html
<script src="api-console-config.js"></script>
<script>
window.API_CONSOLE_CONFIG = {
productName: '我的产品',
baseUrl: 'https://api.my-product.com',
groups: [
{
name: '用户',
apis: [
{ method: 'POST', path: '/users', desc: '创建用户',
params: [
{ name:'name', type:'text', required:true, placeholder:'姓名' },
{ name:'email', type:'text', required:true, placeholder:'邮箱' }
]
},
{ method: 'GET', path: '/users/:id', desc: '查询用户',
params: [
{ name:'id', type:'text', required:true, placeholder:'用户ID' }
]
}
]
}
]
};
</script>
<script src="api.html"></script>
页面定制方式PRD复制 prd.html,替换章节内容产品简介复制 product-brief.html,替换内容体验框架复制 experience-framework.html,替换四维模型内容Hub 导航复制 hub.html,修改四个入口链接
本 Skill 提供一套 可配置的产品文档黄页,包含 PRD/Brief/体验框架/API调试台四类页面。
页面文件用途定制方式PRDprd.html功能规格说明书内容替换产品简介product-brief.html面向投资人轻量介绍内容替换体验框架experience-framework.htmlAI产品体验验证方法论章节模板API 控制台api.html在线 API 调试配置化 ⭐Hub 导航hub.html四页面导航入口内容替换
html
<!-- Step 1: 引入配置 -->
<script src="api-console-config.js"></script>
<!-- Step 2: 修改配置 -->
<script>
window.API_CONSOLE_CONFIG.productName = '我的产品';
window.API_CONSOLE_CONFIG.baseUrl = 'https://api.my-product.com';
// 修改端点列表
window.API_CONSOLE_CONFIG.groups = [
{
name: '用户模块',
icon: '<svg ...>', // 可选 SVG
apis: [
{
method: 'POST',
path: '/users',
desc: '创建用户',
params: [
{ name: 'name', type: 'text', required: true, desc: '用户名' },
{ name: 'email', type: 'text', required: true, desc: '邮箱' },
{ name: 'role', type: 'select', required: false, default: 'user',
options: ['user','admin','vip'], desc: '用户角色' }
]
},
{
method: 'GET',
path: '/users/:id',
desc: '查询用户详情',
params: [
{ name: 'id', type: 'text', required: true, desc: '用户 ID' }
]
}
]
}
];
</script>
<!-- Step 3: 引入页面 -->
<script src="api.html"></script>
页面会自动读取 API_CONSOLE_CONFIG 并渲染端点列表、发送请求。
字段类型默认值说明productNamestring'本产品'页面标题baseUrlstring—API 基础地址timeoutnumber30000请求超时(ms)showStatsbooleantrue是否显示统计卡片initialStatsobject见下方初始统计数据groupsarray内置默认端点分组列表themestring'dark'``'dark' / 'light'
initialStats 默认值:
javascript
{
totalCalls: 0, // 总调用次数
successRate: 100, // 成功率%
avgLatency: 0, // 平均延迟ms
activeTasks: 0 // 活跃任务数
}
javascript
{
method: 'GET' | 'POST' | 'PUT' | 'DELETE',
path: '/endpoint/:param', // :param 会被识别为路径参数
desc: '端点描述',
params: [ // 请求参数(用于构造器)
{
name: 'paramName', // 参数名
type: 'text' | 'file' | 'select',
required: true | false,
default: '默认值', // 可选
options: ['a','b','c'], // type=select 时必填
desc: '参数说明' // 可选
}
]
}
text
product-doc-hub/
├── SKILL.md # 本文档
└── assets/
├── prd.html # 产品需求文档(可直接修改内容)
├── product-brief.html # 产品简介(可直接修改内容)
├── experience-framework.html # 体验框架(保留结构换内容)
├── api.html # API 调试台(配置化)
├── api-console-config.js # API Console 配置模板 ⭐
├── hub.html # Hub 导航页
└── (其他产品文档资源)
prd.html 作为 my-product-prd.htmlproduct-brief.html 作为 my-product-brief.htmlexperience-framework.html 作为 my-ef.htmlcss
background: #08080c
surface: rgba(255,255,255,0.02~0.08)
text-primary: #e2e8f0
text-secondary: #94a3b8
accent-blue: #818cf8
accent-green: #10b981
accent-amber: #f59e0b
accent-purple: #a855f7
border: rgba(255,255,255,0.05~0.10)
组件CSS 类说明Callout.callout .callout-blue/green/yellow/purple左色条信息卡片Flow 步骤.flow-step + .flow-arrow流程图表格标准 <table> + th/td数据表格代码<code> 半透明底内联代码等宽框.diagramASCII 架构图
groups 端点列表bash
cd ~/.codebuddy/skills/product-doc-hub
git init
git add .
git commit -m "feat: product-doc-hub v2"
git remote add origin https://github.com/YOUR_USERNAME/product-doc-hub.git
git push -u origin main