Competitor Monitor
Monitor competitor website changes with automated change detection and alert notifications.
Overview
Track competitor websites and get notified when they make changes. The skill monitors website content, tracks changes using content hashing, and provides alerts for important updates.
Features
- Website Monitoring: Track any publicly accessible website
- Change Detection: Content hash comparison for accurate change detection
- Keyword Monitoring: Get alerted when specific keywords appear or disappear
- Change Classification: Changes categorized by type (content, status, keyword) and severity (info, minor, major, critical)
- Snapshot History: Keep historical snapshots of competitor websites
- Alert Management: Unread/read status for tracking reviewed changes
- Analysis Tools: Trend analysis and change statistics
Installation
cd skills/competitor-monitor
npm install
npm run build
Configuration
No external API keys required. The skill uses direct HTTP fetching for website monitoring.
Usage
Add a Competitor
# Basic usage
competitor-monitor add "Acme Corp" https://acme.com
# With monitoring options
competitor-monitor add "Competitor X" https://example.com \
--frequency hourly \
--keywords "pricing,features,launch" \
--email alerts@yourcompany.com
Check for Changes
# Check all competitors
competitor-monitor check
# Check specific competitor
competitor-monitor check 1
View Changes
# All changes
competitor-monitor changes
# Changes for specific competitor
competitor-monitor changes 1
# Only unread changes
competitor-monitor changes --unread
View Snapshots
competitor-monitor snapshots 1
Analysis
# View statistics
competitor-monitor stats
# Analyze change patterns
competitor-monitor analyze 1 30
API Usage
import { CompetitorMonitorSkill } from '@openclaw/competitor-monitor';
const monitor = new CompetitorMonitorSkill();
// Add a competitor
const competitor = await monitor.addCompetitor({
name: 'Acme Corp',
url: 'https://acme.com',
checkFrequency: 'daily',
keywords: ['pricing', 'new product'],
isActive: true
});
// Check for changes
const result = await monitor.detectChanges(competitor.id!);
if (result.hasChanged) {
console.log('Changes detected:', result.changes);
}
// Get all unread changes
const changes = await monitor.getChanges(undefined, true);
// Close connection
await monitor.close();
Database Schema
Competitors Table
id- Primary keyname- Competitor nameurl- Website URL to monitordescription- Optional descriptioncheck_frequency- hourly, daily, or weeklyis_active- Whether monitoring is activealert_email- Email for alertsalert_webhook- Webhook URL for alertskeywords- JSON array of keywords to monitor
Snapshots Table
id- Primary keycompetitor_id- Foreign key to competitorcontent_hash- SHA256 hash of contentcontent_preview- Text preview of contenthttp_status- HTTP response codecontent_length- Content size in bytesfetched_at- Timestamp
Changes Table
id- Primary keycompetitor_id- Foreign key to competitorsnapshot_id- Foreign key to snapshotchange_type- content, status, keyword_matchseverity- info, minor, major, criticaldescription- Human-readable change descriptionis_read- Whether change has been revieweddetected_at- Timestamp
CLI Reference
| Command | Description |
|---|---|
add <name> <url> |
Add a competitor to monitor |
list |
List all competitors |
get <id|name> |
Get competitor details |
update <id> |
Update competitor settings |
delete <id> |
Delete a competitor |
check [id] |
Check for changes |
changes [id] |
View detected changes |
read <id|all> |
Mark change(s) as read |
snapshots <id> |
View snapshots |
stats |
View statistics |
analyze <id> |
Analyze change patterns |
health |
Check system health |
Change Types
- content - Website content has changed
- status - HTTP status code changed
- keyword_match - Monitored keyword detected in content
- screenshot - Visual change detected (placeholder for future)
Severity Levels
- 🔴 critical - Site down (4xx/5xx errors)
- 🟠 major - Significant content changes (>50%)
- 🟡 minor - Moderate content changes (20-50%)
- 🔵 info - Minor changes (<20%)