mcpField
W
web-monitor

web-monitor

github.com/rogue-agent1生産性056 回インストール33 週間前に更新
リポジトリ

web-monitor について

web-monitor は、Web ページの変更を追跡するコマンドラインスキルです。スナップショットと差分を保存し、CSS セレクターでページ内の特定領域を監視できます。

主な機能

  1. 01URL の監視と初回スナップショット
  2. 02CSS セレクターによる領域指定
  3. 03単一または全ページの変更確認
  4. 04スナップショットと差分の表示
  5. 05プログラム確認向け JSON 出力

活用シーン

  1. 01商品価格の変更追跡
  2. 02記事一覧の新着監視
  3. 03定期実行で複数ページを確認

インストール

コマンドをコピーしてターミナルで実行します。

$npx skills add https://github.com/rogue-agent1/web-monitor --skill web-monitor

インストール後、Claude Code で/web-monitorを入力して読み込まれたか確認します。

同梱ファイル

SKILL.md と一緒にインストールされる参考資料やスクリプト。

README.md
LICENSE
scripts/
monitor.py

詳細

Web Monitor

Web ページの変更を追跡します。スナップショットを保存し、差分を計算します。CSS セレクターに対応しています。

クイックスタート

# Add a URL to watch
uv run --with beautifulsoup4 python scripts/monitor.py add "https://example.com" --name "Example"

# Add with CSS selector (monitor specific section)
uv run --with beautifulsoup4 python scripts/monitor.py add "https://example.com/pricing" -n "Pricing" -s ".pricing-table"

# Check all watched URLs for changes
uv run --with beautifulsoup4 python scripts/monitor.py check

# Check one specific URL
uv run --with beautifulsoup4 python scripts/monitor.py check "Example"

# List watched URLs
uv run --with beautifulsoup4 python scripts/monitor.py list

# View last diff
uv run --with beautifulsoup4 python scripts/monitor.py diff "Example"

# View current snapshot
uv run --with beautifulsoup4 python scripts/monitor.py snapshot "Example" --lines 50

# Remove
uv run --with beautifulsoup4 python scripts/monitor.py remove "Example"

コマンド

コマンド引数説明
add<url> [-n name] [-s selector]監視対象の URL を追加し、初回スナップショットを取得します
remove<url-or-name>URL の監視を停止します
list[-f json]監視中の URL と統計情報を一覧表示します
check[url-or-name] [-f json]変更を確認します(すべて、または 1 つ)
diff<url-or-name>最後に記録された差分を表示します
snapshot<url-or-name> [-l lines]現在のスナップショットを表示します

出力記号

  • 🔔 CHANGED — ページの内容が変更されました(差分のプレビューを表示)
  • ✅ 変更なし
  • 📸 初回スナップショットを取得しました
  • ❌ 取得エラー

データ

~/.web-monitor/ に保存されます(WEB_MONITOR_DIR 環境変数で変更できます):

  • watches.json — 監視リストの設定
  • snapshots/ — 保存されたページの内容と差分

ヒント

  • 特定の要素(価格、記事一覧など)を監視するには、--selector を使用します
  • プログラムから変更を確認するには、--format json を使用します(ハートビート連携)
  • CSS セレクターには beautifulsoup4 が必要です(--with フラグで含まれます)
  • タイムスタンプ、空白、広告によるノイズを減らすため、テキストは正規化されます

コメント