watchers-run
Automatic trigger monitoring for leads
What this skill does
# Watchers Agent - Run Skill
> Manual run of the website change monitoring agent
## When to use
- "run watchers"
- "check website changes"
- "run website monitoring"
- Testing after configuration change
## What it does
Watchers Agent monitors target websites (competitors, clients, partners) for changes and sends Telegram notifications when important updates are detected.
## How to execute
### 1. Full run (production)
```bash
cd $AGENTS_PATH/watchers
python3 watchers_agent.py
```
**What happens:**
- Loads configuration
- Checks targets that are due for checking (by last_checked)
- Downloads content and compares with saved snapshots
- Uses Claude Haiku to filter noise
- Sends Telegram notifications about important changes
- Updates state files
### 2. Dry-run (testing)
```bash
cd $AGENTS_PATH/watchers
python3 watchers_agent.py --dry-run
```
**Use for:**
- Testing after configuration change
- Checking new targets
- Debugging without sending notifications
- Previewing what would be detected
**What does NOT happen:**
- Does not update state files
- Does not send Telegram notifications
- Only shows what would have been done
### 3. Configuration check
```bash
cd $AGENTS_PATH/watchers
python3 watchers_agent.py --validate-config
```
Checks YAML syntax and outputs a list of enabled/disabled targets.
**Use before:**
- Adding new targets
- Changing selectors or thresholds
- First agent run
### 4. Telegram test
```bash
cd $AGENTS_PATH/watchers
python3 watchers_agent.py --notify-test
```
Sends a test notification to verify Telegram integration.
### 5. State reset
```bash
# Preview
python3 watchers_agent.py --reset-state --dry-run
# Actual reset (confirmation required)
python3 watchers_agent.py --reset-state
```
**When to use:**
- After major configuration changes (new selectors)
- If state files are corrupted
- To re-baseline all targets
**WARNING:** The next run after reset will treat all targets as new and may send many alerts.
## Configuration
### Configuration file
`$PROJECT_ROOT/monitoring/watchers/watcher_config.yaml`
### Target example
```yaml
watchers:
- name: "Competitor Careers Page"
url: "https://competitor.com/careers"
type: webpage
selector: "div.job-listings" # CSS selector
priority: high # low|medium|high
check_interval: "1h" # "1h", "4h", "24h"
change_threshold: 5 # % change for alert
tags: ["competitor", "hiring"]
related_crm_id: "comp-competitor-001"
enabled: true
```
### Adding a new target
1. Open `watcher_config.yaml`
2. Add a new element to the `watchers` list
3. Find the correct CSS selector (DevTools -> Inspect)
4. Set `enabled: true`
5. Run `--validate-config` to check
6. Run `--dry-run` for testing
7. Run without flags for production
## Output
### Console
```
[2026-02-12 10:00:00] Loading configuration...
[2026-02-12 10:00:00] Found 5 target(s) due for checking
[2026-02-12 10:00:01] Processing [1/5]: Competitor Careers Page
[2026-02-12 10:00:03] CHANGE DETECTED: 12.3% (modified_content)
[2026-02-12 10:00:05] MEANINGFUL: job_posting - New position posted
[2026-02-12 10:00:10] Done: 5 checked, 2 changed, 1 alerts, 0 errors
```
### Telegram Alert
```
๐ฅ URGENT - Website Change Alert
**Competitor Careers Page**
https://competitor.com/careers
Category: Job Posting
Tags: competitor, hiring
Change: 12.3%
New senior engineer position posted for ML team
Diff preview:
```
+ Senior ML Engineer - Remote
+ We are hiring a senior engineer to join our ML team...
```
๐ก Outreach Trigger Detected
Suggested action: Review competitor hiring activity
Related CRM: comp-competitor-001
```
### State Files
`$PROJECT_ROOT/monitoring/watchers/state/competitor_com_careers.json`
```json
{
"last_checked": "2026-02-12T10:00:00",
"content_hash": "abc123...",
"content_text": "Full page content...",
"metadata": {
"word_count": 1523,
"fetch_timestamp": "2026-02-12T10:00:00",
"http_status": 200
},
"failure_count": 0,
"last_alert_sent": "2026-02-12T10:00:00"
}
```
## Troubleshooting
### "Selector not found"
CSS selector was not found on the page.
**Fix:**
1. Open URL in browser
2. Right-click -> Inspect -> find the correct element
3. Update `selector` in config
### Too many false positives
Changes detected but not meaningful (timestamps, view counts).
**Fix:**
1. Use a more specific selector (exclude dynamic content)
2. Increase `change_threshold` for noisy targets
3. AI filtering should filter these automatically
### Telegram not working
**Check:**
1. Run `--notify-test`
2. Check tg-tools session files
3. Look at stderr logs
4. Check `pending_alerts.txt` for failed alerts
### Missed changes
Changes occurred but no alert was sent.
**Check:**
1. `enabled: true` in config?
2. Change >= `change_threshold`? Decrease threshold
3. AI filter rejected as noise? Check state file diff
4. Check `watcher_log.json` for errors
## Emergency Stop
If the agent is flooding Telegram:
```bash
# Create PAUSE file
touch $PROJECT_ROOT/monitoring/watchers/PAUSE
# Agent will skip the next run
# Remove PAUSE to resume
rm $PROJECT_ROOT/monitoring/watchers/PAUSE
```
## Scheduling (launchd)
### Install
```bash
cp $AGENTS_PATH/watchers/com.yourcompany.watchers-agent.plist \
~/Library/LaunchAgents/
launchctl load ~/Library/LaunchAgents/com.yourcompany.watchers-agent.plist
```
### Check Status
```bash
launchctl list | grep watchers
```
### View Logs
```bash
# stdout
tail -f /tmp/watchers-agent.log
# stderr (main logs here)
tail -f /tmp/watchers-agent-error.log
```
### Uninstall
```bash
launchctl unload ~/Library/LaunchAgents/com.yourcompany.watchers-agent.plist
rm ~/Library/LaunchAgents/com.yourcompany.watchers-agent.plist
```
## Files
| File | Purpose |
|------|---------|
| `watchers_agent.py` | Main script |
| `watcher_config.yaml` | Configuration |
| `watcher_log.json` | Run history (last 100) |
| `pending_alerts.txt` | Failed alerts fallback |
| `state/*.json` | State files per target |
| `PAUSE` | Emergency stop (create to pause) |
## Related
- **Email Agent** (`$GOOGLE_TOOLS_PATH/email_agent.py`) - similar pattern
- **Daily Briefing** (future) - will include watcher alerts
- **CRM Add/Update** (future) - auto-create tasks on triggers
- **Touch Scheduler** (future) - schedule follow-ups
## Owner
Your Name ([email protected])
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.