ecommerce-competitor-analyzer

Multi-platform e-commerce competitor analysis skill that automatically scrapes product data from Amazon, Temu, Shopee and generates comprehensive analysis reports using AI. Use when you need to analyze competitor products, extract product insights, or batch analyze multiple product listings. Supports bulk processing with structured outputs including title, price, rating, reviews, and strategic analysis.

16 stars

Best use case

ecommerce-competitor-analyzer is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Multi-platform e-commerce competitor analysis skill that automatically scrapes product data from Amazon, Temu, Shopee and generates comprehensive analysis reports using AI. Use when you need to analyze competitor products, extract product insights, or batch analyze multiple product listings. Supports bulk processing with structured outputs including title, price, rating, reviews, and strategic analysis.

Teams using ecommerce-competitor-analyzer should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/ecommerce-competitor-analyzer/SKILL.md --create-dirs "https://raw.githubusercontent.com/diegosouzapw/awesome-omni-skill/main/skills/backend/ecommerce-competitor-analyzer/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/ecommerce-competitor-analyzer/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How ecommerce-competitor-analyzer Compares

Feature / Agentecommerce-competitor-analyzerStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Multi-platform e-commerce competitor analysis skill that automatically scrapes product data from Amazon, Temu, Shopee and generates comprehensive analysis reports using AI. Use when you need to analyze competitor products, extract product insights, or batch analyze multiple product listings. Supports bulk processing with structured outputs including title, price, rating, reviews, and strategic analysis.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# E-commerce Competitor Analyzer Skill

## Quick Start (For AI)

**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**:
1. Extract product identifiers (ASINs or URLs) from user input
2. Call the scraper script to get product data
3. Call the AI analysis with the analysis prompt template
4. Output results in BOTH formats: Google Sheets + Markdown

**Input examples**:
- "Analyze B0C4YT8S6H"
- "Analyze these products: B0C4YT8S6H, B08N5WRQ1Y, B0CLFH7CCV"
- "Research this competitor: https://amazon.com/dp/B0C4YT8S6H"

**Output requirements**:
- Google Sheets table with: ASIN, Title, Price, Rating, 4 analysis summaries
- Markdown report with detailed 4-dimensional analysis

---

## How AI Should Process Requests

### Step 1: Extract Product Identifiers

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)

### Step 2: Batch Scrape Product Data

For each product identifier:
1. Detect platform (use `scripts/detect-platform.js` if available)
2. Call appropriate scraper (Amazon: `scripts/scrape-amazon.js`)
3. Use Olostep API with configured API key from `.env`

**Batch processing pattern**:
```javascript
// 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');
```

### Step 3: Batch AI Analysis

For each successfully scraped product:
1. Read the analysis prompt from `prompts/analysis-prompt-base.md`
2. Replace product data placeholders in the prompt
3. Call Gemini API (model: gemini-3-flash-preview)
4. Extract structured analysis results

**Analysis framework** (4 dimensions):
1. **文案构建逻辑与词频分析** (The Brain) - Copywriting strategy & keywords
2. **视觉资产设计思路** (The Face) - Visual design methodology
3. **评论定量与定性分析** (The Voice) - Review sentiment analysis
4. **市场维态与盲区扫描** (The Pulse) - Market positioning & blind spots

### Step 4: Generate Dual Format Output

**Format 1: Google Sheets** (Structured Data)

Write to Google Sheets with columns:
| ASIN | 产品标题 | 价格 | 评分 | 文案分析摘要 | 视觉分析摘要 | 评论分析摘要 | 市场分析摘要 |

**Sheet selection priority**:
1. User explicitly specified Sheet ID/Name/URL
2. Default from `.env` (`GOOGLE_SHEETS_ID`)
3. Ask user to provide Sheet ID

**Format 2: Markdown Report** (Detailed Analysis)

Generate file: `竞品分析-YYYY-MM-DD.md`

Structure:
```markdown
# 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...]

---
```

---

## File Structure

```
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
```

---

## Configuration Files

### platforms.yaml

Contains platform-specific configurations:
- URL patterns for platform detection
- ASIN extraction regex patterns
- Scraper API endpoints
- Data extraction patterns

**Key sections**:
```yaml
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"
```

### .env.example

Template for required API keys:
```bash
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.

---

## Analysis Prompt Template

The AI analysis uses a proven 4-dimensional framework. The exact prompt is stored in:
`prompts/analysis-prompt-base.md`

**Key sections**:
1. **Role**: 10-year experienced Amazon Operations Director & Brand Strategist
2. **Goal**: Deep scan of product listing to extract strategic insights
3. **Output Structure**:
   - Part 1: 文案构建逻辑与词频分析
   - Part 2: 视觉资产设计思路
   - Part 3: 评论定量与定性分析
   - Part 4: 市场维态与盲区扫描

**Important**: Use the prompt EXACTLY as provided in the template without modifications.

---

## API Services

### Olostep API (Web Scraping)
- **Purpose**: Scrape Amazon product pages with rendered JavaScript
- **Endpoint**: `https://api.olostep.com/v2/agent/web-agent`
- **Cost**: 1000 free requests/month, then $0.002/request
- **Key param**: `comments_to_scrape: 100` (matching n8n config)

### Google Gemini API (AI Analysis)
- **Purpose**: Generate comprehensive product analysis
- **Model**: `gemini-3-flash-preview` (cost-effective)
- **Cost**: ~$0.001/product
- **Alternative**: `gemini-2-flash-thinking` (for complex analysis)

### Google Sheets API (Data Storage)
- **Purpose**: Export structured results
- **Authentication**: OAuth2 service account
- **Cost**: Free tier

---

## Error Handling

### Batch Processing with Error Isolation

**Critical pattern from n8n workflow**:
```javascript
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`);
```

### Common Errors & Solutions

| 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 |

---

## Platform Detection Logic

```javascript
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;
}
```

---

## Implementation Notes

### Current Version: Phase 1 MVP

**Supported Platforms**: Amazon (US only)
**Input Method**: Dialog-based (ASINs or URLs)
**Output Format**: Google Sheets table + Markdown report

### Roadmap

- ✅ Phase 1: Amazon MVP (current)
- 🔄 Phase 2: Add Temu & Shopee platforms
- 🔄 Phase 3: Cross-platform comparison
- 🔄 Phase 4: Historical tracking & price alerts

### Design Philosophy

This skill follows the **error isolation pattern** from the n8n workflow:
- Single product failure NEVER stops the entire batch
- Always report both successes and failures
- Provide detailed error messages for debugging

### Performance Benchmarks

| 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 |

---

## References

- **n8n Workflow**: Based on v81 workflow logic
- **Platform Config**: See `platforms.yaml` for URL patterns and extraction rules
- **Analysis Prompt**: See `prompts/analysis-prompt-base.md` for exact prompt template

---

## Important Reminders for AI

1. **ALWAYS extract ALL product identifiers** from user input before processing
2. **ALWAYS use batch processing with Promise.allSettled** for error isolation
3. **ALWAYS generate BOTH output formats**: Google Sheets + Markdown
4. **NEVER modify the analysis prompt** - use it exactly as provided
5. **ALWAYS validate .env exists** before starting processing
6. **ALWAYS report processing summary**: X succeeded, Y failed
7. **If Google Sheets ID is missing**, ask user to provide it
8. **Use the exact prompt from prompts/analysis-prompt-base.md** without any modifications

Related Skills

excel-field-analyzer

16
from diegosouzapw/awesome-omni-skill

分析Excel/CSV字段结构,AI自动生成中英文映射,验证翻译质量,输出统计报告。用于电子表格分析、数据字典创建、字段映射场景。

ab-testing-analyzer

16
from diegosouzapw/awesome-omni-skill

全面的AB测试分析工具,支持实验设计、统计检验、用户分群分析和可视化报告生成。用于分析产品改版、营销活动、功能优化等AB测试结果,提供统计显著性检验和深度洞察。

video-analyzer

16
from diegosouzapw/awesome-omni-skill

鏅鸿兘鍒嗘瀽 Bilibili/YouTube/鏈湴瑙嗛锛岀敓鎴愯浆鍐欍€佽瘎浼板拰鎬荤粨銆傛敮鎸佸叧閿抚鎴浘鑷姩宓屽叆銆?

edu-video-analyzer

16
from diegosouzapw/awesome-omni-skill

Analyze educational YouTube channels for classroom adoption potential, curriculum alignment, and pedagogical effectiveness. Use when comparing educational video content (like MRU vs Crash Course), evaluating teaching methodologies, identifying content gaps for course design, or developing educational video strategy focused on student learning outcomes rather than monetization.

blog-voice-analyzer

16
from diegosouzapw/awesome-omni-skill

Run the AI Voice Analyzer on blog content to detect AI-sounding patterns and get actionable rewrite suggestions. Use when reviewing or improving blog articles before publishing.

competitor-alternatives

16
from diegosouzapw/awesome-omni-skill

When the user wants to create competitor comparison or alternative pages for SEO and sales enablement. Also use when the user mentions 'alternative page,' 'vs page,' 'competitor comparison,' 'compa...

apify-ecommerce

16
from diegosouzapw/awesome-omni-skill

Scrape e-commerce data for pricing intelligence, customer reviews, and seller discovery across Amazon, Walmart, eBay, IKEA, and 50+ marketplaces. Use when user asks to monitor prices, track competi...

apify-competitor-intelligence

16
from diegosouzapw/awesome-omni-skill

Analyze competitor strategies, content, pricing, ads, and market positioning across Google Maps, Booking.com, Facebook, Instagram, YouTube, and TikTok.

api-spec-analyzer

16
from diegosouzapw/awesome-omni-skill

Analyzes API documentation from OpenAPI specs to provide TypeScript interfaces, request/response formats, and implementation guidance. Use when implementing API integrations, debugging API errors (400, 401, 404), replacing mock APIs, verifying data types, or when user mentions endpoints, API calls, or backend integration.

api-schema-analyzer

16
from diegosouzapw/awesome-omni-skill

Analyze OpenAPI and Postman schemas for MCP tool generation. Use when analyzing API specifications, extracting endpoint information, generating tool signatures, or when user mentions OpenAPI, Swagger, API schema, endpoint analysis.

pr-test-analyzer

16
from diegosouzapw/awesome-omni-skill

Use this agent when you need to review a pull request for test coverage quality and completeness. This agent should be invoked after a PR is created or updated to ensure tests adequately cover new functionality and edge cases. Examples:\n\n<example>\nContext: Daisy has just created a pull request with new functionality.\nuser: "I've created the PR. Can you check if the tests are thorough?"\nassistant: "I'll use the pr-test-analyzer agent to review the test coverage and identify any critical gaps."\n<commentary>\nSince Daisy is asking about test thoroughness in a PR, use the Task tool to launch the pr-test-analyzer agent.\n</commentary>\n</example>\n\n<example>\nContext: A pull request has been updated with new code changes.\nuser: "The PR is ready for review - I added the new validation logic we discussed"\nassistant: "Let me analyze the PR to ensure the tests adequately cover the new validation logic and edge cases."\n<commentary>\nThe PR has new functionality that needs test coverage analysis, so use the pr-test-analyzer agent.\n</commentary>\n</example>\n\n<example>\nContext: Reviewing PR feedback before marking as ready.\nuser: "Before I mark this PR as ready, can you double-check the test coverage?"\nassistant: "I'll use the pr-test-analyzer agent to thoroughly review the test coverage and identify any critical gaps before you mark it ready."\n<commentary>\nDaisy wants a final test coverage check before marking PR ready, use the pr-test-analyzer agent.\n</commentary>\n</example>

analyzer-agent

16
from diegosouzapw/awesome-omni-skill

Static analysis, code quality checks, and security scanning agent