SkillsGrove
SkillsGrove/숏폼 영상 및 크리에이터/wlzh/skills/wlzh-youtube-tracker

wlzh-youtube-tracker

설치

$npx skills add https://github.com/wlzh/skills --skill wlzh-youtube-tracker
$git clone --depth 1 https://github.com/wlzh/skills.git /tmp/skills && mkdir -p ~/.claude/skills && cp -r /tmp/skills/wlzh-youtube-tracker ~/.claude/skills/wlzh-youtube-tracker
이 Agent Skill을 설치해 주세요: https://github.com/wlzh/skills/tree/0033febb02fce2b1b6feb258ccf2bd0e1bd5d316/wlzh-youtube-tracker — 먼저 SKILL.md와 스크립트를 읽고, 안전하다고 확인한 뒤에만 제 skills 폴더에 설치해 주세요.

요약

원문 설명 · MITTrack YouTube channels for new uploads. Supports both RSS mode (no API key needed, unlimited quota) and API mode. Use when: add/remove/list tracked YouTube channels, check for new videos, or run scheduled YouTube channel monitoring.
아래 SKILL.md는 wlzh/skills(커밋 0033feb)에서 MIT 라이선스에 따라 게시한 것입니다. 본문은 변경하지 않았으며, 파일 상단의 메타데이터만 생략하고 이미지는 링크로 표시하며 매우 긴 파일은 일부만 표시합니다. Copyright 2024 wlzh. 라이선스: LICENSE. 지침 파일만 표시되며 스크립트 등은 원본 저장소를 참고하세요.

wlzh-youtube-tracker

A script-backed Skill to maintain a list of tracked YouTube channels and periodically check for new uploads.

v3.1.0 - Self-contained Telegram Sending (2026-06-06)

Critical reliability fix — script now sends Telegram directly, no LLM relay needed.

Changes

  • notify sends Telegram directly: Script calls Telegram Bot API itself, no LLM relay
  • Atomic seen marking: Only marks video as seen AFTER successful Telegram send
  • Auto-retry on failure: Failed sends stay "unseen", next cron cycle retries automatically
  • Reads bot token from ~/.openclaw/openclaw.json: No extra config needed
  • Fallback mode: If bot token unavailable, falls back to stdout output for LLM relay

Bug fix

  • v3.0.0 had a critical bug: notify marked videos as seen immediately upon detection, but Telegram sending was done by LLM. If LLM failed (rate limit/timeout), videos were lost forever — marked as seen but never sent. v3.1.0 fixes this completely.

v3.0.0 - Parallel Fetching + Notify Mode (2026-06-06)

Major performance optimization — parallel fetching, ~10x faster.

Changes

  • Parallel HTTP fetching: All channels now fetch concurrently (15 parallel curl processes)
  • ~10x faster: 55 channels check in ~4-5 seconds (was ~45 seconds with serial curl)
  • New notify command: Outputs Telegram-ready formatted messages (📺🎬🔗 format)

  • Eliminates timeout failures (the #2 failure cause)
  • No more ~24k tokens consumed per check
  • Success rate expected: ~99% (was ~64%)

Why this matters

  • Previous cron used isolated agentTurn: LLM → exec script → LLM interpret → send
  • Each run consumed 24-95k tokens and took 45-180s, frequently hitting API rate limits
  • New approach: systemEvent → exec script (4s) → send if needed → done

v2.1.0 - Proxy Support (2026-06-05)

Fix: Added automatic proxy support for YouTube RSS feeds.

  • YouTube is inaccessible from China without proxy; all HTTP requests now route through proxy
  • Auto-detects proxy from HTTPS_PROXY / HTTP_PROXY env vars, falls back to http://127.0.0.1:10808
  • Replaced fetch() API calls with curl via execSync for consistent proxy routing

v2.0.0 - RSS Mode (2026-03-17)

Breaking change: Now uses YouTube RSS feeds by default - no API key needed, no quota limits!

What it does

  • Add / remove / list tracked channels (input can be URL / @handle / channelId)
  • On add, it will baseline (mark the channel's current latest videos as seen)
  • On check, prints only new videos since last run with channel name, title, video URL
  • On notify, prints Telegram-formatted output (📺🎬🔗) for direct cron use

Data files

All state is stored inside this Skill folder:

  • state/config.json (tracked channels, no API key needed for RSS mode)
  • state/seen.json (dedupe: already announced video ids, keeps up to 2000)

Commands

Run from this skill directory:

# RSS mode (recommended, no API key needed)
node scripts/youtube-tracker-rss.js add "https://www.youtube.com/@veritasium"
node scripts/youtube-tracker-rss.js add "@veritasium"
node scripts/youtube-tracker-rss.js add "UCddiUEpeqJcYeBxX1IVBKvQ"
node scripts/youtube-tracker-rss.js list
node scripts/youtube-tracker-rss.js remove "UCddiUEpeqJcYeBxX1IVBKvQ"
node scripts/youtube-tracker-rss.js check    # original output format
node scripts/youtube-tracker-rss.js notify   # Auto-sends to Telegram, marks seen on success

# API mode (legacy, requires API key)
node scripts/youtube-tracker.js set-key "YOUR_YT_API_KEY"
node scripts/youtube-tracker.js validate-key
node scripts/youtube-tracker.js add "@veritasium"
node scripts/youtube-tracker.js check

Cron usage

Recommended (v3.0+): systemEvent mode

Uses notify command + systemEvent cron target — no LLM needed per check.

Cron payload (isolated agentTurn):
  Execute `cd /Users/m./Documents/QNSZ/project/skills/wlzh-youtube-tracker && node scripts/youtube-tracker-rss.js notify`
  Script auto-sends new videos to Telegram topic 1016 via Bot API.
  Only marks seen on successful send — failed videos retry next cycle.
  stdout 有内容 → 逐条发到 Telegram
  stdout 为空 → HEARTBEAT_OK

Legacy: agentTurn mode

Previous approach using isolated LLM session. Higher overhead, subject to API rate limits.

Legacy (agentTurn with LLM relay — not recommended):
  Run `cd .../wlzh-youtube-tracker && node scripts/youtube-tracker-rss.js check`
  Interpret stdout, send if "发现" found

Output formats

check command (original)

频道:最佳拍档
标题:Anthropic呼吁按下AI暂停键?
链接:https://www.youtube.com/watch?v=xxx

notify command (Telegram-ready)

📺 最佳拍档
🎬 Anthropic呼吁按下AI暂停键?
🔗 https://www.youtube.com/watch?v=xxx

Migration from v1.x / v2.x

  • Existing state/config.json and state/seen.json are fully compatible
  • check command output unchanged (backwards compatible)
  • New notify command is optional, designed for cron use
라이선스 전문 보기(MIT)
MIT License

Copyright (c) 2024 wlzh

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.