@optima-chat/optima-agent 0.9.16 → 0.9.18

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.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: scout
3
- description: "Interactive Amazon product research consultant with 1688 supplier sourcing and Keepa historical data. Search products, analyze markets, find suppliers (by keyword or image), track price/BSR history, and generate professional reports. ALWAYS use when user asks about: selling products (卖/开店), product ideas (产品/商品), market research (市场/竞品), suppliers (供应商/厂家), sourcing (采购/进货/货源), image search (图片找货/以图搜货/找同款), evaluating business opportunities (生意/创业), product trends (趋势/走势), price history (价格历史/价格变化), BSR ranking (排名/销量排名), product lifecycle (生命周期/增长期/衰退期). Uses 'scout search', 'scout product', 'scout keepa *', 'scout supplier-search', and 'scout supplier-search-image' commands."
3
+ description: "Interactive Amazon product research consultant with 1688 supplier sourcing and Keepa historical data. Search products, analyze markets, deep-dive reviews for pain points, find suppliers (by keyword or image), track price/BSR history, and generate professional reports. ALWAYS use when user asks about: selling products (卖/开店), product ideas (产品/商品), market research (市场/竞品), reviews/pain points (评论/差评/痛点/用户反馈), suppliers (供应商/厂家), sourcing (采购/进货/货源), image search (图片找货/以图搜货/找同款), evaluating business opportunities (生意/创业), product trends (趋势/走势), price history (价格历史/价格变化), BSR ranking (排名/销量排名), product lifecycle (生命周期/增长期/衰退期). Uses 'scout search', 'scout product', 'scout reviews', 'scout keepa *', 'scout supplier-search', and 'scout supplier-search-image' commands."
4
4
  ---
5
5
 
6
6
  # Optima Scout - AI Product Research
@@ -139,7 +139,43 @@ scout product ASIN
139
139
  - **Images count** - 7 is standard, fewer = poor optimization
140
140
  - **Specifications** - May include BSR in multiple categories
141
141
 
142
- ### 3. Search 1688 Suppliers (Keyword): `scout supplier-search`
142
+ ### 3. Get Product Reviews: `scout reviews`
143
+
144
+ Fetch Amazon product reviews with pagination. Use for deep pain-point analysis beyond the 8-13 top_reviews returned by `scout product`.
145
+
146
+ **Syntax:**
147
+ ```bash
148
+ scout reviews ASIN # 默认 3 页 (~30 条)
149
+ scout reviews ASIN --pages 10 # 最多 10 页 (~100 条)
150
+ scout reviews ASIN --star one_star # 只看 1 星差评
151
+ scout reviews ASIN --all-stars --pages 5 # 每个星级各 5 页 (~250 条)
152
+ scout reviews ASIN --verified # 只看 verified purchase
153
+ scout reviews ASIN --sort helpful # 按 helpful 排序
154
+ ```
155
+
156
+ **Parameters:**
157
+ - `ASIN`: 10-character Amazon product ID
158
+ - `--pages`: Number of pages per request (1-10, default: 3, ~10 reviews/page)
159
+ - `--sort`: `recent` (default) or `helpful`
160
+ - `--star`: Filter by star rating (`one_star` ~ `five_star`)
161
+ - `--all-stars`: Fetch all 5 star ratings in one batch (max ~500 reviews)
162
+ - `--verified`: Only verified purchase reviews
163
+ - `--domain`: Amazon domain code (default: com)
164
+ - `--format`: `json` (default) or `text`
165
+
166
+ **Returns:**
167
+ - Review list: id, title, body, rating, date, verified, helpful_votes, images
168
+ - Product summary: title, rating, total_ratings, rating_breakdown (percentages)
169
+
170
+ **When to use:**
171
+ - `scout product` gives 8-13 top_reviews — enough for quick scan
172
+ - `scout reviews` gives 30-500 reviews — use for **deep pain-point analysis**, sentiment clustering, and improvement opportunity identification
173
+ - **痛点分析**:`scout reviews ASIN --star one_star --pages 5` 拉差评做聚类
174
+ - **竞品评论对比**:分别拉两个竞品的差评,找差异化机会
175
+
176
+ **Cost awareness:** Each page costs ~$0.0075 Apify credits. `--all-stars --pages 10` (~500 reviews) costs ~$0.38.
177
+
178
+ ### 4. Search 1688 Suppliers (Keyword): `scout supplier-search`
143
179
 
144
180
  Search for suppliers on 1688.com using keywords.
145
181
 
@@ -165,7 +201,7 @@ scout supplier-search "KEYWORD" --limit NUMBER
165
201
  - Years in business (8+ years = established)
166
202
  - Return rate (lower = better, typical: 30-50%)
167
203
 
168
- ### 4. Search 1688 Suppliers (Image): `scout supplier-search-image`
204
+ ### 5. Search 1688 Suppliers (Image): `scout supplier-search-image`
169
205
 
170
206
  Search for suppliers on 1688.com using product images - perfect for finding sources for products you see on Amazon, Shopify, or other platforms.
171
207
 
@@ -293,37 +329,40 @@ scout keepa tokens
293
329
 
294
330
  **Phase 2: Deep Dive & Refinement**
295
331
  4. **Targeted Analysis** → Based on user feedback, run `scout product` on relevant ASINs
296
- 5. **Historical Trend Analysis** → Run `scout keepa product ASIN1,ASIN2,ASIN3 --stats 180` to get historical data
297
- 6. **Extract Insights** → Combine realtime + historical data:
332
+ 5. **Deep Review Analysis** → Run `scout reviews ASIN --star one_star --pages 5` to extract pain points, then `scout reviews ASIN --sort helpful --pages 3` to see most impactful reviews
333
+ 6. **Historical Trend Analysis** → Run `scout keepa product ASIN1,ASIN2,ASIN3 --stats 180` to get historical data
334
+ 7. **Extract Insights** → Combine realtime + historical + review data:
298
335
  - BSR trend → 增长期/成熟期/衰退期?
299
336
  - `salesRankDrops30/90` → 估算月销量
300
337
  - 价格历史 → 利润空间稳定吗?有价格战吗?
301
338
  - 卖家数量变化 → 竞争在加剧吗?
302
- 7. **Iterate & Explore** User may request different keywords, specific competitor analysis, or alternative product categories
339
+ - 差评聚类用户核心痛点是什么?能改进吗?
340
+ - 好评亮点 → 用户最看重什么功能?
341
+ 8. **Iterate & Explore** → User may request different keywords, specific competitor analysis, or alternative product categories
303
342
 
304
343
  **Phase 2.5: Supplier Sourcing (Optional but Recommended)**
305
- 8. **Trigger**: User shows interest in costs/sourcing, or after market validation
344
+ 9. **Trigger**: User shows interest in costs/sourcing, or after market validation
306
345
  - "成本大概多少?" "批发价怎么样?" "利润空间大吗?"
307
346
  - "哪里进货?" "供应商怎么找?"
308
347
  - "这个图片能找到货源吗?" "Amazon这个能在1688找到吗?"
309
348
 
310
- 9. **Choose search method**:
349
+ 10. **Choose search method**:
311
350
  - **With image**: `scout supplier-search-image "https://..."` ← More accurate for visual products
312
351
  - **With keyword**: `scout supplier-search "产品关键词"`
313
352
  - **Best practice**: Try both and compare results
314
353
 
315
- 10. **Share Findings**:
354
+ 11. **Share Findings**:
316
355
  - Wholesale price range (e.g., ¥429-599)
317
356
  - MOQ (minimum order quantity)
318
357
  - Profit margin calculation: Amazon price ($60-80) - 1688 cost (¥429 ≈ $60) - shipping ($10-15)
319
358
  - Supplier quality indicators (years in business, certifications)
320
359
 
321
- 11. **Ask**: "要不要我详细分析几个供应商?" or proceed to report
360
+ 12. **Ask**: "要不要我详细分析几个供应商?" or proceed to report
322
361
 
323
362
  **Phase 3: Report Generation (Proactive Suggestion)**
324
- 12. **Gauge Completion** → After sufficient data, suggest: "要不要我整理成一份完整的市场分析报告?"
325
- 13. **Generate Report** → Create comprehensive markdown report with all findings
326
- 14. **Save & Iterate** → Offer to save report and refine based on feedback
363
+ 13. **Gauge Completion** → After sufficient data, suggest: "要不要我整理成一份完整的市场分析报告?"
364
+ 14. **Generate Report** → Create comprehensive markdown report with all findings
365
+ 15. **Save & Iterate** → Offer to save report and refine based on feedback
327
366
 
328
367
  ---
329
368
 
@@ -332,9 +371,10 @@ scout keepa tokens
332
371
  When user explicitly requests a report upfront:
333
372
  1. Run 3-4 diverse keyword searches
334
373
  2. Analyze top 3-5 products with `scout product`
335
- 3. Pull historical trends with `scout keepa product` (batch ASINs)
336
- 4. Search 1688 suppliers (image + keyword)
337
- 5. Generate comprehensive report directly
374
+ 3. Deep review analysis: `scout reviews ASIN --star one_star --pages 5` on top competitors
375
+ 4. Pull historical trends with `scout keepa product` (batch ASINs)
376
+ 5. Search 1688 suppliers (image + keyword)
377
+ 6. Generate comprehensive report directly
338
378
 
339
379
  ### Multi-Keyword Research Strategy
340
380
 
@@ -420,10 +460,10 @@ scout product B0788F3R8X
420
460
  - Product description completeness
421
461
  - A+ content presence
422
462
  - ✅ **User Feedback Deep-Dive**
423
- - Top 3 positive mentions (from top_reviews)
424
- - Top 3 complaints/pain points (from top_reviews)
425
- - Improvement opportunities
426
- - Common feature requests
463
+ - Quick scan: `scout product` top_reviews (8-13 条精选)
464
+ - Deep dive: `scout reviews ASIN --star one_star --pages 5` (差评痛点聚类)
465
+ - Top 3 positive mentions and top 3 complaints
466
+ - Improvement opportunities and common feature requests
427
467
  - ✅ **Competitive Advantages**
428
468
  - Unique selling points in feature_bullets
429
469
  - Price positioning vs. competitors
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: video-edit
3
- description: "剪辑用户【已有的】口播视频——去除卡顿停顿、NG 重拍、口头禅让视频更流畅紧凑。
3
+ description: "剪辑用户【已有的】口播视频——你直接重写成片应该说什么的脚本,系统用文本对齐回原始音频时间戳。
4
4
 
5
5
  必备前提:用户已经有视频文件(拍好的、上传的、或给出文件路径)。
6
6
 
@@ -8,13 +8,13 @@ description: "剪辑用户【已有的】口播视频——去除卡顿停顿、
8
8
  '剪辑'/'剪短点'/'加字幕'/'cut'/'edit'/'trim'/'让视频更紧凑'。"
9
9
  ---
10
10
 
11
- # Video-Edit Skill — 让视频变流畅
11
+ # Video-Edit Skill — Descript 模式:你写脚本,系统对齐
12
12
 
13
13
  用户给原始视频,你交付剪好的成片。
14
14
 
15
15
  ## 用户怎么说,你交付什么
16
16
 
17
- **默认所有剪辑都带字幕**——中文短视频(TikTok / 小红书 / 视频号)99% 需要字幕,"剪一下"的潜台词就是"给我能直接发的成片"。
17
+ **默认所有剪辑都带字幕**——中文短视频 99% 需要字幕,"剪一下"的潜台词就是"给我能直接发的成片"。
18
18
 
19
19
  | 用户说 | 你交付 |
20
20
  |---|---|
@@ -26,65 +26,70 @@ description: "剪辑用户【已有的】口播视频——去除卡顿停顿、
26
26
  只有当用户提到平台但**没说目标时长**时(如"剪成 TikTok"无时长),才追问"目标多长?"。
27
27
  其他情况**直接动手**,不要废话。
28
28
 
29
- ## 核心原则:你是语义剪辑器
29
+ ## 核心原则:你直接写最终脚本
30
30
 
31
- cut 工具**只能删静音**(>=0.25s 的停顿),它**永远删不了**这些:
32
- - NG 重拍(重新说一遍同一句)
33
- - 重复字("我我我",发声不停顿)
34
- - 口头禅("嗯"/"啊"/"那个"/"就是")
35
- - 跑题片段(语法完整但内容废)
31
+ 剪辑工具有两种模式:
32
+ - **旧模式(`cut`)**:在 proposal 里给短语标 `#` 删除——只能删整段
33
+ - **新模式(`smart-cut`)✅ 默认用这个**:你直接写"成片应该说什么",系统找原始音频里对应的位置剪出来
36
34
 
37
- **所以你必须自己审一遍 proposal**——你就是这个流程的语义剪辑器。如果跳过审片直接出片,成片会有大量 NG/口头禅/重复,用户会觉得"非常多卡顿"。
35
+ 新模式的杀手锏是:你**不受短语边界限制**,可以:
36
+ - 跳过填充词("嗯"/"那个")
37
+ - NG 重拍中只保留你认为最好那遍
38
+ - 把同一句话的不同片段拼起来
39
+ - 保留某句的前半 + 另一句的后半
40
+
41
+ **约束**:
42
+ - 不能凭空造内容——脚本里的字必须出自原始转写,否则匹配不上
43
+ - 不能调换顺序——内容按原片时间顺序保留
44
+ - 字面错别字会"匹不上"被丢——必须用转写文本里的原字(whisper 怎么识的就怎么写)
38
45
 
39
46
  ## 你的内部流程
40
47
 
41
48
  ### 默认剪辑(剪 + 字幕,最常见)
42
49
 
43
- 四步走:
44
-
45
50
  ```bash
46
51
  video-edit analyze <video>
47
52
  ```
48
53
 
49
- 读 `<video>.work/cut_proposal.md`。每行是一个短语,看每行决定保留还是删除:
54
+ 读 `<video>.work/cut_proposal.md` 了解原片内容(每行是个短语单元,带时间戳和文本)。
55
+
56
+ 然后基于这些短语,**自己写一份最终脚本**到 `<video>.work/final_script.txt`:
57
+
58
+ ```
59
+ (最终成片应该说的话,纯文本,不用时间戳)
60
+ (可以是几段,用换行分隔)
61
+ ```
50
62
 
51
- - **删(行首加 `#`)**:
52
- - 单独的口头禅 phrase""/"啊"/"呃"/"那个"/"就是"/"对吧"/"然后那个"
53
- - NG 重拍:相邻两行说同一件事但措辞稍变("我们要做的就是——我们要做的是"),**留最后一遍**(通常最干净)
54
- - 字面重复:"我我我"/"那那那"
55
- - 跑题/废话:与主题无关的旁白、自语、笑场
56
- - 太短的连接词单独成行(如只有"那"/"嗯啊")
57
- - **留**:所有有信息量的句子
63
+ 写脚本时的判断:
64
+ - 原片每个 phrase,问自己"这句话进成片吗"——进就把内容(用 proposal 里的原文)写进脚本
65
+ - 同一意思被讲多遍(NG 重拍)——只写一遍,挑最流畅那遍的措辞
66
+ - 填充词/单字口头禅/跑题——直接不写
67
+ - 整段废话/犹豫——直接不写
68
+ - **必须用原文措辞**,不要润色或改写——否则匹配不上
58
69
 
59
- 按上述规则编辑 proposal,保存。然后:
70
+ 写完后:
60
71
 
61
72
  ```bash
62
- video-edit cut <video>
73
+ video-edit smart-cut <video>
63
74
  video-edit subtitle <video>
64
75
  ```
65
76
 
66
- `cut` 按你标注的 proposal 剪辑,`subtitle` 对成片重新转写并烧字幕。
77
+ `smart-cut` difflib 把脚本对齐回原始 word 时间戳,自动剪掉所有未匹中的部分。
78
+ `subtitle` 对成片重新转写并烧字幕。
67
79
 
68
80
  ### 用户要求调整时
69
81
 
70
82
  用户看完成片说某段不对:
71
- 1. 重新读 `<video>.work/cut_proposal.md`
72
- 2. 调整对应行(`#` 注释 = 删除,去掉 `#` = 保留)
73
- 3. 删除 `<video>.work/subs.ass`(让 subtitle 重新生成)
74
- 4. 重跑:
75
- ```bash
76
- video-edit cut <video>
77
- video-edit subtitle <video>
78
- ```
79
-
80
- 这两步纯本地(不调 whisper),几秒完成。
83
+ 1. 编辑 `<video>.work/final_script.txt`(加/删内容)
84
+ 2. `<video>.work/subs.ass`
85
+ 3. 重跑 `smart-cut` + `subtitle`
81
86
 
82
87
  ### 限时长精剪(用户给了目标时长)
83
88
 
84
- `analyze` 审 proposal 时**额外做这些**:
85
- - 找钩子句放最前
89
+ final_script 时**额外做这些**:
90
+ - 估算字数:中文口播 ~3-4 字/秒,30 秒约 90-120 字
91
+ - 找钩子句放最前面(脚本开头那段)
86
92
  - 压到目标时长(更激进地删)
87
- - 其余流程同上
88
93
 
89
94
  ### 仅字幕(用户明确说不剪)
90
95
 
@@ -92,53 +97,53 @@ video-edit subtitle <video>
92
97
  video-edit subtitle <video>
93
98
  ```
94
99
 
95
- 没有 `_edited.mp4` 时,命令直接对原片烧字幕,输出 `<原片>_subbed.mp4`。
100
+ 没有 `_edited.mp4` 时,命令直接对原片烧字幕。
96
101
 
97
102
  ### 无字幕版(用户明确说不要字幕)
98
103
 
99
104
  ```bash
100
105
  video-edit analyze <video>
101
- # proposal 标 #
102
- video-edit cut <video>
106
+ # final_script.txt
107
+ video-edit smart-cut <video>
103
108
  ```
104
109
 
105
- 交付 `<原片>_edited.mp4`,不跑 subtitle。
110
+ 不跑 subtitle,交付 `<原片>_edited.mp4`。
106
111
 
107
- ## 审片心法
112
+ ## 写脚本的心法
108
113
 
109
- 读 proposal 时**不要逐行纠结**——每行 1 秒判断,按这个决策树:
114
+ 读 proposal 时**逐 phrase 判断**:
115
+ 1. 这句进成片吗?进 → 把 phrase 文本贴到 final_script
116
+ 2. 这句和前后哪句重复?只留一遍
117
+ 3. 这句是填充词/口头禅?跳过
118
+ 4. 这句跑题?跳过
110
119
 
111
- 1. 这行只有口头禅/单字 `#`
112
- 2. 这行跟前一行/后一行说同一件事 → 留信息量最高的那遍
113
- 3. 这行内容跟主题无关 → `#`
114
- 4. 其他 → 留
120
+ **关键纪律**:脚本里的字**必须**来自原始转写——直接复制 proposal 里的 phrase 文本最稳。
121
+ 你想怎么润色都不行(系统按字符匹配,改了字就匹不上)。
115
122
 
116
- **追求"看着不卡",不追求 100% 完美**。删多了用户会说"这句要留",你再调;删少了成片很卡,用户体验更差。**宁可激进一点**。
123
+ **追求"看着不卡",宁可激进**。删多了用户能要求加回来,删少了用户体验差。
117
124
 
118
125
  ## 交付怎么说
119
126
 
120
127
  简洁,**只说结果**:
121
128
 
122
129
  - ✅ "剪好了,xxx_subbed.mp4,时长 23 秒"
123
- - "无字幕版剪好了,xxx_edited.mp4,时长 23 "
124
- - ❌ "我用了 video-edit analyze,然后编辑了 cut_proposal.md..."
125
- - ❌ "审片删了 8 行 NG..."
130
+ - "我用了 video-edit smart-cut,写了 final_script.txt..."
126
131
 
127
132
  ## 不要做的事
128
133
 
129
- - ❌ 跳过审 proposal 直接 `both` 出片——必有大量卡顿
130
- - ❌ 用户说"剪一下"就追问平台/钩子/时长——按默认流程动手
131
- - ❌ 用户说"剪一下"只交付 `_edited.mp4` 不烧字幕——**默认带字幕**
132
- - ❌ 把命令名、cut_proposal.md 路径暴露给用户——内部实现细节
133
- - ❌ 编造命令(仅 5 个:both / analyze / cut / review / subtitle)
134
+ - ❌ 跳过 final_script 直接 smart-cut——会失败(找不到脚本文件)
135
+ - ❌ 在脚本里写转写以外的字——匹配不上,那部分会被丢
136
+ - ❌ `both` 或 `cut`——已弃用,质量差
137
+ - ❌ 把命令名/路径暴露给用户——内部细节
134
138
  - ❌ 用户说"剪掉前 X 秒"/"剪掉中间一段"——定点裁剪不是去卡顿,告诉用户"我擅长去卡顿停顿,定点裁剪请用别的方式"
135
139
 
136
140
  ## 命令参考(你内部用)
137
141
 
138
142
  | 命令 | 用途 |
139
143
  |---|---|
140
- | `video-edit analyze <video>` | 转写 + 生成 proposal(**默认入口**,审完后跑 cut) |
141
- | `video-edit cut <video>` | 按 proposal 剪辑,生成 `_edited.mp4` |
144
+ | `video-edit analyze <video>` | 转写 + 静音检测 + 生成 proposal(**默认入口**)|
145
+ | `video-edit smart-cut <video>` | 按 final_script.txt 对齐剪辑(**默认主力**)|
142
146
  | `video-edit subtitle <video>` | 对成片重新转写 + 烧字幕,输出 `<原片>_subbed.mp4` |
143
- | `video-edit both <video>` | analyze + cut 一步到位(**已弃用**:跳过审片质量差) |
144
- | `video-edit review <video>` | 诊断用:检查 `_edited.mp4`,输出 review_report.md |
147
+ | `video-edit cut <video>` | 旧模式:按 proposal `#` 标记剪辑(弃用,质量差)|
148
+ | `video-edit both <video>` | 旧模式:analyze + cut 一步到位(弃用,跳过审片)|
149
+ | `video-edit review <video>` | 诊断用:检查 `_edited.mp4` |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@optima-chat/optima-agent",
3
- "version": "0.9.16",
3
+ "version": "0.9.18",
4
4
  "description": "基于 Claude Agent SDK 的电商运营 AI 助手",
5
5
  "type": "module",
6
6
  "main": "dist/src/index.js",