ecommerce-competitor-analyzer by buluslan/ecommerce-competitor-analyzer
npx skills add https://github.com/buluslan/ecommerce-competitor-analyzer --skill ecommerce-competitor-analyzer使用此技能的时机:当用户要求分析、研究或从电商产品(Amazon、Temu、Shopee)中提取洞察时。
你应该做什么:
输入示例:
输出要求:
从用户输入中提取所有 ASIN 和/或 URL:
输入示例:
"分析这些 Amazon 产品:
B0C4YT8S6H
B08N5WRQ1Y
B0CLFH7CCV"
提取:['B0C4YT8S6H', 'B08N5WRQ1Y', 'B0CLFH7CCV']
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
混合输入处理:
"分析 B0C4YT8S6H 和 https://amazon.com/dp/B08N5WRQ1Y"
提取:['B0C4YT8S6H', 'B08N5WRQ1Y'](从 URL 中提取 ASIN)
针对每个产品标识符:
scripts/detect-platform.js)scripts/scrape-amazon.js).env 配置的 API 密钥批处理模式:
// 并行处理所有产品
const products = ['B0C4YT8S6H', 'B08N5WRQ1Y', 'B0CLFH7CCV'];
const results = await Promise.allSettled(
products.map(asin => scrapeAmazon(asin))
);
// 优雅地处理失败
const successful = results.filter(r => r.status === 'fulfilled');
const failed = results.filter(r => r.status === 'rejected');
针对每个成功抓取的产品:
prompts/analysis-prompt-base.md 读取分析提示分析框架(四个维度):
格式 1:Google Sheets(结构化数据)
写入 Google Sheets,列包括:| ASIN | 产品标题 | 价格 | 评分 | 文案分析摘要 | 视觉分析摘要 | 评论分析摘要 | 市场分析摘要 |
表格选择优先级:
.env 的默认值(GOOGLE_SHEETS_ID)格式 2:Markdown 报告(详细分析)
生成文件:竞品分析-YYYY-MM-DD.md
结构:
# Amazon 竞品分析报告
## 分析概览
- 分析产品数:3
- 分析日期:2026-01-29
- 总耗时:约 5 分钟
---
## 产品 1:B0C4YT8S6H
### 基本信息
- 标题:[产品标题]
- 价格:[价格]
- 评分:[评分]
### 文案策略与关键词分析
[完整分析...]
### 视觉资产设计方法论
[完整分析...]
### 客户评论分析
[完整分析...]
### 市场定位与竞争情报
[完整分析...]
---
ecommerce-competitor-analyzer.skill/
├── SKILL.md # 本文件(AI 指令)
├── platforms.yaml # 平台配置(URL 模式、正则表达式)
├── .env.example # 配置模板(API 密钥)
├── prompts/ # AI 提示模板
│ └── analysis-prompt-base.md # 基础分析框架(来自 n8n)
├── scripts/ # 处理脚本
│ ├── detect-platform.js # 平台检测工具
│ ├── scrape-amazon.js # Amazon 抓取器(Olostep API)
│ └── batch-processor.js # 批处理引擎
└── references/ # 文档
└── n8n-workflow-analysis.md # n8n 工作流洞察
包含平台特定配置:
关键部分:
platforms:
amazon:
url_patterns: ["amazon.com", "amazon.co.uk", ...]
asin_regex:
standard: "/dp/([A-Z0-9]{10})"
scraper:
provider: "olostep"
api_endpoint: "https://api.olostep.com/v2/agent/web-agent"
所需 API 密钥的模板:
OLOSTEP_API_KEY=your_olostep_api_key_here
GEMINI_API_KEY=your_gemini_api_key_here
GOOGLE_SHEETS_ID=YOUR_GOOGLE_SHEETS_ID_HERE
关键点:在处理之前,始终检查 .env 文件是否存在并包含所需的密钥。
AI 分析使用经过验证的四维框架。确切的提示存储在:prompts/analysis-prompt-base.md
关键部分:
重要:请严格按照模板中提供的提示使用,不要修改。
https://api.olostep.com/v2/agent/web-agentcomments_to_scrape: 100(与 n8n 配置匹配)gemini-3-flash-preview(性价比高)gemini-2-flash-thinking(用于复杂分析)来自 n8n 工作流的关键模式:
const items = productIdentifiers;
const results = await Promise.allSettled(
items.map(async (item, index) => {
try {
const data = await scrapeProduct(item);
const analysis = await analyzeWithAI(data);
return { success: true, index, data: analysis };
} catch (error) {
// 单个失败不会停止整个批次
return { success: false, index, error: error.message };
}
})
);
// 报告结果
const successful = results.filter(r => r.status === 'fulfilled' && r.value.success);
const failed = results.filter(r => r.status === 'rejected' || !r.value.success);
console.log(`已处理:${successful.length} 个成功,${failed.length} 个失败`);
| 错误 | 原因 | 解决方案 |
|---|---|---|
OLOSTEP_API_KEY not found | 缺少 .env 文件 | 检查 .env 是否存在并包含密钥 |
Invalid ASIN format | ASIN 格式错误 | 验证 ASIN:10 个字母数字字符 |
Scraping timeout | 页面加载缓慢 | 增加超时时间或重试 |
Gemini rate limit | 请求过多 | 在批次之间添加延迟 |
function detectPlatform(urlOrId) {
// 直接 ASIN
if (/^[A-Z0-9]{10}$/.test(urlOrId)) {
return { platform: 'amazon', id: urlOrId };
}
// Amazon URL 模式
if (/amazon\.(com|co\.uk|de|es|fr|it|ca|co\.jp)/i.test(urlOrId)) {
const asinMatch = urlOrId.match(/\/dp\/([A-Z0-9]{10})/i);
if (asinMatch) {
return { platform: 'amazon', id: asinMatch[1] };
}
}
// 其他平台(未来)
// if (/temu\.com/i.test(urlOrId)) return { platform: 'temu', id: extractId(urlOrId) };
return null;
}
支持的平台:Amazon(仅限美国) 输入方式:基于对话框(ASIN 或 URL) 输出格式:Google Sheets 表格 + Markdown 报告
此技能遵循 n8n 工作流中的错误隔离模式:
| 操作 | 时间 | 成本 |
|---|---|---|
| 单个产品抓取 | 约 30 秒 | $0.002 (Olostep) |
| 单个产品分析 | 约 45 秒 | $0.001 (Gemini) |
| 每个产品总计 | 约 1-2 分钟 | 约 $0.003 |
| 10 个产品批次 | 约 10-15 分钟(并行) | 约 $0.03 |
platforms.yaml 了解 URL 模式和提取规则prompts/analysis-prompt-base.md 了解确切的提示模板每周安装数
238
代码仓库
GitHub 星标数
24
首次出现
2026年1月30日
安全审计
安装于
opencode208
gemini-cli195
cursor192
codex191
github-copilot188
kimi-cli184
When to use this skill : When user asks to analyze, research, or extract insights from e-commerce products (Amazon, Temu, Shopee).
What you should do :
Input examples :
Output requirements :
From user input, extract all ASINs and/or URLs:
Example inputs :
"Analyze these Amazon products:
B0C4YT8S6H
B08N5WRQ1Y
B0CLFH7CCV"
Extract : ['B0C4YT8S6H', 'B08N5WRQ1Y', 'B0CLFH7CCV']
Mixed input handling :
"Analyze B0C4YT8S6H and https://amazon.com/dp/B08N5WRQ1Y"
Extract : ['B0C4YT8S6H', 'B08N5WRQ1Y'] (extract ASIN from URL)
For each product identifier:
scripts/detect-platform.js if available)scripts/scrape-amazon.js).envBatch processing pattern :
// Process all products in parallel
const products = ['B0C4YT8S6H', 'B08N5WRQ1Y', 'B0CLFH7CCV'];
const results = await Promise.allSettled(
products.map(asin => scrapeAmazon(asin))
);
// Handle failures gracefully
const successful = results.filter(r => r.status === 'fulfilled');
const failed = results.filter(r => r.status === 'rejected');
For each successfully scraped product:
prompts/analysis-prompt-base.mdAnalysis framework (4 dimensions):
Format 1: Google Sheets (Structured Data)
Write to Google Sheets with columns: | ASIN | 产品标题 | 价格 | 评分 | 文案分析摘要 | 视觉分析摘要 | 评论分析摘要 | 市场分析摘要 |
Sheet selection priority :
.env (GOOGLE_SHEETS_ID)Format 2: Markdown Report (Detailed Analysis)
Generate file: 竞品分析-YYYY-MM-DD.md
Structure:
# Amazon Competitor Analysis Report
## Analysis Overview
- Products analyzed: 3
- Analysis date: 2026-01-29
- Total time: ~5 minutes
---
## Product 1: B0C4YT8S6H
### Basic Information
- Title: [Product title]
- Price: [Price]
- Rating: [Rating]
### Copywriting Strategy & Keyword Analysis
[Full analysis...]
### Visual Asset Design Methodology
[Full analysis...]
### Customer Review Analysis
[Full analysis...]
### Market Positioning & Competitive Intelligence
[Full analysis...]
---
ecommerce-competitor-analyzer.skill/
├── SKILL.md # This file (AI instructions)
├── platforms.yaml # Platform configurations (URL patterns, regex)
├── .env.example # Configuration template (API keys)
├── prompts/ # AI prompt templates
│ └── analysis-prompt-base.md # Base analysis framework (from n8n)
├── scripts/ # Processing scripts
│ ├── detect-platform.js # Platform detection utility
│ ├── scrape-amazon.js # Amazon scraper (Olostep API)
│ └── batch-processor.js # Batch processing engine
└── references/ # Documentation
└── n8n-workflow-analysis.md # n8n workflow insights
Contains platform-specific configurations:
Key sections :
platforms:
amazon:
url_patterns: ["amazon.com", "amazon.co.uk", ...]
asin_regex:
standard: "/dp/([A-Z0-9]{10})"
scraper:
provider: "olostep"
api_endpoint: "https://api.olostep.com/v2/agent/web-agent"
Template for required API keys:
OLOSTEP_API_KEY=your_olostep_api_key_here
GEMINI_API_KEY=your_gemini_api_key_here
GOOGLE_SHEETS_ID=YOUR_GOOGLE_SHEETS_ID_HERE
Critical : Always check if .env file exists and contains required keys before processing.
The AI analysis uses a proven 4-dimensional framework. The exact prompt is stored in: prompts/analysis-prompt-base.md
Key sections :
Important : Use the prompt EXACTLY as provided in the template without modifications.
https://api.olostep.com/v2/agent/web-agentcomments_to_scrape: 100 (matching n8n config)gemini-3-flash-preview (cost-effective)gemini-2-flash-thinking (for complex analysis)Critical pattern from n8n workflow :
const items = productIdentifiers;
const results = await Promise.allSettled(
items.map(async (item, index) => {
try {
const data = await scrapeProduct(item);
const analysis = await analyzeWithAI(data);
return { success: true, index, data: analysis };
} catch (error) {
// Single failure doesn't stop batch
return { success: false, index, error: error.message };
}
})
);
// Report results
const successful = results.filter(r => r.status === 'fulfilled' && r.value.success);
const failed = results.filter(r => r.status === 'rejected' || !r.value.success);
console.log(`Processed: ${successful.length} succeeded, ${failed.length} failed`);
| Error | Cause | Solution |
|---|---|---|
OLOSTEP_API_KEY not found | Missing .env file | Check .env exists and contains key |
Invalid ASIN format | Malformed ASIN | Validate ASIN: 10 alphanumeric chars |
Scraping timeout | Slow page load | Increase timeout or retry |
Gemini rate limit | Too many requests | Add delay between batches |
function detectPlatform(urlOrId) {
// Direct ASIN
if (/^[A-Z0-9]{10}$/.test(urlOrId)) {
return { platform: 'amazon', id: urlOrId };
}
// Amazon URL patterns
if (/amazon\.(com|co\.uk|de|es|fr|it|ca|co\.jp)/i.test(urlOrId)) {
const asinMatch = urlOrId.match(/\/dp\/([A-Z0-9]{10})/i);
if (asinMatch) {
return { platform: 'amazon', id: asinMatch[1] };
}
}
// Other platforms (future)
// if (/temu\.com/i.test(urlOrId)) return { platform: 'temu', id: extractId(urlOrId) };
return null;
}
Supported Platforms : Amazon (US only) Input Method : Dialog-based (ASINs or URLs) Output Format : Google Sheets table + Markdown report
This skill follows the error isolation pattern from the n8n workflow:
| Operation | Time | Cost |
|---|---|---|
| Single product scrape | ~30 seconds | $0.002 (Olostep) |
| Single product analysis | ~45 seconds | $0.001 (Gemini) |
| Total per product | ~1-2 minutes | ~$0.003 |
| Batch of 10 products | ~10-15 minutes (parallel) | ~$0.03 |
platforms.yaml for URL patterns and extraction rulesprompts/analysis-prompt-base.md for exact prompt templateWeekly Installs
238
Repository
GitHub Stars
24
First Seen
Jan 30, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykWarn
Installed on
opencode208
gemini-cli195
cursor192
codex191
github-copilot188
kimi-cli184
专业SEO审计工具:全面网站诊断、技术SEO优化与页面分析指南
57,600 周安装
独立企业财务运营专家:簿记、税务规划、现金流管理、多业务跟踪与利润分析
1,400 周安装
SEO与AEO最佳实践指南:优化内容适配传统搜索与AI答案引擎
1,500 周安装
Sanity 最佳实践指南 | 集成、GROQ、模式设计、性能优化
1,400 周安装
Gemini水印去除工具 - Python脚本,一键移除Gemini图像水印
1,400 周安装
Reddit API 技能:无需密钥获取帖子、评论、用户资料,支持Python脚本调用
1,500 周安装
ghost-repo-context:AI代码仓库上下文构建器,自动检测项目架构并生成repo.md文档
566 周安装