chanpinhsd/agent/skills/voc_research/SKILL.md
lidf 4157ba6afb feat: 新增 voc_research Skill — 通过 curl 调用 VOC REST API
- 教 Agent 用 execute_shell_command + curl 完成 VOC 采集与查询
- 与黑手党提案 UDE 诊断阶段整合
- 零依赖:无需额外安装,利用已有 VOC 后端
2026-04-07 01:16:51 +08:00

133 lines
4.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
name: voc_research
description: "VOC 研究采集与分析工具。通过调用 VOC 后端 API 完成消费者声音数据的采集、查看和分析。在黑手党提案的准备阶段UDE 诊断)特别有用。"
metadata:
copaw:
emoji: "📊"
requires: {}
---
# VOC 研究工具
当用户需要**采集消费者声音数据、查看 VOC 分析结果、创建 VOC 研究**时,使用此 Skill。
本工具通过 `execute_shell_command` 调用 VOC 后端 REST API。
## API 基地址
```
https://brand.brainwork.club/voc/api/research
```
## 核心工作流
### 场景 1为黑手党提案采集 VOC 数据
当用户说"帮我采集 XX 品牌的 VOC 数据"时:
**第一步:检查是否有同品牌的已有研究**
```bash
curl -s https://brand.brainwork.club/voc/api/research/list | python3 -m json.tool
```
如果已有同品牌研究,直接使用其 `id`,跳到第三步。
**第二步:创建新研究(仅当无已有研究时)**
```bash
curl -s -X POST https://brand.brainwork.club/voc/api/research \
-H "Content-Type: application/json" \
-d '{"brand_name": "品牌名"}' | python3 -m json.tool
```
返回 `research_id`,记住它。
**第三步:提交研究卡片(自动触发采集)**
```bash
curl -s -X PUT https://brand.brainwork.club/voc/api/research/{id}/card \
-H "Content-Type: application/json" \
-d '{
"brand_name": "天维美",
"category": "跨境保健品",
"focus_product": "护肝片",
"competitors": [{"name": "Swisse"}, {"name": "Blackmores"}],
"keywords": [
{"keyword": "天维美 护肝片", "category": "brand"},
{"keyword": "护肝片 推荐", "category": "category"},
{"keyword": "Swisse 护肝", "category": "compete"}
]
}' | python3 -m json.tool
```
> ⚠️ 提交卡片后, 服务器会自动开始采集。采集是异步的,通常 30 秒到 2 分钟完成。
**第四步:检查采集状态**
```bash
curl -s https://brand.brainwork.club/voc/api/research/{id}/pipeline | python3 -m json.tool
```
`collect` 步骤的 `status` 变为 `done` 后再继续。
**第五步:查看 VOC 数据**
```bash
# 查看 VOC 列表(前 20 条)
curl -s "https://brand.brainwork.club/voc/api/research/{id}/voc-list?page=1&page_size=20" | python3 -m json.tool
# 查看聚类分析
curl -s "https://brand.brainwork.club/voc/api/research/{id}/focus-state?lens=task" | python3 -m json.tool
# 查看帖子分组
curl -s "https://brand.brainwork.club/voc/api/research/{id}/items-grouped?view=included" | python3 -m json.tool
```
### 场景 2查看已有研究的数据
用户说"看看 XX 品牌的 VOC 数据"时:
```bash
# 列出所有研究
curl -s https://brand.brainwork.club/voc/api/research/list | python3 -m json.tool
# 获取研究详情(含统计)
curl -s https://brand.brainwork.club/voc/api/research/{id} | python3 -m json.tool
# 获取 VOC 数据
curl -s "https://brand.brainwork.club/voc/api/research/{id}/voc-list?page=1&page_size=20" | python3 -m json.tool
```
### 场景 3获取研究报告
```bash
curl -s https://brand.brainwork.club/voc/api/research/{id}/report | python3 -m json.tool
```
## 与黑手党提案的整合
VOC 数据在黑手党提案流程中的作用:
1. **准备阶段 - UDE 诊断**VOC 数据中的用户抱怨 = 不满意效果UDE直接用于诊断
2. **步骤 1 - 冲突图**VOC 中矛盾性表达(如"想买但太贵"= 冲突素材
3. **步骤 2 - 惯例揭示**VOC 中的"大家都这样""行业惯例"表述 = 待打破的惯例
4. **步骤 5 - 提案验证**VOC 数据量和情感分布 = 提案的实证基础
## 关键字段说明
VOC 列表返回的每条记录包含:
- `text`:评论/笔记原文
- `platform`来源平台douyin/xiaohongshu
- `like_count`:点赞数(可作为共鸣度指标)
- `author_type`real_user / brand_official / marketing
- `tag`LLM 标注的主题标签
- `dimension`:归属的分析维度
## 注意事项
- API 无需认证,直接 curl 即可
- 所有写操作返回 `{received: true}`,实际结果通过 SSE 推送(但 Agent 不需要监听 SSE等几秒后直接查询即可
- 采集需要 TikHub API Key目前服务器已配置好。未来支持用户自带 Key
- 全局缓存机制:同一关键词的数据跨研究复用,不会重复调 API