siluzan-tso-cli 1.1.12 → 1.1.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/README.md +33 -29
  2. package/dist/index.js +2267 -1440
  3. package/dist/skill/SKILL.md +93 -34
  4. package/dist/skill/_meta.json +2 -2
  5. package/dist/skill/assets/campaign-create-template.json +96 -101
  6. package/dist/skill/references/account-analytics.md +64 -62
  7. package/dist/skill/references/accounts.md +130 -130
  8. package/dist/skill/references/clue.md +13 -13
  9. package/dist/skill/references/finance.md +62 -61
  10. package/dist/skill/references/forewarning.md +40 -39
  11. package/dist/skill/references/google-ads-rules/google-ads-account-audit.md +165 -161
  12. package/dist/skill/references/google-ads-rules/google-ads-audience-strategy.md +94 -85
  13. package/dist/skill/references/google-ads-rules/google-ads-campaign-optimization.md +97 -85
  14. package/dist/skill/references/google-ads-rules/google-ads-compliance.md +274 -272
  15. package/dist/skill/references/google-ads-rules/google-ads-conversion-architecture.md +97 -82
  16. package/dist/skill/references/google-ads-rules/google-ads-creative-optimization.md +143 -139
  17. package/dist/skill/references/google-ads-rules/google-ads-keyword-optimization.md +131 -128
  18. package/dist/skill/references/google-ads-rules/google-ads-keyword-strategy.md +175 -173
  19. package/dist/skill/references/google-ads-rules/google-ads-launch-plan-template.md +126 -123
  20. package/dist/skill/references/google-ads-rules/google-ads-pmax-guide.md +86 -73
  21. package/dist/skill/references/google-ads-rules/sensitive-industries.md +43 -8
  22. package/dist/skill/references/google-ads.md +201 -196
  23. package/dist/skill/references/open-account-by-media.md +23 -23
  24. package/dist/skill/references/open-account-google-ui.md +26 -26
  25. package/dist/skill/references/optimize.md +8 -8
  26. package/dist/skill/references/reporting.md +28 -28
  27. package/dist/skill/references/setup.md +10 -7
  28. package/dist/skill/references/tso-home.md +11 -11
  29. package/dist/skill/references/workflows.md +28 -26
  30. package/dist/skill/report-templates/README.md +22 -21
  31. package/dist/skill/report-templates/REPORT-WORKFLOW.md +9 -9
  32. package/dist/skill/report-templates/bing-period-report.md +11 -11
  33. package/dist/skill/report-templates/google-ads-diagnosis.md +86 -86
  34. package/dist/skill/report-templates/google-period-report.md +23 -23
  35. package/dist/skill/report-templates/report-template-academic.html +433 -341
  36. package/dist/skill/report-templates/report-template-dark.html +440 -257
  37. package/dist/skill/report-templates/report-template-formal.html +438 -288
  38. package/dist/skill/report-templates/report-template-mobile.html +456 -241
  39. package/dist/skill/report-templates/report-template-onepager.html +452 -240
  40. package/dist/skill/report-templates/report-template-print.html +355 -243
  41. package/dist/skill/report-templates/report-template.html +485 -392
  42. package/dist/skill/report-templates/tiktok-period-report.md +10 -10
  43. package/package.json +13 -13
  44. package/scripts/postinstall.mjs +3 -1
@@ -2,12 +2,11 @@
2
2
  name: siluzan-tso
3
3
  description: 当判断用户可能需要以下功能时可以使用siluzan-tso这个skillGoogle,Bing,Yandex,Tiktok,Kwai等广告账户的开户,账号数据分析共享/取消共享、Google MCC 绑定/解绑、Meta BM 绑定、TikTok BC 绑定/解绑TikTok 关闭、暂停 Google 账户撤回、Google 电子邮件访问邀请);优化报告(TSO 管理员)、报告电子邮件推送、Meta/TikTok/Bing 账户分析发票及发票结算配置文件(发票信息);优化和智能预警;TikTok/Meta潜在客户表单完整的Google广告管理,包括附加信息、地理位置定位和搜索词,以及关键词建议。Google广告账户详细的投放数据分析。
4
4
  license: MIT
5
- metadata:
5
+ metadata:
6
6
  requires: nodejs,siluzan-tso-cli
7
7
  allowed-tools: Bash(siluzan-tso:*) Read
8
8
  ---
9
9
 
10
-
11
10
  # Siluzan TSO Skill
12
11
 
13
12
  本 Skill 只保留任务边界、文档路由与执行规则。具体业务细节、参数、模板、流程与示例均以下方 references 文档为准。遇到具体业务时,先读对应 references
@@ -36,10 +35,11 @@ allowed-tools: Bash(siluzan-tso:*) Read
36
35
  使用本 Skill 前,以下组件必须已安装并就绪:
37
36
 
38
37
  ### 可选环境变量
39
- | 变量 | 说明 |
40
- |------|------|
41
- | `SILUZAN_API_KEY` | 从环境变量读取 API Key(优先级高于 config.json,CI/CD 推荐) |
42
- | `SILUZAN_AUTH_TOKEN` | 从环境变量读取 JWT Token(优先级高于 config.json |
38
+
39
+ | 变量 | 说明 |
40
+ | ------------------------- | ------------------------------------------------------------------ |
41
+ | `SILUZAN_API_KEY` | 从环境变量读取 API Key(优先级高于 config.json,CI/CD 推荐) |
42
+ | `SILUZAN_AUTH_TOKEN` | 从环境变量读取 JWT Token(优先级高于 config.json) |
43
43
  | `SILUZAN_DATA_PERMISSION` | 从环境变量读取数据权限标识(优先级高于 config.json,跳过自动拉取) |
44
44
 
45
45
  如果上述依赖缺失,请先参照 `references/setup.md` 完成安装与配置。
@@ -62,48 +62,65 @@ allowed-tools: Bash(siluzan-tso:*) Read
62
62
  | `references/forewarning.md` | 智能预警规则与通知 |
63
63
  | `references/finance.md` | 转账、开票、发票抬头、充值网页引导 |
64
64
  | `report-templates/report-template.html` | 默认 HTML 报告样式参考 |
65
+
65
66
  ---
66
67
 
67
68
  ## Skill要如何使用
68
69
 
69
70
  ### 报告的生成
71
+
70
72
  报告分为两种:
73
+
71
74
  - (不推荐)由siluzan平台在你调用接口提交后直接异步生成的报告(调用对应命令后,会返回一条报告链接)(详情请读取:`references/reporting.md`)
72
75
  - 这种报告你无法用它来做数据分析除非用户明确要求(Siluzan平台的优化报告)
73
76
  - (推荐,默认生成这种报告)由你主动拉取数据,并按照skill给出的格式,输出给用户:详情请查看(`references/account-analytics.md`)
74
77
 
75
78
  ### 广告账户相关
79
+
76
80
  - 广告账户开户请阅读: `references/open-account-by-media.md`
77
81
  - 广告账户管理请阅读:`references/accounts.md`
78
82
  - 广告账户分析请阅读:`references/account-analytics.md`
79
83
  - Google广告的创建、修改、优化、查询广告详情等广告管理相关的功能:请阅读:`google-ads.md`
80
84
 
81
85
  ### 只调用接口,最终交付的内容不需要你输出的功能
86
+
82
87
  - Google广告优化记录功能(`references/optimize.md`),这个也跟优化报告类似,你调用接口,Siluzan平台按照一定的优化逻辑自动执行,你只能查询到结果,不能控制优化流程 注意不要与`google-ads.md`中的优化流程混淆两个是互相独立的功能,`references/google-ads.md`中的优化功能更为强大,在实际的优化过程中,也推荐使用`references/google-ads.md`中提供的内容
83
88
  - TikTok / Meta 线索表单请阅读:`references/clue.md`
84
89
  - Siluzan平台提供的预警功能请阅读:`references/forewarning.md`
85
90
  - 预警由Siluzan平台发送,当前仅支持微信推送,如果需要自定义的通知触达端,需要安装对应插件或skill+创建定时任务来完成
86
91
  - 转账、开票、发票抬头、充值网页引导请阅读:`references/finance.md`
87
- -
92
+ -
93
+
88
94
  ## AI 行为规范
95
+
89
96
  ### 如何更好的使用本skill执行任务
97
+
90
98
  遵循计划,确认,执行,验证,推测用户下一步意图
99
+
91
100
  1. 计划阶段:
92
- - 根据功能以及对应文档读取对应references
93
- - 根据references文件中的内容配合命令行工具提供的-h参数,来确认命令行的正确调用方式
94
- - 向用户输出一份操作计划,简要说明每一步将做什么
101
+
102
+ - 根据功能以及对应文档读取对应references
103
+ - 根据references文件中的内容配合命令行工具提供的-h参数,来确认命令行的正确调用方式
104
+ - 向用户输出一份操作计划,简要说明每一步将做什么
105
+
95
106
  2. 确认阶段:与用户确认关键信息(尤其是涉及写入/修改/删除的操作)
96
107
  3. 执行阶段:按计划执行,向用户说明每步操作意图
97
108
  4. 验证阶段:
98
- - 一般情况下,读取/写入的命令都是成对的。通过这两种命令的配合来进行结果验证
99
- - 如果是异步任务,需要你轮询读取命令,每5s一次查看任务状态,直到确认所有异步任务都有一个结果
100
- - 如果失败则可以查看失败具体原因,或者结合现有命令行使用其他方式进行重试,尽量让任务执行完成,而不是告诉用户任务失败就结束了。
109
+
110
+ - 一般情况下,读取/写入的命令都是成对的。通过这两种命令的配合来进行结果验证
111
+ - 如果是异步任务,需要你轮询读取命令,每5s一次查看任务状态,直到确认所有异步任务都有一个结果
112
+ - 如果失败则可以查看失败具体原因,或者结合现有命令行使用其他方式进行重试,尽量让任务执行完成,而不是告诉用户任务失败就结束了。
113
+
101
114
  5. 对话历史验证:
102
- - 如果任务前面有计划,你需要确认每个步骤都已经按计划中的内容执行完毕
115
+
116
+ - 如果任务前面有计划,你需要确认每个步骤都已经按计划中的内容执行完毕
117
+
103
118
  6. 完成任务后的输出
104
- - 结合命令行工具与references文件中的说明,对用户下一步的操作进行合理预测
119
+
120
+ - 结合命令行工具与references文件中的说明,对用户下一步的操作进行合理预测
105
121
 
106
122
  ### 硬规范
123
+
107
124
  - **不确定时读文档**:遇到不熟悉的命令,先读对应 references 文件或使用-h查看命令帮助,不要猜参数。
108
125
  - **先查账户再操作**:对具体账户做操作前,先通过 `list-accounts -m [mediaType] -k [mediaCustomerId]` 确认。特别是不确定是Google/Bing/TikTok这些媒体平台中的哪一个的时候
109
126
  - **使用 --json 处理数据**:需对返回数据做计算或筛选时,加 `--json`,再用 `node -e` 过滤提取(见 `references/tips.md`)。
@@ -127,13 +144,13 @@ allowed-tools: Bash(siluzan-tso:*) Read
127
144
 
128
145
  ### 默认值白名单(仅在用户明确授权"你决定"时才能使用)
129
146
 
130
- | 场景 | 允许的默认窗口 |
131
- |------|--------|
132
- | 日常投放巡检 / 余额扫描 | `now - 7d` ~ `now`(本地时间) |
133
- | 周报 | 上一个完整自然周(周一 00:00 ~ 周日 23:59) |
134
- | 月报 | 上一个完整自然月(1 号 ~ 月末) |
135
- | Google 关键词/系列分析 | `now - 30d` ~ `now`(与 TSO Google 接口最小窗口对齐) |
136
- | MetaAd 账户分析 | 不得默认,必须问(Meta 接口对窗口敏感) |
147
+ | 场景 | 允许的默认窗口 |
148
+ | ----------------------- | ----------------------------------------------------- |
149
+ | 日常投放巡检 / 余额扫描 | `now - 7d` ~ `now`(本地时间) |
150
+ | 周报 | 上一个完整自然周(周一 00:00 ~ 周日 23:59) |
151
+ | 月报 | 上一个完整自然月(1 号 ~ 月末) |
152
+ | Google 关键词/系列分析 | `now - 30d` ~ `now`(与 TSO Google 接口最小窗口对齐) |
153
+ | MetaAd 账户分析 | 不得默认,必须问(Meta 接口对窗口敏感) |
137
154
 
138
155
  ### 金额与货币单位硬约束
139
156
 
@@ -154,13 +171,14 @@ allowed-tools: Bash(siluzan-tso:*) Read
154
171
 
155
172
  以下情形**必须**使用批量 / 扫描命令而非循环单条调用,否则严重拖慢并易卡死:
156
173
 
157
- | 任务 | 推荐命令 | 禁止做法 |
158
- |------|----------|----------|
159
- | 多账户余额 / 预算不足预警 | `balance-scan -m <媒体> --threshold-days 7` | 逐账户循环 `balance --accounts ...` |
160
- | 多账户投放画像(消耗/点击/转化汇总) | `accounts-digest -m <媒体> [-a id1,id2] --start --end --json` | 对每个账户依次 `stats --id ...` |
161
- | 多系列诊断 | `ad campaigns --json` + node 过滤 | 逐系列 `ad campaign-get` |
174
+ | 任务 | 推荐命令 | 禁止做法 |
175
+ | ------------------------------------ | ------------------------------------------------------------- | ----------------------------------- |
176
+ | 多账户余额 / 预算不足预警 | `balance-scan -m <媒体> --threshold-days 7` | 逐账户循环 `balance --accounts ...` |
177
+ | 多账户投放画像(消耗/点击/转化汇总) | `accounts-digest -m <媒体> [-a id1,id2] --start --end --json` | 对每个账户依次 `stats --id ...` |
178
+ | 多系列诊断 | `ad campaigns --json` + node 过滤 | 逐系列 `ad campaign-get` |
162
179
 
163
180
  如果命令行尚未提供批量入口(例如 117 个 Bing 账户的"剩余天数"计算),应:
181
+
164
182
  1. 先用 `list-accounts -m BingV2 --json` 一次性拿到全量账户(含余额/日均消耗),**不要**逐账户轮询余额。
165
183
  2. 通过 `node -e` 在本地做 `剩余天数 = 余额 / 近 7 日日均消耗` 的计算并筛选阈值。
166
184
  3. 只对命中的账户再做后续写入操作。
@@ -168,6 +186,7 @@ allowed-tools: Bash(siluzan-tso:*) Read
168
186
  ### 运行时长与用户可见进度
169
187
 
170
188
  长任务(多账户、批量优化、报告生成)**必须**满足:
189
+
171
190
  - 预估超过 2 分钟的任务,开始前先告诉用户"预计耗时 X 分钟,将以 X 个账户一批处理"。
172
191
  - 每处理一批输出一行进度(例如 `已处理 20 / 117`)。
173
192
  - 处理超过 5 分钟仍未完成时,主动检查是否有必要降级(例如从"完整分析"降为"只筛阈值")并告知用户。
@@ -221,6 +240,7 @@ siluzan-tso balance-scan -m BingV2 --threshold-days 7 --json
221
240
  ```
222
241
 
223
242
  输出结构(`--json`):
243
+
224
244
  ```json
225
245
  {
226
246
  "ok": true,
@@ -230,6 +250,7 @@ siluzan-tso balance-scan -m BingV2 --threshold-days 7 --json
230
250
  ```
231
251
 
232
252
  硬规矩:
253
+
233
254
  - **绝对不要** `for id of ids { balance --accounts id }` 循环,会把 117 个账户拖成几十分钟。
234
255
  - 输出报告时按 `remainingDays` 升序(命令默认已排);金额展示用命令返回的 `balance`/`recommendedTopup` 数值 + `currencyCode`。
235
256
  - 若 `--verbose` 发现大量账户进入"僵尸账户(消耗过低)"分支,告诉用户这些账户没真正投放,不纳入预警。
@@ -252,6 +273,7 @@ siluzan-tso accounts-digest -m Google \
252
273
  - 不指定 `--start/--end` 时默认近 7 天;**SKILL 要求必须先与用户确认时间范围**,再把用户确认的区间带上。
253
274
 
254
275
  标准步骤:
276
+
255
277
  1. **反问时间范围**(P 级硬约束),拿到用户回复后再执行 `accounts-digest`。
256
278
  2. 如命令已返回 `--json`,直接基于其中 `data.items` 与 `meta.totals` 生成报告;**不要**再逐账户 `stats`。
257
279
  3. 跨币种账户:按 `item.currencyCode` 分表或在 meta.currencyNote 提示的前提下分币种小计。
@@ -270,8 +292,9 @@ siluzan-tso accounts-digest -m Google \
270
292
  ## 一些tips
271
293
 
272
294
  ### 账户ID示例
273
- 用于快速确定用户发送账号的类型,xxx是脱敏处理,一般主要通过位数就能确定账号类型,无法确定再查list-account -m [mediatype] -k [id]
274
- Google: 4545xxx137
295
+
296
+ 用于快速确定用户发送账号的类型,xxx是脱敏处理,一般主要通过位数就能确定账号类型,无法确定再查list-account -m [mediatype] -k [id]
297
+ Google: 454xxx5137 有些客户可能会发你270-xxx-0720 这种类型的,也是google账户,只不过使用时需要将数字间的-去掉 -> 270xxx0720
275
298
  Tiktok: 70083497xxx59820033
276
299
  Meta(Facebook): 1716030xxx734076, 6843984xxx14909, 479423xxx752348
277
300
  Bing: 138xxx763, 1882xxx80
@@ -279,7 +302,9 @@ Yandex: porg-uthxxxrk
279
302
  Kwai: act_1716030xxx734076
280
303
 
281
304
  ### 报告模板外部资源声明
305
+
282
306
  HTML 报告模板(`report-templates/*.html`)引用了以下外部 CDN 资源,渲染 HTML 报告时浏览器会发出对应的网络请求:
307
+
283
308
  - `cdn.tailwindcss.com` — Tailwind CSS(布局样式)
284
309
  - `cdnjs.cloudflare.com` — Font Awesome 6(图标)
285
310
  - `cdn.jsdelivr.net` — ECharts 5(图表)
@@ -288,12 +313,46 @@ HTML 报告模板(`report-templates/*.html`)引用了以下外部 CDN 资源
288
313
  如果处于离线环境或需要避免外部网络请求,请将上述资源下载到本地后修改模板中的引用路径。
289
314
 
290
315
  ### 容易出错http状态码
316
+
291
317
  - 400 Bad Request
292
- 参数错误,请你查看对应功能reference或使用-h了解命令行如何使用
318
+ 参数错误,请你查看对应功能reference或使用-h了解命令行如何使用
293
319
 
294
320
  - 401 Unauthorized
295
- 注意是平台方返回的还是我们自己返回的401,通常,平台方(google,bing, yandex,tiktok,kwai)返回的需要用户重新授权
296
- 如果是我们自己的接口返回的,则可以让用户 重新打开命令行执行 `siluzan-tso login`(详情请读取`references/setup.md`)
321
+ 注意是平台方返回的还是我们自己返回的401,通常,平台方(google,bing, yandex,tiktok,kwai)返回的需要用户重新授权
322
+ 如果是我们自己的接口返回的,则可以让用户 重新打开命令行执行 `siluzan-tso login`(详情请读取`references/setup.md`)
323
+
324
+ - 500
325
+ 大概率是服务可能正在部署或升级,可以让用户提交给Silizan相关人员
326
+
327
+ ---
328
+
329
+ ## 下面是一部分比较实用的自动化场景,当你回答完用户问题后,可以把下面的内容输出给用户,方便用户使用
330
+
331
+ 您可以选择以下的预警或提醒,输入需想要执行的内容核实规则即可配置。
332
+
333
+ ### 预算 & ROI 控制引擎
334
+
335
+ | 提醒名称 | 系统在后台默默帮你做什么?(自动动作) |
336
+ | ------------------- | --------------------------------------------------------- |
337
+ | 1. 单日预算熔断 | 每日消耗达到设定值,自动暂停计划,杜绝 Google 超额扣费。 |
338
+ | 2. CPA 飙升自动降价 | 光点不转化(如花费超过3倍目标成本),自动关停该条烂广告。 |
339
+ | 3. 连续空耗自动暂停 | 大盘流量变贵、获客成本飙高时,系统自动下调出价避险。 |
340
+
341
+ ### 异常监控与报警系统
342
+
343
+ | 功能名称 | 监控层级 / 说明 |
344
+ | ----------------- | ----------------------------------------------------------- |
345
+ | 1. 账户被封禁 | |
346
+ | 2. 落地页死链强停 | 网站宕机或链接填错,紧急自动暂停关联广告,防止把钱扔水里。 |
347
+ | 3. 广告素材拒审 | 发现被 Google 封号或快没钱了,立刻发送企微/钉钉高优强提醒。 |
348
+ | 4. 花费异动监控 | 花费突然暴涨或断崖式下跌,系统即时报警提示人工盯盘。 |
349
+ | 5. 余额枯竭预警 | 广告被 Google 拦截,系统自动帮你打包违规原因并定时推送。 |
350
+
351
+ ### 自动优化
297
352
 
298
- - 500
299
- 大概率是服务可能正在部署或升级,可以让用户提交给Silizan相关人员
353
+ | 功能名称 | 监控层级 |
354
+ | ----------------------- | -------------------------------------------------------------------------- |
355
+ | 1. 表现差广告降价/关停 | 发现转化极好的「好苗子」,以安全幅度自动涨预算/提价去抢量。 |
356
+ | 2. 高转化广告提价扩量 | 连续几天表现垫底的垃圾素材,系统扮演无情杀手自动关停。 |
357
+ | 3. A/B测试自动决出胜者 | 科学赛马,根据真实转化价值自动关停输家,把流量全给赢家。 |
358
+ | 4. 异动根因自动排查建议 | 老板问为什么成本翻倍?系统一键生成诊断报告(揪出外部竞对或内部操作失误)。 |
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "slug": "siluzan-tso",
3
- "version": "1.1.12",
4
- "publishedAt": 1776410305637
3
+ "version": "1.1.13",
4
+ "publishedAt": 1776762370285
5
5
  }
@@ -1,104 +1,99 @@
1
1
  {
2
- "account": "6326027735",
3
- "customerName": "账户显示名称(来自 list-accounts --json 的 mediaAccountName)",
4
- "name": "搜索-品牌词-2026",
5
- "budget": 100,
6
- "bidding": "TARGET_SPEND",
7
- "bidCeiling": 1.5,
8
- "locationIds": ["2840", "2826", "2036"],
9
- "languageIds": ["1000", "1017"],
10
- "startDate": "2026-04-01",
11
- "endDate": "2027-04-01",
12
- "url": "https://www.example.com",
13
- "status": "Enabled",
14
- "adgroupName": "核心词_品牌词",
15
- "maxCpc": 1.5,
16
- "matchType": "BROAD",
17
- "keywords": [
18
- "brand keyword 1",
19
- "brand keyword 2",
20
- "brand keyword 3"
21
- ],
22
- "headlines": [
23
- "Brand Name: Quality Products",
24
- "Trusted For Over 20 Years",
25
- "Global Reach, Local Impact",
26
- "Contact Us Today",
27
- "Request A Free Quote Now"
28
- ],
29
- "descriptions": [
30
- "Top-quality products with certified standards. Contact us today!",
31
- "Trusted by global partners. Request a free quote now!"
32
- ],
33
- "finalUrl": "https://www.example.com/products",
34
- "path1": "products",
35
- "path2": "2026",
36
- "productWords": ["brand", "product"],
37
- "negativeKeywords": [
38
- "free", "cheap", "wikipedia", "pdf", "ebay", "amazon"
39
- ],
40
- "extensions": [
41
- {
42
- "level": "Campaign",
43
- "typeV2": "CALL",
44
- "AssetFieldType": "CALL",
45
- "Properties": { "ContryCode": "CN", "PhoneNumber": "+86 400-XXX-XXXX" }
46
- },
47
- {
48
- "level": "Campaign",
49
- "typeV2": "SITELINK",
50
- "AssetFieldType": "SITELINK",
51
- "properties": {
52
- "DestinationUrl": "https://www.example.com/about",
53
- "Text": "About Us",
54
- "Line2": "Learn about our story",
55
- "Line3": "Explore our mission"
56
- }
57
- },
58
- {
59
- "level": "Campaign",
60
- "typeV2": "STRUCTURED_SNIPPET",
61
- "AssetFieldType": "STRUCTURED_SNIPPET",
62
- "StructuredSnippetHeaderValue": {
63
- "key": "Services",
64
- "value": ["Quality Certified", "Global Shipping", "24/7 Support"]
65
- }
2
+ "account": "6326027735",
3
+ "customerName": "账户显示名称(来自 list-accounts --json 的 mediaAccountName)",
4
+ "name": "搜索-品牌词-2026",
5
+ "budget": 100,
6
+ "bidding": "TARGET_SPEND",
7
+ "bidCeiling": 1.5,
8
+ "locationIds": ["2840", "2826", "2036"],
9
+ "languageIds": ["1000", "1017"],
10
+ "startDate": "2026-04-01",
11
+ "endDate": "2027-04-01",
12
+ "url": "https://www.example.com",
13
+ "status": "Enabled",
14
+ "adgroupName": "核心词_品牌词",
15
+ "maxCpc": 1.5,
16
+ "matchType": "BROAD",
17
+ "keywords": ["brand keyword 1", "brand keyword 2", "brand keyword 3"],
18
+ "headlines": [
19
+ "Brand Name: Quality Products",
20
+ "Trusted For Over 20 Years",
21
+ "Global Reach, Local Impact",
22
+ "Contact Us Today",
23
+ "Request A Free Quote Now"
24
+ ],
25
+ "descriptions": [
26
+ "Top-quality products with certified standards. Contact us today!",
27
+ "Trusted by global partners. Request a free quote now!"
28
+ ],
29
+ "finalUrl": "https://www.example.com/products",
30
+ "path1": "products",
31
+ "path2": "2026",
32
+ "productWords": ["brand", "product"],
33
+ "negativeKeywords": ["free", "cheap", "wikipedia", "pdf", "ebay", "amazon"],
34
+ "extensions": [
35
+ {
36
+ "level": "Campaign",
37
+ "typeV2": "CALL",
38
+ "AssetFieldType": "CALL",
39
+ "Properties": { "ContryCode": "CN", "PhoneNumber": "+86 400-XXX-XXXX" }
40
+ },
41
+ {
42
+ "level": "Campaign",
43
+ "typeV2": "SITELINK",
44
+ "AssetFieldType": "SITELINK",
45
+ "properties": {
46
+ "DestinationUrl": "https://www.example.com/about",
47
+ "Text": "About Us",
48
+ "Line2": "Learn about our story",
49
+ "Line3": "Explore our mission"
66
50
  }
67
- ],
68
- "extraAdGroups": [
69
- {
70
- "MaxCPCAmount": 150,
71
- "Name": "通用词_行业词",
72
- "StatusV2": "Enabled",
73
- "TypeV2": "SEARCH_STANDARD",
74
- "RotationModeV2": "Unspecified",
75
- "KeywordsForBatchJob": [
76
- {
77
- "KeywordText": ["industry keyword 1", "industry keyword 2"],
78
- "MatchTypeV2": "BROAD",
79
- "Finalurl": "https://www.example.com"
80
- }
81
- ],
82
- "AdsForBatchJob": [
83
- {
84
- "AdTitle": null,
85
- "DestinationUrl": "https://www.example.com",
86
- "Finalurl": "https://www.example.com",
87
- "Path1": "", "Path2": "",
88
- "TypeV2": "RESPONSIVE_SEARCH_AD",
89
- "headlinePart1": "Industry Leading Products",
90
- "headlinePart2": "Certified Quality Standards",
91
- "headlinePart3": "Get A Free Quote Today",
92
- "AddtionalHeadlines": [
93
- "Trusted By Global Partners",
94
- "20+ Years Of Experience",
95
- "Contact Us Now"
96
- ],
97
- "adDescription": "Top-quality industry products with global shipping. Contact us today!",
98
- "adDescription2": "Certified standards and reliable delivery. Request a quote now!"
99
- }
100
- ]
51
+ },
52
+ {
53
+ "level": "Campaign",
54
+ "typeV2": "STRUCTURED_SNIPPET",
55
+ "AssetFieldType": "STRUCTURED_SNIPPET",
56
+ "StructuredSnippetHeaderValue": {
57
+ "key": "Services",
58
+ "value": ["Quality Certified", "Global Shipping", "24/7 Support"]
101
59
  }
102
- ],
103
- "draft": false
104
- }
60
+ }
61
+ ],
62
+ "extraAdGroups": [
63
+ {
64
+ "MaxCPCAmount": 150,
65
+ "Name": "通用词_行业词",
66
+ "StatusV2": "Enabled",
67
+ "TypeV2": "SEARCH_STANDARD",
68
+ "RotationModeV2": "Unspecified",
69
+ "KeywordsForBatchJob": [
70
+ {
71
+ "KeywordText": ["industry keyword 1", "industry keyword 2"],
72
+ "MatchTypeV2": "BROAD",
73
+ "Finalurl": "https://www.example.com"
74
+ }
75
+ ],
76
+ "AdsForBatchJob": [
77
+ {
78
+ "AdTitle": null,
79
+ "DestinationUrl": "https://www.example.com",
80
+ "Finalurl": "https://www.example.com",
81
+ "Path1": "",
82
+ "Path2": "",
83
+ "TypeV2": "RESPONSIVE_SEARCH_AD",
84
+ "headlinePart1": "Industry Leading Products",
85
+ "headlinePart2": "Certified Quality Standards",
86
+ "headlinePart3": "Get A Free Quote Today",
87
+ "AddtionalHeadlines": [
88
+ "Trusted By Global Partners",
89
+ "20+ Years Of Experience",
90
+ "Contact Us Now"
91
+ ],
92
+ "adDescription": "Top-quality industry products with global shipping. Contact us today!",
93
+ "adDescription2": "Certified standards and reliable delivery. Request a quote now!"
94
+ }
95
+ ]
96
+ }
97
+ ],
98
+ "draft": false
99
+ }
@@ -8,6 +8,7 @@
8
8
  ---
9
9
 
10
10
  ## 默认做法
11
+
11
12
  1. **先确认统计区间**:除非用户已明确给出起止日期,否则**必须先反问**时间范围(例如"本月 1 号到昨天?还是自定义 YYYY-MM-DD 起止?"),**不得擅自默认**(参见 SKILL.md 的"时间范围强制反问")。
12
13
  2. 询问用户需要生成哪些维度的报告,或直接生成默认报告:包含以下维度:执行摘要、每日投放趋势、月度汇总、广告系列表现、设备分布、地域分布、关键词表现、优化建议
13
14
  3. 确定报告需要如何分析请查看(`report-templates/README.md`)
@@ -30,6 +31,7 @@
30
31
  3. 用户仅提供网址时:**使用域名本身作为占位**(例如 `hy-steelpipe.com`),并在交付物里用 `[待确认品牌名]` 标注,让用户补充
31
32
 
32
33
  反面案例(**绝对禁止**):
34
+
33
35
  - `https://hy-steelpipe.com/` → 自行臆造成"华悦钢管 / 海悦钢管"
34
36
  - `list-accounts` 拿到 `advertiserName: "ABC Steel"`,报告里写成"ABC 钢铁公司"
35
37
 
@@ -50,16 +52,16 @@
50
52
 
51
53
  多条报表行的原始体里,消耗类指标常用下列字段名(调用方若要做统一展示,可按此对照;**以实际响应为准**):
52
54
 
53
- | 常见展示名 | 响应中常见字段名 |
54
- |------------|------------------|
55
- | 消耗 | `spend` |
56
- | 展示 | `impressions` |
57
- | 点击 | `clicks` |
58
- | 转化 | `conversions` |
59
- | 点击率 | `ctr` |
60
- | 转化率 | `conversionRate` |
61
- | 平均点击成本 | `averageCpc` |
62
- | 转化成本 | `costPerConversion` |
55
+ | 常见展示名 | 响应中常见字段名 |
56
+ | ------------ | ------------------- |
57
+ | 消耗 | `spend` |
58
+ | 展示 | `impressions` |
59
+ | 点击 | `clicks` |
60
+ | 转化 | `conversions` |
61
+ | 点击率 | `ctr` |
62
+ | 转化率 | `conversionRate` |
63
+ | 平均点击成本 | `averageCpc` |
64
+ | 转化成本 | `costPerConversion` |
63
65
 
64
66
  ---
65
67
 
@@ -73,38 +75,38 @@ siluzan-tso google-analysis <子命令> -a <mediaCustomerId> [选项]
73
75
 
74
76
  **通用选项**
75
77
 
76
- | 选项 | 说明 |
77
- |------|------|
78
- | `-a, --account` | Google `mediaCustomerId`(必填) |
78
+ | 选项 | 说明 |
79
+ | ------------------- | --------------------------------------------------------- |
80
+ | `-a, --account` | Google `mediaCustomerId`(必填) |
79
81
  | `--start` / `--end` | 统计区间;**须同传或同省略**(省略则默认近 7 天截至昨天) |
80
- | `--json` | 输出完整响应 JSON |
81
- | `-t, --token` | 鉴权 Token(可选,默认读配置) |
82
- | `--verbose` | 打印详细错误 |
82
+ | `--json` | 输出完整响应 JSON |
83
+ | `-t, --token` | 鉴权 Token(可选,默认读配置) |
84
+ | `--verbose` | 打印详细错误 |
83
85
 
84
86
  **子命令与网关路径对应**
85
87
 
86
- | 子命令 | 说明 |
87
- |--------|------|
88
- | `overview` | 总览 `OverviewSectionData` |
89
- | `keywords` | 关键词 `KeywordSectionData`;可选 `--limit`、`--no-order-by-cost` |
90
- | `search-terms` | 搜索词 `searchtermmanagement/v2/list`;同上 |
91
- | `campaigns` | 系列 `CampaignSectionData` |
92
- | `ads` | 广告 `admanagement/v2/list` |
93
- | `extensions` | 附加信息 `extensionmanagement/v2/list`;可选 `--level`(Account / Campaign / Ad Group) |
94
- | `devices` | 设备 `DeviceSectionData` |
95
- | `geographic` | 地域 `GeographicSectionData` |
96
- | `audience` | 受众 `AdGroupAudienceData`;可选 `--audience-type SystemDefined \| UserDefined` |
97
- | `asset-images` | 图片素材 `CampaignAssetView` |
98
- | `videos` | 视频 `Videos` |
99
- | `materials` | 合并 `CampaignAssetView` + `Videos`(一次输出 `{ images, videos }`) |
100
- | `resource-counts` | 结构 `resource-counts` |
101
- | `conversion-actions` | 转化动作 |
102
- | `daily-metrics` | 按日 `reports` |
103
- | `gold-account` | 黄金账户 `GoldAccountData` |
104
- | `ads-index` | 质量指标 `AdsIndexData` |
105
- | `final-urls` | 最终到达网址(**不要**传 `--start`/`--end`) |
106
- | `dimension-summary` | 账户汇总 `reports/combined` |
107
- | `campaign-types` | 系列类型(**不要**传 `--start`/`--end`) |
88
+ | 子命令 | 说明 |
89
+ | -------------------- | --------------------------------------------------------------------------------------- |
90
+ | `overview` | 总览 `OverviewSectionData` |
91
+ | `keywords` | 关键词 `KeywordSectionData`;可选 `--limit`、`--no-order-by-cost` |
92
+ | `search-terms` | 搜索词 `searchtermmanagement/v2/list`;同上 |
93
+ | `campaigns` | 系列 `CampaignSectionData` |
94
+ | `ads` | 广告 `admanagement/v2/list` |
95
+ | `extensions` | 附加信息 `extensionmanagement/v2/list`;可选 `--level`(Account / Campaign / Ad Group) |
96
+ | `devices` | 设备 `DeviceSectionData` |
97
+ | `geographic` | 地域 `GeographicSectionData` |
98
+ | `audience` | 受众 `AdGroupAudienceData`;可选 `--audience-type SystemDefined \| UserDefined` |
99
+ | `asset-images` | 图片素材 `CampaignAssetView` |
100
+ | `videos` | 视频 `Videos` |
101
+ | `materials` | 合并 `CampaignAssetView` + `Videos`(一次输出 `{ images, videos }`) |
102
+ | `resource-counts` | 结构 `resource-counts` |
103
+ | `conversion-actions` | 转化动作 |
104
+ | `daily-metrics` | 按日 `reports` |
105
+ | `gold-account` | 黄金账户 `GoldAccountData` |
106
+ | `ads-index` | 质量指标 `AdsIndexData` |
107
+ | `final-urls` | 最终到达网址(**不要**传 `--start`/`--end`) |
108
+ | `dimension-summary` | 账户汇总 `reports/combined` |
109
+ | `campaign-types` | 系列类型(**不要**传 `--start`/`--end`) |
108
110
 
109
111
  **示例**
110
112
 
@@ -134,17 +136,17 @@ siluzan-tso report meta-overview -a <mediaCustomerId> [--start YYYY-MM-DD --end
134
136
 
135
137
  与周期报告常见数据块对应关系见 **`report-templates/tiktok-period-report.md`**。
136
138
 
137
- | 子命令 | HTTP 段 / 说明 |
138
- |--------|----------------|
139
- | `report tiktok-overview` | `.../OverviewSectionData?startDate=&endDate=` |
140
- | `report tiktok-campaigns` | `.../CampaignSectionData?startDate=&endDate=&take=`(默认 `take=100`) |
141
- | `report tiktok-ad-groups` | `.../AdGroupReport?...` |
142
- | `report tiktok-ads` | `.../AdReport?...` |
143
- | `report tiktok-videos` | `.../VideoReport?...` |
144
- | `report tiktok-audience` | `.../AudienceReport?...&dimensions=` + `-d` 取值见 CLI 帮助(gender / age / interest_category 等) |
145
- | `report tiktok-audience-merged` | 同上接口三次(`gender`、`age`、`interest_category`),**合并输出 JSON** |
146
- | `report tiktok-areacode` | `GET {mainApiUrl}/query/media-account/tiktok/TikTokAreacode/Read` |
147
- | `report tiktok-interest-list` | `{tiktokApiUrl}/.../GetInterestList?mediaCustomerId=`(需配置 `tiktokApiUrl`) |
139
+ | 子命令 | HTTP 段 / 说明 |
140
+ | ------------------------------- | -------------------------------------------------------------------------------------------------- |
141
+ | `report tiktok-overview` | `.../OverviewSectionData?startDate=&endDate=` |
142
+ | `report tiktok-campaigns` | `.../CampaignSectionData?startDate=&endDate=&take=`(默认 `take=100`) |
143
+ | `report tiktok-ad-groups` | `.../AdGroupReport?...` |
144
+ | `report tiktok-ads` | `.../AdReport?...` |
145
+ | `report tiktok-videos` | `.../VideoReport?...` |
146
+ | `report tiktok-audience` | `.../AudienceReport?...&dimensions=` + `-d` 取值见 CLI 帮助(gender / age / interest_category 等) |
147
+ | `report tiktok-audience-merged` | 同上接口三次(`gender`、`age`、`interest_category`),**合并输出 JSON** |
148
+ | `report tiktok-areacode` | `GET {mainApiUrl}/query/media-account/tiktok/TikTokAreacode/Read` |
149
+ | `report tiktok-interest-list` | `{tiktokApiUrl}/.../GetInterestList?mediaCustomerId=`(需配置 `tiktokApiUrl`) |
148
150
 
149
151
  **日期与鉴权**:`--start` / `--end` 须**同传或同省略**;省略时默认**近 7 天(截至昨天)**。鉴权与 TSO 其他接口相同。
150
152
 
@@ -166,19 +168,19 @@ siluzan-tso report tiktok-areacode --json
166
168
 
167
169
  **重要(日期)**:Bing 报表**不能包含「今天」或「昨天」**(接口限制,与 Web 端校验一致)。`--start` / `--end` 须**同传或同省略**;**省略时** CLI 默认区间为**截至前天**的近 7 天(避免误含昨天)。
168
170
 
169
- | 子命令 | HTTP 段 / 说明 |
170
- |--------|----------------|
171
- | `report bing-overview` | `.../OverviewSectionData?startDate=&endDate=` |
172
- | `report bing-device` | `.../DeviceSectionData?...` |
173
- | `report bing-geographic` | `.../GeographicSectionData?...` |
174
- | `report bing-age-audience` | `.../AgeAudienceData?...` |
175
- | `report bing-gender-audience` | `.../GenderAudienceData?...` |
176
- | `report bing-audience-merged` | 上两项并行拉取,**合并输出 JSON** |
177
- | `report bing-campaigns` | `.../CampaignReport?...` |
178
- | `report bing-ad-groups` | `.../AdGroupReport?...` |
179
- | `report bing-ads` | `.../AdReport?...` |
180
- | `report bing-keywords` | `.../KeywordReport?startDate=&endDate=&limit=&orderByCost=true`(默认 `limit=100`) |
181
- | `report bing-search-terms` | `.../SearchQueryReport?...`(同上) |
171
+ | 子命令 | HTTP 段 / 说明 |
172
+ | ----------------------------- | ----------------------------------------------------------------------------------- |
173
+ | `report bing-overview` | `.../OverviewSectionData?startDate=&endDate=` |
174
+ | `report bing-device` | `.../DeviceSectionData?...` |
175
+ | `report bing-geographic` | `.../GeographicSectionData?...` |
176
+ | `report bing-age-audience` | `.../AgeAudienceData?...` |
177
+ | `report bing-gender-audience` | `.../GenderAudienceData?...` |
178
+ | `report bing-audience-merged` | 上两项并行拉取,**合并输出 JSON** |
179
+ | `report bing-campaigns` | `.../CampaignReport?...` |
180
+ | `report bing-ad-groups` | `.../AdGroupReport?...` |
181
+ | `report bing-ads` | `.../AdReport?...` |
182
+ | `report bing-keywords` | `.../KeywordReport?startDate=&endDate=&limit=&orderByCost=true`(默认 `limit=100`) |
183
+ | `report bing-search-terms` | `.../SearchQueryReport?...`(同上) |
182
184
 
183
185
  **示例**
184
186