{ "name": "brand-context-builder", "displayName": "品牌上下文建档", "description": "VOC工作坊品牌建档技能,通过结构化问答采集客户品牌信息,验证格式,生成并持久化品牌上下文文件供后续分析技能引用。", "category": "workshop", "version": "1.0.0", "type": "conversational", "parameters": { "type": "object", "required": [], "properties": { "mode": { "type": "string", "description": "建档模式: full=完整建档(默认), update=增量更新", "enum": [ "full", "update" ], "default": "full" }, "brandName": { "type": "string", "description": "品牌英文名称" }, "categoryKeywords": { "type": "array", "items": { "type": "string" }, "description": "品类核心英文关键词,至少1个,建议2-3个" }, "amazonDomain": { "type": "integer", "description": "Amazon站点: 1=US(默认) 2=UK 3=DE 4=JP", "default": 1, "enum": [ 1, 2, 3, 4 ] }, "brandAsins": { "type": "array", "items": { "type": "string", "pattern": "^B0[A-Z0-9]{8}$" }, "description": "品牌代表性ASIN列表,3-5个,B0开头10位" }, "knownCompetitors": { "type": "array", "items": { "type": "string" }, "description": "已知竞品品牌名(可选)" }, "competitorAsins": { "type": "array", "items": { "type": "string" }, "description": "已知竞品ASIN(可选)" }, "tiktokKeywords": { "type": "array", "items": { "type": "string" }, "description": "TikTok搜索关键词(可选,Session 4补充)" }, "douyinKeywords": { "type": "array", "items": { "type": "string" }, "description": "抖音搜索关键词(可选,Session 4补充)" }, "workshopGoal": { "type": "string", "description": "客户希望通过分析解决的核心问题" } } }, "validation": { "asinFormat": { "pattern": "^B0[A-Z0-9]{8}$", "errorMessage": "ASIN格式不正确,应为B0开头的10位字母数字组合,如 B0CJ5K1234" }, "domainMapping": { "1": "amazon.com", "2": "amazon.co.uk", "3": "amazon.de", "4": "amazon.co.jp" } }, "output": { "type": "object", "description": "品牌上下文对象,写入 memory/brand-context.json", "properties": { "success": { "type": "boolean" }, "brandContext": { "type": "object" }, "readyForSession1": { "type": "boolean" }, "missingFields": { "type": "array" } } }, "memoryFiles": { "write": [ "memory/brand-context.json", "memory/workshop-progress.json", "memory/calibration-notes.json" ], "read": [] }, "usageExamples": [ { "name": "完整建档", "input": { "mode": "full", "brandName": "COCORRINA", "categoryKeywords": [ "reed diffuser", "aroma diffuser" ], "amazonDomain": 1, "brandAsins": [ "B0CJ5KXXXX", "B0DJ6LYYYY", "B0EK7MZZZZ" ], "workshopGoal": "想了解品类机会和用户真正在意什么" }, "description": "新客户首次建档,采集全部必要信息" }, { "name": "增量更新-补充竞品", "input": { "mode": "update", "knownCompetitors": [ "NEST New York", "Yankee Candle" ], "competitorAsins": [ "B0AAAA1111", "B0BBBB2222" ] }, "description": "Session 2 后补充确认的竞品信息" }, { "name": "增量更新-补充社媒关键词", "input": { "mode": "update", "tiktokKeywords": [ "reed diffuser", "#homedecor" ], "douyinKeywords": [ "香薰", "无火香薰" ] }, "description": "Session 4 前补充社媒搜索关键词" } ], "reportMapping": { "brandName": "品牌名称", "categoryKeywords": "品类关键词", "amazonDomain": "Amazon站点", "brandAsins": "品牌ASIN", "workshopGoal": "分析目标", "completeness": "建档完整度" }, "tokenConfig": { "type": "bearer", "configFile": "~/.openclaw/voc-credentials.json", "tokenField": "vocToken", "currentToken": "r:858b3ee92314d5447d1fc3cdc10462d7", "resolutionOrder": [ "configFile", "currentToken" ], "apigId": "Vo3ROWEvDy", "paymentUrlResolution": { "description": "动态构建充值URL:通过当前token查出用户objectId,拼接到充值页面", "steps": [ "1. 从 voc-credentials.json 或 currentToken 获取当前 session token", "2. 调用 GET https://server.fmode.cn/parse/users/me (Header: X-Parse-Application-Id: ncloudmaster, X-Parse-Session-Token: {token})获取用户 objectId", "3. 拼接充值URL: https://pwa.fmode.cn/apig-pay.html?user={objectId}&apigid=Vo3ROWEvDy&fun_id=HOkkX72PMF", "4. 将该URL展示给用户,引导扫码支付" ], "userResolveEndpoint": "https://server.fmode.cn/parse/users/me", "userResolveHeaders": { "X-Parse-Application-Id": "ncloudmaster", "X-Parse-Session-Token": "{vocToken}" }, "paymentBaseUrl": "https://pwa.fmode.cn/apig-pay.html", "paymentParams": { "user": "{resolvedUserId}", "apigid": "Vo3ROWEvDy", "fun_id": "HOkkX72PMF" }, "balanceCheckEndpoint": "https://server.fmode.cn/api/apig/getApig" }, "onMissing": { "action": "resolveUserThenShowPayment", "title": "扫码开通 VOC-AI 数据服务", "message": "此 Skill 需要有效的 API Token。请按以下步骤操作:\n1. 如果你已有 Token,请告诉我,我会保存到 ~/.openclaw/voc-credentials.json\n2. 如果没有 Token,我会引导你扫码充值开通" }, "onBalanceInsufficient": { "action": "resolveUserThenShowPayment", "title": "VOC-AI Token 余额不足,请扫码充值", "message": "当前 Token 余额不足,我将为你生成专属充值链接,扫码支付后即可继续使用。" } }, "errorHandling": { "balanceInsufficient": { "conditions": [ { "responseField": "code", "operator": "in", "value": [ -2, -3, -10, 402, 429 ] }, { "responseField": "msg", "operator": "contains", "value": [ "余额不足", "insufficient", "balance", "quota" ] }, { "responseField": "message", "operator": "contains", "value": [ "余额不足", "insufficient", "balance" ] } ], "matchMode": "any", "trigger": "tokenConfig.onBalanceInsufficient" }, "unauthorized": { "conditions": [ { "responseField": "code", "operator": "in", "value": [ 401, 403 ] }, { "responseField": "msg", "operator": "contains", "value": [ "unauthorized", "token", "invalid", "auth" ] } ], "matchMode": "any", "trigger": "tokenConfig.onMissing" } } }