Back to Skills
    ๐Ÿฆž

    topic-monitor

    Monitor topics of interest and proactively alert

    By @robbyczgw-cla
    View on GitHub
    SKILL.md
    ---
    name: topic-monitor
    version: 1.2.1
    description: Monitor topics of interest and proactively alert when important developments occur. Use when user wants automated monitoring of specific subjects (e.g., product releases, price changes, news topics, technology updates). Supports scheduled web searches, AI-powered importance scoring, smart alerts vs weekly digests, and memory-aware contextual summaries.
    metadata: {"clawdbot":{"requires":{"bins":["python3"],"env":[]}}}
    ---
    
    # Topic Monitor
    
    **Monitor what matters. Get notified when it happens.**
    
    Topic Monitor transforms your assistant from reactive to proactive by continuously monitoring topics you care about and intelligently alerting you only when something truly matters.
    
    ---
    
    ## โšก Quick Start (New in v1.2.0!)
    
    **Just want to monitor one topic? One command:**
    
    ```bash
    python3 scripts/quick.py "AI Model Releases"
    ```
    
    That's it! This creates a topic with sensible defaults:
    - **Query:** Auto-generated from topic name
    - **Keywords:** Extracted from topic name
    - **Frequency:** Daily
    - **Importance:** Medium
    - **Channel:** Telegram
    
    ### Quick Start Options
    
    ```bash
    # Basic - just a topic name
    python3 scripts/quick.py "Bitcoin Price"
    
    # With keywords
    python3 scripts/quick.py "Security CVEs" --keywords "CVE,vulnerability,critical"
    
    # High priority, hourly checks
    python3 scripts/quick.py "Production Alerts" --frequency hourly --importance high
    
    # Custom query
    python3 scripts/quick.py "Competitor News" --query "CompanyName product launch funding"
    
    # Different channel
    python3 scripts/quick.py "Team Updates" --channel discord
    ```
    
    ### Quick Start vs Full Setup
    
    | Feature | Quick Start | Full Setup |
    |---------|-------------|------------|
    | Speed | โšก 1 command | ๐Ÿ“ Wizard |
    | Defaults | Smart | Customizable |
    | Use case | Single topic | Multiple topics |
    | Configuration | Minimal | Full control |
    
    **After Quick Start, you can always customize:**
    ```bash
    python3 scripts/manage_topics.py edit ai-model-releases --frequency hourly
    ```
    
    ---
    
    ## Core Capabilities
    
    1. **Topic Configuration** - Define subjects with custom parameters
    2. **Scheduled Monitoring** - Automated searches at configurable intervals
    3. **AI Importance Scoring** - Smart filtering: immediate alert vs digest vs ignore
    4. **Contextual Summaries** - Not just linksโ€”meaningful summaries with context
    5. **Weekly Digest** - Low-priority findings compiled into readable reports
    6. **Memory Integration** - References your past conversations and interests
    
    ---
    
    ## Full Setup (Interactive Wizard)
    
    For configuring multiple topics or advanced options:
    
    ```bash
    python3 scripts/setup.py
    ```
    
    The wizard will guide you through:
    
    1. **Topics** - What subjects do you want to monitor?
    2. **Search queries** - How to search for each topic
    3. **Keywords** - What terms indicate relevance
    4. **Frequency** - How often to check (hourly/daily/weekly)
    5. **Importance threshold** - When to send alerts (low/medium/high)
    6. **Weekly digest** - Compile non-urgent findings into a summary
    
    The wizard creates `config.json` with your preferences. You can always edit it later or use `manage_topics.py` to add/remove topics.
    
    **Example session:**
    ```
    ๐Ÿ” Topic Monitor - Setup Wizard
    
    What topics do you want to monitor?
      > AI Model Releases
      > Security Vulnerabilities
      > 
    
    --- Topic 1/2: AI Model Releases ---
      Search query for 'AI Model Releases' [AI Model Releases news updates]: new AI model release announcement
      Keywords to watch for in 'AI Model Releases'?
      > GPT, Claude, Llama, release
    
    --- Topic 2/2: Security Vulnerabilities ---
      Search query for 'Security Vulnerabilities' [Security Vulnerabilities news updates]: CVE critical vulnerability patch
      Keywords to watch for in 'Security Vulnerabilities'?
      > CVE, vulnerability, critical, patch
    
    How often should I check for updates?
      1. hourly
      2. daily *
      3. weekly
    
    โœ… Setup Complete!
    ```
    
    ## Quick Start
    
    Already know what you're doing? Here's the manual approach:
    
    ```bash
    # Initialize config from template
    cp config.example.json config.json
    
    # Add a topic
    python3 scripts/manage_topics.py add "Product Updates" \
      --keywords "release,update,patch" \
      --frequency daily \
      --importance medium
    
    # Test monitoring (dry run)
    python3 scripts/monitor.py --dry-run
    
    # Set up cron for automatic monitoring
    python3 scripts/setup_cron.py
    ```
    
    ## Topic Configuration
    
    Each topic has:
    
    - **name** - Display name (e.g., "AI Model Releases")
    - **query** - Search query (e.g., "new AI model release announcement")
    - **keywords** - Relevance filters (["GPT", "Claude", "Llama", "release"])
    - **frequency** - `hourly`, `daily`, `weekly`
    - **importance_threshold** - `high` (alert immediately), `medium` (alert if important), `low` (digest only)
    - **channels** - Where to send alerts (["telegram", "discord"])
    - **context** - Why you care (for AI contextual summaries)
    
    ### Example config.json
    
    ```json
    {
      "topics": [
        {
          "id": "ai-models",
          "name": "AI Model Releases",
          "query": "new AI model release GPT Claude Llama",
          "keywords": ["GPT", "Claude", "Llama", "release", "announcement"],
          "frequency": "daily",
          "importance_threshold": "high",
          "channels": ["telegram"],
          "context": "Following AI developments for work",
          "alert_on": ["model_release", "major_update"]
        },
        {
          "id": "tech-news",
          "name": "Tech Industry News",
          "query": "technology startup funding acquisition",
          "keywords": ["startup", "funding", "Series A", "acquisition"],
          "frequency": "daily",
          "importance_threshold": "medium",
          "channels": ["telegram"],
          "context": "Staying informed on tech trends",
          "alert_on": ["major_funding", "acquisition"]
        },
        {
          "id": "security-alerts",
          "name": "Security Vulnerabilities",
          "query": "CVE critical vulnerability security patch",
          "keywords": ["CVE", "vulnerability", "security", "patch", "critical"],
          "frequency": "hourly",
          "importance_threshold": "high",
          "channels": ["telegram", "email"],
          "context": "DevOps security monitoring",
          "alert_on": ["critical_cve", "zero_day"]
        }
      ],
      "settings": {
        "digest_day": "sunday",
        "digest_time": "18:00",
        "max_alerts_per_day": 5,
        "deduplication_window_hours": 72,
        "learning_enabled": true
      }
    }
    ```
    
    ## Scripts
    
    ### manage_topics.py
    
    Manage research topics:
    
    ```bash
    # Add topic
    python3 scripts/manage_topics.py add "Topic Name" \
      --query "search query" \
      --keywords "word1,word2" \
      --frequency daily \
      --importance medium \
      --channels telegram
    
    # List topics
    python3 scripts/manage_topics.py list
    
    # Edit topic
    python3 scripts/manage_topics.py edit eth-price --frequency hourly
    
    # Remove topic
    python3 scripts/manage_topics.py remove eth-price
    
    # Test topic (preview results without saving)
    python3 scripts/manage_topics.py test eth-price
    ```
    
    ### monitor.py
    
    Main monitoring script (run via cron):
    
    ```bash
    # Normal run (alerts + saves state)
    python3 scripts/monitor.py
    
    # Dry run (no alerts, shows what would happen)
    python3 scripts/monitor.py --dry-run
    
    # Force check specific topic
    python3 scripts/monitor.py --topic eth-price
    
    # Verbose logging
    python3 scripts/monitor.py --verbose
    ```
    
    **How it works:**
    1. Reads topics due for checking (based on frequency)
    2. Searches using web-search-plus or built-in web_search
    3. Scores each result with AI importance scorer
    4. High-importance โ†’ immediate alert
    5. Medium-importance โ†’ saved for digest
    6. Low-importance โ†’ ignored
    7. Updates state to prevent duplicate alerts
    
    ### digest.py
    
    Generate weekly digest:
    
    ```bash
    # Generate digest for current week
    python3 scripts/digest.py
    
    # Generate and send
    python3 scripts/digest.py --send
    
    # Preview without sending
    python3 scripts/digest.py --preview
    ```
    
    Output format:
    ```markdown
    # Weekly Research Digest - [Date Range]
    
    ## ๐Ÿ”ฅ Highlights
    
    - **AI Models**: Claude 4.5 released with improved reasoning
    - **Security**: Critical CVE patched in popular framework
    
    ## ๐Ÿ“Š By Topic
    
    ### AI Model Releases
    - [3 findings this week]
    
    ### Security Vulnerabilities
    - [1 finding this week]
    
    ## ๐Ÿ’ก Recommendations
    
    Based on your interests, you might want to monitor:
    - "Kubernetes security" (mentioned 3x this week)
    ```
    
    ### setup_cron.py
    
    Configure automated monitoring:
    
    ```bash
    # Interactive setup
    python3 scripts/setup_cron.py
    
    # Auto-setup with defaults
    python3 scripts/setup_cron.py --auto
    
    # Remove cron jobs
    python3 scripts/setup_cron.py --remove
    ```
    
    Creates cron entries:
    ```cron
    # Topic Monitor - Hourly topics
    0 * * * * cd /path/to/skills/topic-monitor && python3 scripts/monitor.py --frequency hourly
    
    # Topic Monitor - Daily topics  
    0 9 * * * cd /path/to/skills/topic-monitor && python3 scripts/monitor.py --frequency daily
    
    # Topic Monitor - Weekly digest
    0 18 * * 0 cd /path/to/skills/topic-monitor && python3 scripts/digest.py --send
    ```
    
    ## AI Importance Scoring
    
    The scorer uses multiple signals to decide alert priority:
    
    ### Scoring Signals
    
    **HIGH priority (immediate alert):**
    - Major breaking news (detected via freshness + keyword density)
    - Price changes >10% (for finance topics)
    - Product releases matching your exact keywords
    - Security vulnerabilities in tools you use
    - Direct answers to specific questions you asked
    
    **MEDIUM priority (digest-worthy):**
    - Related news but not urgent
    - Minor updates to tracked products
    - Interesting developments in your topics
    - Tutorial/guide releases
    - Community discussions with high engagement
    
    **LOW priority (ignore):**
    - Duplicate news (already alerted)
    - Tangentially related content
    - Low-quality sources
    - Outdated information
    - Spam/promotional content
    
    ### Learning Mode
    
    When enabled (`learning_enabled: true`), the system:
    1. Tracks which alerts you interact with
    2. Adjusts scoring weights based on your behavior
    3. Suggests topic refinements
    4. Auto-adjusts importance thresholds
    
    Learning data stored in `.learning_data.json` (privacy-safe, never shared).
    
    ## Memory Integration
    
    Topic Monitor connects 
    
    ... (truncated)