name: persona-template description: 从模板生成用户画像文档和共情地图 allowed-tools:
- Read
- Write
- Edit
- Bash
- Glob
- Grep
用户画像模板技能
目的
根据结构化数据和模板生成专业的用户画像文档和共情地图可视化。
功能
- 用研究数据填充画像模板
- 以多种格式生成画像卡片
- 创建共情地图可视化
- 导出为 PDF、PNG 和 Markdown
- 支持多种画像模板风格
- 生成画像对比视图
目标流程
- persona-development.js (personaDocumentationTask)
- user-research.js (personaCreationTask)
集成点
- 模板引擎 (Handlebars, EJS)
- PDF 生成 (Puppeteer, PDFKit)
- 画像卡片图像生成
输入模式
{
"type": "object",
"properties": {
"personaData": {
"type": "object",
"properties": {
"name": { "type": "string" },
"photo": { "type": "string" },
"demographics": {
"type": "object",
"properties": {
"age": { "type": "number" },
"occupation": { "type": "string" },
"location": { "type": "string" },
"education": { "type": "string" }
}
},
"goals": { "type": "array", "items": { "type": "string" } },
"frustrations": { "type": "array", "items": { "type": "string" } },
"behaviors": { "type": "array", "items": { "type": "string" } },
"quote": { "type": "string" },
"bio": { "type": "string" }
}
},
"empathyMap": {
"type": "object",
"properties": {
"says": { "type": "array" },
"thinks": { "type": "array" },
"does": { "type": "array" },
"feels": { "type": "array" }
}
},
"templateStyle": {
"type": "string",
"enum": ["minimal", "detailed", "visual", "ux-agency"],
"default": "detailed"
},
"outputFormat": {
"type": "string",
"enum": ["pdf", "png", "markdown", "html"],
"default": "markdown"
}
},
"required": ["personaData"]
}
输出模式
{
"type": "object",
"properties": {
"personaDocument": {
"type": "string",
"description": "生成的画像文档路径"
},
"empathyMapDocument": {
"type": "string",
"description": "生成的共情地图路径"
},
"cardImage": {
"type": "string",
"description": "画像卡片图像路径"
},
"markdownContent": {
"type": "string",
"description": "Markdown 内容(如果适用)"
}
}
}
使用示例
const result = await skill.execute({
personaData: {
name: 'Sarah Chen',
demographics: {
age: 34,
occupation: '产品经理',
location: '旧金山,加州'
},
goals: ['简化团队工作流程', '减少会议开销'],
frustrations: ['工具太多', '信息孤岛'],
quote: '我需要在管理细节的同时看到大局'
},
empathyMap: {
says: ['我们需要更好的协作'],
thinks: ['有没有更简单的方法?'],
does: ['每天检查多个应用'],
feels: ['被通知淹没']
},
templateStyle: 'detailed',
outputFormat: 'pdf'
});