Token导航 LogoToken导航TokenDH.com
研究检索操作浏览器github未标认证来源可访问许可证需确认审计提醒

web-monitor-bot网络监控机器人

Agent Skill

web-monitor-bot 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

339

周安装

14

GitHub Stars

1

下载量

111
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:web-monitor-bot(网络监控机器人)
来源仓库:https://github.com/tianqiye/tockstalk-bot
仓库路径:skills/web-monitor-bot
安装命令:
npx skills add https://github.com/tianqiye/tockstalk-bot --skill web-monitor-bot
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/tianqiye/tockstalk-bot --skill web-monitor-bot

简介

用于查找、检索和筛选网络监控相关技术信息,支持运维场景。

  • 适合根据关键词或任务需求快速定位候选工具和实现方案。
  • 通过 GitHub 仓库安装,支持 Codex、Claude、Cursor、Gemini CLI 等宿主。
  • 使用前应核实仓库维护状态和权限范围,确保监控目标合法且符合策略。
  • web-monitor-bot 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Web Monitor Bot

Overview

Create automated website monitoring systems with analytics dashboards. This skill generates a complete monitoring solution including a Playwright-based bot, configurable cron scheduling, real-time analytics dashboard, and intelligent notification system. Use when the user needs to track website changes, detect availability, or monitor specific conditions over time.

When to Use This Skill

Invoke this skill when the user requests:

  • "Monitor this website for changes"
  • "Alert me when this product is back in stock"
  • "Check this booking page every 5 minutes"
  • "Track when appointment slots become available"
  • "Watch this page and show me usage patterns"
  • Any scenario requiring periodic automated web checks with data analysis

Quick Start Workflow

1. Initial Setup

Run the interactive setup script to create a new monitoring project:

bash scripts/setup-monitor.sh

The script will:

  • Create project directory
  • Copy template files
  • Configure target URL and notification settings
  • Install dependencies
  • Set up cron schedule
  • Initialize analytics

2. Customize Detection Logic

Edit bot.js to implement custom monitoring logic. Look for TODO comments:

// TODO: Customize selector logic for your use case
const selector = process.env.TARGET_SELECTOR || 'body';

// TODO: Add custom detection logic here
// Examples:
// - Check if element exists
// - Extract and compare text
// - Verify button state
// - Monitor price changes

Common patterns are documented in references/playwright-selectors.md.

3. Test the Bot

Run manually to verify detection logic:

node bot.js

Check that:

  • Page loads correctly
  • Selectors find target elements
  • Detection logic works as expected
  • Analytics are logged to analytics.json

4. Activate Monitoring

Add to crontab for automated checking:

(crontab -l 2>/dev/null; echo "*/5 * * * * /path/to/project/run-bot.sh >> /path/to/project/bot.log 2>&1") | crontab -

5. View Analytics

Start the dashboard server:

./start-analytics.sh

Open http://localhost:3002 to view:

  • Total check count and match rate
  • Hourly activity patterns
  • Day-of-week trends
  • Real-time activity timeline

Common Use Cases

Use Case 1: Product Stock Monitor

User request: "Alert me when this product comes back in stock"

Implementation steps:

  1. Set TARGET_URL to product page
  2. Customize bot logic to check for "Add to Cart" button: const addToCartButton = page.locator('button:has-text("Add to Cart")'); const isAvailable = await addToCartButton.isEnabled(); if (isAvailable) {await log('🛒 PRODUCT AVAILABLE!'); analyticsData.foundMatch = true;}
  3. Set cron to check every 5-15 minutes
  4. Configure Slack webhook for instant notifications

Use Case 2: Appointment Slot Tracker

User request: "Monitor this DMV website for available appointment dates"

Implementation steps:

  1. Set TARGET_URL to appointment page
  2. Customize to find available date elements: ` const availableDates = await page.$$('.calendar-day.available'); if (availableDates.length > 0) {await log(📅 Found ${availableDates.length} available dates!); analyticsData.foundMatch = true; analyticsData.data.dates = availableDates.length;} `
  3. Check every 5-10 minutes during business hours
  4. Use analytics to identify when slots typically appear

Use Case 3: Event Ticket Monitor

User request: "Watch this Ticketmaster page for concert tickets"

Implementation steps:

  1. Set TARGET_URL to event page
  2. Check for ticket availability indicators: const soldOutMessage = await page.locator('text=Sold Out').count(); if (soldOutMessage === 0) {await log('🎟️ TICKETS AVAILABLE!'); analyticsData.foundMatch = true;}
  3. Peak window pattern: More frequent checks when tickets release
  4. Analytics show release patterns for future events

Use Case 4: Restaurant Reservation Bot

User request: "Check this Tock restaurant every 5 minutes for open tables"

Implementation steps:

  1. Set TARGET_URL to restaurant booking page
  2. Implement login logic if required (save cookies for session persistence)
  3. Add Cloudflare detection after page load
  4. Check calendar for available days with human-like behavior: ` // Check for Cloudflare first await detectCloudflare(page, context, 'booking page'); // Random delay before checking calendar await page.waitForTimeout(randomDelay(1000, 2000)); const availableDays = await page.$$('[data-testid="calendar-day"][aria-disabled="false"]'); if (availableDays.length > 0) {await log(📅 Found ${availableDays.length} available days!); // Human-like click on first available day await humanClick(page, '[data-testid="calendar-day"][aria-disabled="false"]');} `
  5. Use peak window pattern for known release times (6pm PT, etc.)
  6. Analytics track cloudflareBlocked to identify blocking patterns

Analytics Dashboard Features

The auto-generated dashboard (dashboard.html) provides:

Real-Time Metrics:

  • Total checks performed
  • Match rate percentage
  • Time since last check
  • Peak vs off-peak statistics

Pattern Visualization:

  • Hourly heatmap: Identifies when changes typically occur
  • Day-of-week chart: Shows weekly patterns
  • Timeline graph: Visual history of recent checks
  • Activity feed: Live feed of recent events

Use Analytics For:

  1. Optimization: Adjust cron schedule based on actual patterns
  2. Validation: Confirm bot is running and detecting correctly
  3. Insights: Discover when target conditions actually occur
  4. Reporting: Share monitoring data with stakeholders

Notification Strategy

The template implements smart notification logic:

Always notify (via Slack/webhook):

  • ✅ Match found (target condition met)
  • ❌ Critical errors (login failures, selector errors)
  • 🚨 First detection of availability

Console only (no notifications):

  • ⚪ No match found (routine check)
  • 🔑 Session reuse
  • 📊 Analytics logging

To customize notification behavior, edit the log() vs consoleLog() function calls in bot.js.

Cron Scheduling Patterns

Common patterns documented in references/cron-patterns.md:

High-Frequency Monitoring:

*/5 * * * * /path/to/run-bot.sh  # Every 5 minutes

Business Hours Only:

*/10 9-17 * * 1-5 /path/to/run-bot.sh  # Every 10 min, 9-5 weekdays

Peak Window Pattern:

59 19 * * * /path/to/peak-run.sh      # 4 rapid checks at known time
*/15 * * * * /path/to/run-bot.sh      # Every 15 min otherwise

Session Persistence

The bot template includes cookie-based session management:

// Saves cookies after login
await saveCookies(context);

// Loads cookies on next run (avoids re-login)
const hasCookies = await loadCookies(context);

Benefits:

  • Faster execution (skip login flow)
  • Avoid rate limiting from repeated logins
  • Maintain user state across checks

Update the login logic in bot.js for website-specific authentication.

Anti-Detection Features (Production-Tested)

The bot template includes production-tested anti-detection utilities to reduce Cloudflare challenges and bot detection:

Random Delays

Replace fixed timing with random delays to avoid robotic patterns:

// Bad: Fixed timing (robotic)
await page.waitForTimeout(3000);

// Good: Random timing (human-like)
await page.waitForTimeout(randomDelay(2000, 4000));

Human-Like Mouse Movement

Simulate natural cursor movement before clicks:

// Bad: Instant click (teleporting cursor)
await page.click('.button');

// Good: Mouse movement + random position click
await humanClick(page, '.button');

This function:

  • Moves cursor in curved path (random steps)
  • Clicks random position within element (not exact center)
  • Adds random hesitation before click (100-300ms)

Intelligent Cloudflare Handling

Automatically detect and handle Cloudflare Turnstile challenges:

// Check for Cloudflare after page load
await detectCloudflare(page, context, 'initial load');

Features:

  • Smart polling: Checks every 10s for up to 90s (not single wait)
  • Block tracking: Tracks consecutive/total blocks in cloudflare-blocks.json
  • Auto-screenshots: cloudflare-detected.png, cloudflare-cleared.png, cloudflare-timeout.png
  • Cookie persistence: Saves session immediately after challenge clears
  • Progress updates: Console logs every 30s
  • Alert on repeated blocks: Warns if 3+ consecutive blocks occur

Block Analytics:

const blocks = getCloudflareBlocks();
console.log(`Consecutive blocks: ${blocks.consecutive}`);
console.log(`Total blocks: ${blocks.total}`);
console.log(`Last 10 events:`, blocks.history.slice(-10));

The analytics.json file tracks cloudflareBlocked: boolean per run for pattern analysis.

Stealth Mode

The template uses playwright-extra with puppeteer-extra-plugin-stealth to mask automation signals:

const { chromium } = require('playwright-extra');
const stealth = require('puppeteer-extra-plugin-stealth')();
chromium.use(stealth);

This hides common bot indicators like navigator.webdriver, headless Chrome flags, and automation properties.

Usage in Custom Detection Logic

Integrate anti-detection utilities in custom monitoring code:

// Example: Check availability with human-like behavior
await page.waitForTimeout(randomDelay(1000, 2000)); // Random delay
const available = await page.locator('.available-slot').count() > 0;

if (available) {
  await humanClick(page, '.available-slot'); // Mouse movement
  await page.waitForTimeout(randomDelay(500, 1000));
  // ... continue workflow
}

Concurrency Protection

The template includes lock file management to prevent overlapping executions:

checkLock();    // Exit if another instance is running
createLock();   // Create lock for this instance
removeLock();   // Clean up on exit

This ensures:

  • No duplicate checks
  • Safe cron scheduling
  • Clean process management

Advanced Customization

Peak Window Detection

Add time-based logic for higher-traffic periods:

const now = new Date();
const hour = now.getUTCHours();
const isPeakWindow = (hour === 19 && minute === 59);  // 7:59 PM UTC

// Use longer timeouts during peak
const timeout = isPeakWindow ? 60000 : 30000;

Screenshot on Match

Capture evidence when target condition is met:

if (foundMatch) {
  await page.screenshot({ path: `match-${Date.now()}.png` });
  await log('📸 Screenshot saved');
}

Multi-Page Monitoring

Check multiple pages in sequence:

const urls = [url1, url2, url3];
for (const url of urls) {
  await page.goto(url);
  await checkConditions(page);
}

Troubleshooting

Bot not detecting changes:

  1. Run manually with DEBUG=true node bot.js
  2. Check selectors in browser DevTools
  3. Verify page loads completely (increase timeouts)
  4. Review references/playwright-selectors.md for selector techniques

Cron not running:

  1. Verify cron service: systemctl status cron
  2. Check crontab: crontab -l
  3. Review logs: tail -f /path/to/bot.log
  4. Test script manually: bash run-bot.sh

Dashboard not showing data:

  1. Verify analytics.json exists and has data
  2. Check server is running: ps aux | grep analytics-server
  3. Verify port is available: netstat -tuln | grep 3002
  4. Check browser console for errors

Resources

Scripts

  • setup-monitor.sh - Interactive project initialization

References

  • playwright-selectors.md - Element finding techniques and patterns
  • cron-patterns.md - Common scheduling configurations

Assets

  • bot-template.js - Configurable Playwright monitoring bot
  • analytics-server.js - Express server for dashboard
  • dashboard.html - Real-time analytics visualization
  • package.json - Node.js dependencies
  • .env.example - Configuration template

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

33.09%
按下载量换算37

Claude

31.93%
按下载量换算35

Cursor

19.79%
按下载量换算22

Gemini CLI

9.4%
按下载量换算10

安全审计

Gen Agent Trust Hub

可疑

Socket

可疑

Snyk

可疑

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills