@optima-chat/scout-cli 0.1.2 → 0.1.3
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.
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +246 -66
- package/dist/commands/init.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAyPpC,eAAO,MAAM,WAAW,SAuDpB,CAAC"}
|
package/dist/commands/init.js
CHANGED
|
@@ -5,67 +5,245 @@ import { join } from 'path';
|
|
|
5
5
|
* Skills templates for Claude Code
|
|
6
6
|
*/
|
|
7
7
|
const SKILLS_TEMPLATES = {
|
|
8
|
-
'
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
8
|
+
'optima-scout.md': `---
|
|
9
|
+
name: optima-scout
|
|
10
|
+
description: "AI-powered Amazon product research for market analysis and product selection. Use when user asks about product ideas, market research, business opportunities, or competitive analysis. Provides search, detailed product data, pricing, sales metrics, and market insights."
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Optima Scout - AI Product Research
|
|
14
|
+
|
|
15
|
+
## When to Use This Skill
|
|
16
|
+
|
|
17
|
+
Use this skill when:
|
|
18
|
+
- User wants to research products or validate product ideas (e.g., "我想开店卖钛合金杯子", "帮我搜索一下XX")
|
|
19
|
+
- User needs market analysis or competitive research
|
|
20
|
+
- User asks about product pricing, ratings, sales data, or market trends
|
|
21
|
+
- User wants to evaluate business opportunities or find products to sell
|
|
22
|
+
- User needs detailed competitor analysis or listing quality assessment
|
|
23
|
+
|
|
24
|
+
## Available Commands
|
|
25
|
+
|
|
26
|
+
### 1. Search Products: \`scout search\`
|
|
27
|
+
|
|
28
|
+
Search for products on Amazon to analyze market opportunities.
|
|
29
|
+
|
|
30
|
+
**Syntax:**
|
|
31
|
+
\`\`\`bash
|
|
32
|
+
scout search "QUERY" --limit NUMBER
|
|
33
|
+
\`\`\`
|
|
34
|
+
|
|
35
|
+
**Parameters:**
|
|
36
|
+
- \`QUERY\`: Product keywords (e.g., "wireless mouse", "titanium water bottle")
|
|
37
|
+
- \`--limit\`: Number of results (1-50, default: 10)
|
|
38
|
+
- \`--domain\`: Amazon domain (default: amazon.com)
|
|
39
|
+
|
|
40
|
+
**Returns:**
|
|
41
|
+
- Product list with ASIN, title, price, rating, reviews, recent sales
|
|
42
|
+
- Market overview data for competitive analysis
|
|
43
|
+
|
|
44
|
+
**When to use:**
|
|
45
|
+
- Initial market research
|
|
46
|
+
- Finding product categories or niches
|
|
47
|
+
- Comparing multiple products
|
|
48
|
+
- Identifying market trends
|
|
49
|
+
|
|
50
|
+
### 2. Get Product Details: \`scout product\`
|
|
51
|
+
|
|
52
|
+
Get comprehensive details about a specific product by ASIN.
|
|
53
|
+
|
|
54
|
+
**Syntax:**
|
|
55
|
+
\`\`\`bash
|
|
56
|
+
scout product ASIN
|
|
57
|
+
\`\`\`
|
|
58
|
+
|
|
59
|
+
**Parameters:**
|
|
60
|
+
- \`ASIN\`: 10-character Amazon product ID (e.g., B01GJOMWVA)
|
|
61
|
+
- \`--domain\`: Amazon domain (default: amazon.com)
|
|
62
|
+
|
|
63
|
+
**Returns:**
|
|
64
|
+
- Complete product data: pricing, sales, reviews, specifications
|
|
65
|
+
- Rating breakdown, BSR, listing quality indicators
|
|
66
|
+
- Feature bullets, images, description, categories
|
|
67
|
+
|
|
68
|
+
**When to use:**
|
|
69
|
+
- Deep-dive competitor analysis
|
|
70
|
+
- Following up on search results
|
|
71
|
+
- Evaluating specific products
|
|
72
|
+
- Analyzing listing quality
|
|
73
|
+
|
|
74
|
+
## Research Workflow
|
|
75
|
+
|
|
76
|
+
### Typical Flow:
|
|
77
|
+
1. **Market Research** → Use \`scout search\` to understand the market
|
|
78
|
+
2. **Competitor Analysis** → Use \`scout product\` to analyze top products
|
|
79
|
+
3. **Opportunity Assessment** → Analyze data and provide recommendations
|
|
80
|
+
|
|
81
|
+
### Analysis Framework:
|
|
82
|
+
|
|
83
|
+
When analyzing results, consider:
|
|
84
|
+
|
|
85
|
+
**Market Viability:**
|
|
86
|
+
- Are there existing products? How many competitors?
|
|
87
|
+
- Price range and average price point
|
|
88
|
+
- Market saturation (high ratings_total = established market)
|
|
89
|
+
|
|
90
|
+
**Demand Indicators:**
|
|
91
|
+
- "10K+ bought in past month" = high demand
|
|
92
|
+
- High ratings_total = proven demand
|
|
93
|
+
- Recent sales trends
|
|
94
|
+
|
|
95
|
+
**Competitive Landscape:**
|
|
96
|
+
- Top products' ratings and review counts
|
|
97
|
+
- Price positioning opportunities
|
|
98
|
+
- Feature gaps or improvement opportunities
|
|
99
|
+
|
|
100
|
+
**Entry Barriers:**
|
|
101
|
+
- Established brands vs. new sellers
|
|
102
|
+
- Average review count of top products
|
|
103
|
+
- Price competition level
|
|
104
|
+
|
|
105
|
+
## Examples
|
|
106
|
+
|
|
107
|
+
### Example 1: Business Opportunity Evaluation
|
|
108
|
+
**User**: "我想开个店卖钛合金杯子,你觉得合适吗"
|
|
109
|
+
|
|
110
|
+
**Actions:**
|
|
111
|
+
\`\`\`bash
|
|
112
|
+
scout search "titanium cup" --limit 15
|
|
113
|
+
scout search "titanium water bottle" --limit 15
|
|
114
|
+
# Analyze top products:
|
|
115
|
+
scout product [TOP_ASIN_1]
|
|
116
|
+
scout product [TOP_ASIN_2]
|
|
117
|
+
\`\`\`
|
|
118
|
+
|
|
119
|
+
**Analysis:**
|
|
120
|
+
- Compare pricing ranges
|
|
121
|
+
- Assess sales volume from "bought in past month" data
|
|
122
|
+
- Evaluate competition level (ratings count)
|
|
123
|
+
- Identify market gaps or differentiation opportunities
|
|
124
|
+
- Provide recommendation with reasoning
|
|
125
|
+
|
|
126
|
+
### Example 2: Market Research
|
|
127
|
+
**User**: "帮我研究一下无线鼠标市场"
|
|
128
|
+
|
|
129
|
+
**Actions:**
|
|
130
|
+
\`\`\`bash
|
|
131
|
+
scout search "wireless mouse" --limit 20
|
|
132
|
+
scout product [TOP_3_ASINS]
|
|
133
|
+
\`\`\`
|
|
134
|
+
|
|
135
|
+
**Analysis:**
|
|
136
|
+
- Identify best-selling products and price ranges
|
|
137
|
+
- Find feature trends (ergonomic, gaming, silent click, etc.)
|
|
138
|
+
- Spot market opportunities (underserved features, price gaps)
|
|
139
|
+
|
|
140
|
+
### Example 3: Product Validation
|
|
141
|
+
**User**: "咖啡机现在好卖吗?"
|
|
142
|
+
|
|
143
|
+
**Actions:**
|
|
144
|
+
\`\`\`bash
|
|
145
|
+
scout search "coffee maker" --limit 15
|
|
146
|
+
\`\`\`
|
|
147
|
+
|
|
148
|
+
**Analysis:**
|
|
149
|
+
- Check recent_sales data for demand indicators
|
|
150
|
+
- Review ratings and review counts
|
|
151
|
+
- Assess price ranges and competition
|
|
152
|
+
- Provide market viability assessment
|
|
153
|
+
|
|
154
|
+
### Example 4: Competitor Deep-Dive
|
|
155
|
+
**User**: "帮我分析一下这个产品 B0788F3R8X"
|
|
156
|
+
|
|
157
|
+
**Actions:**
|
|
158
|
+
\`\`\`bash
|
|
159
|
+
scout product B0788F3R8X
|
|
160
|
+
\`\`\`
|
|
161
|
+
|
|
162
|
+
**Analysis:**
|
|
163
|
+
- Sales performance and pricing
|
|
164
|
+
- Customer satisfaction (rating breakdown)
|
|
165
|
+
- Listing quality (images, bullets, description)
|
|
166
|
+
- Improvement opportunities from reviews
|
|
167
|
+
|
|
168
|
+
## Output Format
|
|
169
|
+
|
|
170
|
+
### Search Results:
|
|
171
|
+
\`\`\`json
|
|
172
|
+
{
|
|
173
|
+
"results": [
|
|
174
|
+
{
|
|
175
|
+
"position": 1,
|
|
176
|
+
"asin": "B01GJOMWVA",
|
|
177
|
+
"title": "Product Name",
|
|
178
|
+
"link": "amazon.com/...",
|
|
179
|
+
"price": { "value": 29.99, "currency": "USD" },
|
|
180
|
+
"rating": 4.5,
|
|
181
|
+
"ratings_total": 12000,
|
|
182
|
+
"recent_sales": "10K+ bought in past month"
|
|
183
|
+
}
|
|
184
|
+
],
|
|
185
|
+
"metadata": { "total_results": 50, "cached": false }
|
|
186
|
+
}
|
|
187
|
+
\`\`\`
|
|
188
|
+
|
|
189
|
+
### Product Details:
|
|
190
|
+
\`\`\`json
|
|
191
|
+
{
|
|
192
|
+
"data": {
|
|
193
|
+
"asin": "B01GJOMWVA",
|
|
194
|
+
"title": "Product Name",
|
|
195
|
+
"brand": "Brand Name",
|
|
196
|
+
"price": { "value": 29.99, "currency": "USD" },
|
|
197
|
+
"rating": 4.5,
|
|
198
|
+
"ratings_total": 12000,
|
|
199
|
+
"rating_breakdown": {
|
|
200
|
+
"five_star": { "percentage": 75, "count": 9000 },
|
|
201
|
+
"four_star": { "percentage": 15, "count": 1800 }
|
|
68
202
|
},
|
|
203
|
+
"recent_sales": "10K+ bought in past month",
|
|
204
|
+
"images": [...],
|
|
205
|
+
"feature_bullets": [...],
|
|
206
|
+
"categories": [...]
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
\`\`\`
|
|
210
|
+
|
|
211
|
+
## Best Practices
|
|
212
|
+
|
|
213
|
+
1. **Start Broad, Then Narrow:**
|
|
214
|
+
- Begin with search to understand the market
|
|
215
|
+
- Deep-dive top 3-5 products for detailed analysis
|
|
216
|
+
|
|
217
|
+
2. **Look for Patterns:**
|
|
218
|
+
- Common price points
|
|
219
|
+
- Feature trends
|
|
220
|
+
- Customer pain points in reviews
|
|
221
|
+
|
|
222
|
+
3. **Assess Opportunity:**
|
|
223
|
+
- High demand (sales data) + Low competition (ratings count) = Good opportunity
|
|
224
|
+
- High demand + High competition = Difficult market
|
|
225
|
+
- Low demand = Risky
|
|
226
|
+
|
|
227
|
+
4. **Present Insights:**
|
|
228
|
+
- Use user's language (Chinese if they asked in Chinese)
|
|
229
|
+
- Include specific examples and data
|
|
230
|
+
- Provide actionable recommendations
|
|
231
|
+
- Explain reasoning
|
|
232
|
+
|
|
233
|
+
5. **Follow-up Research:**
|
|
234
|
+
- Suggest related searches
|
|
235
|
+
- Recommend deeper analysis if needed
|
|
236
|
+
- Point out data limitations
|
|
237
|
+
|
|
238
|
+
## Tips
|
|
239
|
+
|
|
240
|
+
- Products with "10K+ bought in past month" indicate high demand
|
|
241
|
+
- Compare ratings_total across competitors to gauge market maturity
|
|
242
|
+
- Lower ratings_total on top results = easier market entry
|
|
243
|
+
- Check rating_breakdown for customer satisfaction insights
|
|
244
|
+
- Recent reviews often reveal current product issues or trends
|
|
245
|
+
- Use multiple search queries to get complete market view
|
|
246
|
+
`,
|
|
69
247
|
};
|
|
70
248
|
export const initCommand = new Command('init')
|
|
71
249
|
.description('Initialize Claude Code Skills in current directory')
|
|
@@ -94,7 +272,7 @@ export const initCommand = new Command('init')
|
|
|
94
272
|
const createdFiles = [];
|
|
95
273
|
for (const [filename, content] of Object.entries(SKILLS_TEMPLATES)) {
|
|
96
274
|
const filepath = join(skillsDir, filename);
|
|
97
|
-
await writeFile(filepath,
|
|
275
|
+
await writeFile(filepath, content);
|
|
98
276
|
createdFiles.push(filename);
|
|
99
277
|
}
|
|
100
278
|
// Success message
|
|
@@ -105,11 +283,13 @@ export const initCommand = new Command('init')
|
|
|
105
283
|
console.log(` - ${file}`);
|
|
106
284
|
});
|
|
107
285
|
console.log('\n🎯 Next steps:');
|
|
108
|
-
console.log(' 1.
|
|
109
|
-
console.log('
|
|
110
|
-
console.log('
|
|
111
|
-
console.log('
|
|
112
|
-
console.log('
|
|
286
|
+
console.log(' 1. Open this project in Claude Code');
|
|
287
|
+
console.log(' 2. Claude will automatically discover the Optima Scout skill');
|
|
288
|
+
console.log(' 3. Ask Claude questions like:');
|
|
289
|
+
console.log(' • "我想开个店卖钛合金杯子,你觉得合适吗"');
|
|
290
|
+
console.log(' • "帮我研究一下无线鼠标市场"');
|
|
291
|
+
console.log(' • "咖啡机现在好卖吗?"');
|
|
292
|
+
console.log('\n💡 Claude will use Optima Scout to search products and provide market insights!');
|
|
113
293
|
console.log('\n📚 Learn more: https://github.com/Optima-Chat/optima-scout');
|
|
114
294
|
}
|
|
115
295
|
catch (error) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAE5B;;GAEG;AACH,MAAM,gBAAgB,GAAG;IACvB,
|
|
1
|
+
{"version":3,"file":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