competitive-ops
by @dalianmao000
AI competitive intelligence pipeline -- analyze competitors, generate reports, track changes
clawhub install competitive-opsπ About This Skill
name: competitive-ops description: AI competitive intelligence pipeline -- analyze competitors, generate reports, track changes author: name: ε€§θΈη« email: "" category: productivity homepage: https://github.com/dalianmao000/competitive-ops-v2 tags: - competitive-analysis - intelligence - market-research - reporting
Competitive-Ops -- Router
Mode Routing
Determine the mode from {{mode}}:
| Input | Mode |
|-------|------|
| (empty / no args) | discovery -- Show command menu |
| setup | setup -- Install dependencies and configure system |
| add | add -- Add competitor to tracking |
| analyze | analyze -- Full analysis with SWOT + report (add html for HTML output) |
| compare vs [html] | compare -- Side-by-side comparison (add html for HTML output) |
| update | update -- Check for changes |
| pricing | pricing -- Pricing research (add html for HTML output) |
| pricing-deep-dive | pricing-deep-dive -- Deep pricing analysis with value scoring |
| batch | batch -- Batch processing |
| report [html] | report -- Generate consolidated report (add html for HTML output) |
| track | track -- View tracking dashboard |
| monitor [interval] | monitor -- Set up scheduled monitoring (default: weekly) |
| pdf [report] | pdf -- Export report to PDF |
| png [report] | png -- Export report to PNG image |
Discovery Mode (no arguments)
Show this menu:
competitive-ops -- Competitive Intelligence Command CenterAvailable commands:
/competitive-ops add β Add competitor to tracking
/competitive-ops analyze β Full analysis: SWOT + scoring + HTML report
/competitive-ops compare vs β Side-by-side feature matrix
/competitive-ops update β Check for changes since last analysis
/competitive-ops pricing β Pricing research with change detection
/competitive-ops pricing-deep-dive β Deep pricing analysis with value scoring
/competitive-ops batch β Batch process multiple competitors
/competitive-ops report β Generate consolidated report
/competitive-ops track β View tracking dashboard
/competitive-ops monitor [daily|weekly|monthly] β Set up scheduled monitoring
/competitive-ops pdf [report] β Export report to PDF
/competitive-ops png [report] β Export report to PNG image
First time? Say "setup" to configure your company info.
Setup Mode
If {{mode}} is "setup":
Step 1: Install Dependencies
Check for required tools and install if missing:
1. Playwright for screenshots (required):
- Run: npx playwright install chromium
- Verify: npx playwright --version
2. ui-ux-pro-max for HTML reports:
- Install: npx -y uipro-cli init --ai claude (in project directory)
- Skill location: {project}/.claude/skills/ui-ux-pro-max/
- Usage: /skill ui-ux-pro-max
3. Tavily MCP (optional, for fallback search):
- Correct package name: tavily-mcp (NOT @tavily/tavily-mcp)
- Add with: claude mcp add tavily -- npx -y tavily-mcp
- Set API key: TAVILY_API_KEY=your_key
4. Python dependencies (required, use virtual environment):
python3 -m venv .venv && source .venv/bin/activate && pip install -r requirements.txt
- Or directly: pip install -r requirements.txt (in project directory)Step 2: Configure System
Check if the system is configured:
1. Required: Check if data/competitors.md exists
- If missing, create from template or empty file with headers:
# Competitors Tracker
| # | Company | Tier | Score | Status | Last Updated | Notes |
|---|---------|------|-------|--------|--------------|-------|
2. Optional: cv.md and config/profile.yml
- These define your own product for scoring context
- Not required for basic competitive analysis
- If missing, skip and proceed with analysisStep 3: Summary
Output setup status:
β
competitive-ops v2 ready!Installed:
β
Playwright (screenshots)
β
ui-ux-pro-max (HTML reports: npx -y uipro-cli init --ai claude)
β
Tavily MCP (fallback search)
β
Python dependencies
Required:
β
data/competitors.md
Optional (for scoring context):
[?] cv.md (your product)
[?] config/profile.yml
Add Mode
When {{mode}} is add:
1. Read {{company}} from args
2. Check if competitor already exists in data/competitors.md
- If exists: Output warning: "β οΈ {company} already in tracker (score: X)" and skip
- If new: Add entry with tier assignment (Tier 1/2/3)
3. Create initial research structure (snapshot folder)
4. Output confirmation with tier and initial score placeholder
Search Fallback Order
When researching competitors, use this search order:
1. web-search β Primary search tool 2. web-fetch β Fetch specific URLs for detailed info 3. Tavily MCP server β Fallback when native tools unavailable
Tavily MCP Usage:
Use Tavily MCP server for competitive intelligence search:
tavily-search for company overview, products, pricing
tavily-search with topic="business" for business intelligence
tavily-search with topic="news" for recent news
Fallback Detection:
web-search returns no results or error β try web-fetchweb-fetch fails or unavailable β invoke Tavily MCP serverAnalyze Mode
When {{mode}} is analyze:
1. Read {{company}} and optional {{html}} flag from args
2. Check if competitor exists in data/competitors.md
- If new: Add to data/competitors.md first
- If exists: Note: "βΉοΈ New analysis for {company}"
3. Run research (following fallback order above):
- Try web-search first for company info
- Try web-fetch for specific URLs
- Fallback to Tavily MCP server if needed
- Cross-validate from multiple sources
4. Generate SWOT analysis
5. Score across 6 dimensions
6. Generate report in data/reports/{date}/{company}-{date}.md
- Always creates new file (never overwrites)
- Update symlink to point to the new report:
rm -f data/reports/latest/{company}.md
ln -s ../{date}/{company}-{date}.md data/reports/latest/{company}.md
This ensures latest/ always reflects the most recent analysis, regardless of date.
7. If html flag is present in args:
- Read the markdown report
- Use ui-ux-pro-max skill: /skill ui-ux-pro-max
- Generate HTML report with Tailwind dark theme
- Save to data/reports/html/{company}-{date}.html
8. Update data/competitors.md with new score and date
9. Output summary with score and confidence
- Include path to HTML report if generatedNote: For incremental change tracking, use update mode instead. analyze always creates fresh analysis.
Compare Mode
When {{mode}} is compare:
1. Parse A vs B and optional {{html}} flag from args
2. Load both companies' latest reports from data/reports/latest/
3. Generate feature matrix comparison
4. Score delta analysis
5. Save comparison to data/reports/{date}/compare-{A}-vs-{B}-{date}.md
6. If html flag is present:
- Read the comparison markdown
- Use ui-ux-pro-max skill: /skill ui-ux-pro-max
- Generate HTML report with Tailwind dark theme
- Save to data/reports/html/compare-{A}-vs-{B}-{date}.html
7. Output path to comparison report
Update Mode
When {{mode}} is update:
1. Read {{company}} from args
2. Re-run research (following Search Fallback Order):
- Try web-search/web-fetch first
- Fallback to Tavily MCP if unavailable
3. Load the previous report from data/reports/{company}-{prev-date}.md as baseline
4. Generate new analysis: SWOT + scores β new data/reports/{company}-{date}.md
5. Diff analysis: Compare old vs new report, compute score delta per dimension
6. If score change β₯ 5% on any dimension β alert user with π΄ flag
7. Save snapshot to data/snapshots/{company}/{date}.json
8. Output:
- New report path
- Score delta table (before β after per dimension)
- Changelog: what changed (new features, pricing changes, etc.)
Pricing Mode
When {{mode}} is pricing:
1. Read {{company}} and optional {{html}} flag from args
2. Research pricing from (following fallback order):
- Company website (try web-fetch first)
- G2, Capterra, Glassdoor
- News articles
- Tavily MCP server as fallback for business intelligence
3. Compare to data/snapshots/pricing/{company}.json
4. If change detected, alert user with change details
5. Update data/snapshots/pricing/{company}.json
6. Save pricing report to data/reports/{date}/pricing-{company}-{date}.md
7. If html flag is present:
- Read the pricing report markdown
- Use ui-ux-pro-max skill: /skill ui-ux-pro-max
- Generate HTML report with Tailwind dark theme
- Save to data/reports/html/pricing-{company}-{date}.html
8. Output pricing table
Pricing Deep Dive Mode
When {{mode}} is pricing-deep-dive:
1. Read {{company}} from args
2. Research comprehensive pricing data from (following fallback order):
- Company website (web-fetch first for pricing pages)
- G2, Capterra, TrustRadius for verified pricing
- News articles mentioning pricing changes
- Tavily MCP server for business intelligence
3. Load previous snapshot from data/pricing-snapshots/{company}.json (if exists)
4. Build PricingSnapshot using scripts/pricing_analyzer.py:
from scripts.pricing_analyzer import PricingSnapshot, Plan, PricingAnalyzer, save_snapshot snapshot = PricingSnapshot(
company="CompanyName",
last_updated="2026-04-07",
plans=[
Plan(
name="Pro",
type="subscription",
price=20.0,
period="monthly",
users=10,
api_access=True,
price_per_1m_input=1.0,
price_per_1m_output=3.0,
features=["API Access", "Advanced Analytics", "Priority Support"]
)
],
enterprise=True,
free_tier=True,
sources=["https://example.com/pricing"]
)
5. Compute value scores using PricingAnalyzer:
analyzer = PricingAnalyzer(subscription_baseline=10.0, api_baseline=1.0)
for plan in snapshot.plans:
score = analyzer.compute_value_score(plan)
print(f"{plan.name}: {score:.2f}")
6. Detect changes using PricingChangeDetector:
from scripts.pricing_analyzer import PricingChangeDetector detector = PricingChangeDetector(any_change=True) # Alert on ANY change
if old_snapshot:
changes = detector.detect_change(old_snapshot, new_snapshot)
for change in changes:
print(f"ALERT: {change.description}")
7. Save snapshot to data/pricing-snapshots/{company}.json
8. Generate deep dive report using template:
- Read templates/report/markdown/pricing-deep-dive-template.md
- Fill in all sections: Executive Summary, Value Comparison, Plan Breakdown, Pricing History, Alert Log
- Save to data/reports/{date}/pricing-deep-dive-{company}-{date}.md
9. Output summary with value scores and any detected changesKey Features:
Batch Mode
Multi-Agent Parallel Implementation (see modes/batch.md for full details)
When {{mode}} is batch:
1. Read optional tier filter from args (e.g., batch tier 1 β only Tier 1)
2. Check for data/batch-queue.md file with list of companies
3. If file doesn't exist, prompt user to create it
4. Filter by tier if specified (e.g., tier 1 β only ## Tier 1 section)
5. Create agent team using TeamCreate
6. Spawn parallel agents - one per company (max 5 concurrent)
7. Each agent runs full analyze workflow independently
8. Track progress in data/batch-status.json
9. Consolidate results from all agents
10. Output batch summary
Key Feature: Uses Claude Code multi-agent for ~3x speedup
Batch Queue Format
Create data/batch-queue.md:
# Batch QueueTier 1 (Direct Competitors)
Anthropic
OpenAI
Google DeepMind Tier 2 (Indirect Competitors)
Mistral
Cohere
Meta AI Tier 3 (Emerging)
Character.AI
Inflection
Or use CSV format in data/batch-queue.csv:
company,tier,priority
Anthropic,1,high
OpenAI,1,high
Mistral,2,medium
Report Mode
When {{mode}} is report:
1. Check for optional html flag and filters in args (company, date range)
2. Aggregate all reports in data/reports/
3. Generate consolidated report in data/reports/{date}/consolidated-{date}.md
4. If html flag is present in args:
- Read the consolidated markdown report
- Generate HTML with ECharts visualizations:
- Score bar chart (ranking by overall score)
- Radar chart (6 dimensions across all competitors)
- Pricing heatmap (input/output prices by model)
- Pricing change detection:
- Compare with data/snapshots/pricing/{company}.json
- Highlight price changes with π΄ alert badges
- Show delta (e.g., "-67%", "+20%")
- Generate HTML report with Tailwind dark theme + ECharts
- Save to data/reports/html/index.html
5. Output path to report (include HTML path if generated)
ECharts Integration:
https://cdn.jsdelivr.net/npm/echarts@5.4.3/dist/echarts.min.jsHTML Template CSS (include in ):
Every section, inner div, and table should have page-break-inside: avoid to prevent content from splitting across PDF pages.Chart Layout Guidelines:
grid-cols-2 for radar + heatmap side-by-side layoutMonitor Mode
When {{mode}} is monitor:
Use /loop skill to set up continuous competitive intelligence monitoring:
1. Read optional interval from args (e.g., monitor daily, monitor weekly)
- Default: weekly
- Options: daily, weekly, monthly
2. Parse companies from data/competitors.md
3. Set up cron job using /loop:
/loop [interval] /competitive-ops update [company]
4. For full batch monitoring:
/loop [interval] /competitive-ops batch
5. Store schedule in data/.monitor-schedule.json:
{
"enabled": true,
"interval": "weekly",
"last_run": "2026-04-07",
"next_run": "2026-04-14",
"companies": ["Anthropic", "OpenAI", "..."]
}
6. Output confirmation with schedule detailsAvailable Intervals:
daily -- 57 8 * * * (8:57 AM local, off-minute to avoid load spike)weekly -- 57 8 * * 1 (Monday 8:57 AM local)monthly -- 57 8 1 * * (1st of month 8:57 AM local)Monitoring Scope:
PDF Mode
When {{mode}} is pdf:
Export reports to PDF for external sharing:
1. Read optional report arg (default: latest consolidated report)
- pdf β export data/reports/html/index.html
- pdf anthropic β export data/reports/html/anthropic-{date}.html
2. Run PDF export script:
node scripts/export_pdf.js data/reports/html/index.html
The script uses Playwright to:
- Wait for ECharts to fully render (3 second delay)
- Verify 3 ECharts instances are present
- Generate A4 PDF with header/footer
3. Save PDF to data/reports/pdf/{date}/{report}-{date}.pdf
4. Output PDF path and file sizePDF Script Implementation (scripts/export_pdf.js):
const { chromium } = require('playwright');
// - Launches headless Chromium
// - Sets viewport to 1200x1600 for proper rendering
// - Waits for networkidle + 3s for ECharts
// - Generates A4 PDF with margins and page numbers
// - Adds footer: "Page X of Y | competitive-ops v2 | {date}"
HTML CSS for PDF Page Breaks:
Add to of HTML reports:
PDF Output Locations:
| Report | PDF Location |
|--------|-------------|
| Consolidated | data/reports/pdf/{date}/index-{date}.pdf |
| Company | data/reports/pdf/{date}/{company}-{date}.pdf |
| Comparison | data/reports/pdf/{date}/compare-{A}-vs-{B}-{date}.pdf |
Styling for PDF:
PNG Mode
When {{mode}} is png:
Export reports to PNG/JPEG image for visual sharing:
1. Read optional report arg (default: latest consolidated report)
- png β export data/reports/html/index.html
- png anthropic β export specific company report
2. Run image export script:
node scripts/export_image.js data/reports/html/index.html
The script uses Playwright to:
- Wait for ECharts to fully render (3 second delay)
- Verify ECharts instances are present
- Capture viewport screenshot (default 1400x900) or full page
3. Save image to data/reports/images/{date}/{report}-{date}.png
4. Output image path, file size, and formatImage Script Options (scripts/export_image.js):
node scripts/export_image.js [html-path] [options]
-o, --output Output file path
-f, --full Capture full page (not just viewport)
-j, --jpeg Export as JPEG (default: PNG)
Image Output Locations:
| Report | Image Location |
|--------|---------------|
| Consolidated | data/reports/images/{date}/index-{date}.png |
| Company | data/reports/images/{date}/{company}-{date}.png |
Image Features:
Track Mode
When {{mode}} is track:
1. Read data/competitors.md
2. Display dashboard:
- All competitors with scores
- Last updated dates
- Alert indicators (stale data, significant changes)
- Filter by tier, score, status
3. Output formatted table
Shared Context
All modes have access to:
cv.md -- Your company/product definitionconfig/profile.yml -- Configurationconfig/sources.yml -- Trusted data sourcesmodes/_shared.md -- Scoring system, archetypes, rulesmodes/_profile.md -- Your customizationsScoring System
Reference values (customizable in modes/_profile.md or config/profile.yml):
| Dimension | Default Weight | |-----------|---------------| | Product Maturity | 20% | | Feature Coverage | 20% | | Pricing | 15% | | Market Presence | 15% | | Growth Trajectory | 10% | | Brand Strength | 10% |
Confidence Levels (customizable):
Archetypes
Reference types (customizable in modes/_profile.md or config/profile.yml):
Classify competitors into:
Output Locations
Standard Structure: All reports are organized by date in data/reports/{date}/, with latest/ containing symlinks only.
| Output | Location |
|--------|----------|
| Analysis Report | data/reports/{date}/{company}-{date}.md |
| Latest Symlink | data/reports/latest/{company}.md β ../{date}/{company}-{date}.md |
| Comparison Report | data/reports/{date}/compare-{A}-vs-{B}-{date}.md |
| Pricing Report | data/reports/{date}/pricing-{company}-{date}.md |
| Pricing Deep Dive Report | data/reports/{date}/pricing-deep-dive-{company}-{date}.md |
| Pricing Snapshot (JSON) | data/pricing-snapshots/{company}.json |
| Consolidated Report | data/reports/{date}/consolidated-{date}.md |
| HTML Report | data/reports/html/{company}-{date}.html |
| PDF Report | data/reports/pdf/{date}/{company}-{date}.pdf |
| Image (PNG) | data/reports/images/{date}/{company}-{date}.png |
| Snapshot (update diff) | data/snapshots/{company}/{date}.json |
| Pricing Snapshot | data/snapshots/pricing/{company}.json |
| Monitor Schedule | data/.monitor-schedule.json |
| Screenshot (Playwright) | data/reports/screenshots/{company}-{date}.png |
| Competitor Tracker | data/competitors.md |
Snapshot Usage:
update mode compares old vs new report scores (default β₯5% triggers alert, customizable)pricing mode compares historical pricing changesPlaywright Usage:
analyze / report modeNote: Reports are never overwritten β each run creates a new dated file. Use update mode for incremental change tracking.
Next Steps
After routing, execute the selected mode by reading:
modes/{mode}.md for mode-specific instructionsmodes/_shared.md for system contextmodes/_profile.md for user customizationsAgent Implementation
For batch mode, use multi-agent architecture:
/competitive-ops batch tier 1
β
TeamCreate: competitive-batch-{timestamp}
β
Agent analyzer-1 β analyze Anthropic (parallel)
Agent analyzer-2 β analyze OpenAI (parallel)
Agent analyzer-3 β analyze Google DeepMind (parallel)
β
Wait for all agents to complete
β
Consolidate results β output batch summary
Each agent executes independently using the analyze workflow.