编程

tt_live

试用

TikTok LIVE monitor. Check whether a TikTok user is live right now, resolve their current m3u8 stream URL, or spawn a background daemon that polls them over a timer window and emits go_live / go_offline / rename_detected events for the sub-agent to announce.

它能做什么

Inspect a TikTok user's live status, resolve their stream URL, or watch them over time. Operate on (the ) at the input boundary; track as the stable primary key inside the workspace.

技能文档

tt-live — TikTok LIVE Monitor

Inspect a TikTok user's live status, resolve their stream URL, or watch them over time. Operate on uniqueId (the @handle) at the input boundary; track secUid as the stable primary key inside the workspace.

This skill is a pure data provider. It does not push notifications. All chat announcements are the sub-agent's job through the normal OpenClaw announce mechanism in the requester's channel.


When to invoke

Invoke this skill when the requester asks any of:

  • "Is @<user> live right now?" — one-shot status check
  • "Give me the stream URL for @<user>" — m3u8 URL resolution
  • "Watch @<user> and tell me when they go live or offline over the next N hours" — daemon-mode watch
  • "Did @<user> rename recently?" — identity history lookup via the workspace identity store or daemon events

Do NOT invoke this skill for:

  • Anything outside TikTok LIVE (regular TikTok videos, comments, DMs, user analytics)
  • Downloading or recording the stream — this skill only resolves the URL
  • Pushing notifications to external services (Slack, Discord, webhooks). The sub-agent owns announcements; the skill does not.

Workspace

All state lives under $TT_LIVE_WORKSPACE, default ~/.openclaw/workspace/tiktok-monitor/. Created automatically on first invocation.

workspace/
├── tiktok-names/
│   ├── identities/.json     canonical identity records
│   └── pointers/.json     @handle → sec_uid pointers
├── state/tt-live/
│   ├── .state.json          per-user live state + URL cache
│   └── .events              append-only daemon event log
└── logs/
    └── daemon--.log    daemon stderr+stdout

Entry points

All entry points are invoked through tt-live.sh (the bash wrapper) which dispatches to tt_live.py. The wrapper handles backgrounding for the daemon case.

tt-live.sh check

One-shot status check. Updates identity + state stores. Prints a JSON record with sec_uid, unique_id, nickname, user_id, live, room_id, title, start_time, rename_detected, checked_at.

Exit codes: 0 = live, 1 = offline, 2 = error.

tt-live.sh url [--verbose|-v]

Resolve the current m3u8 stream URL. Cache-first (3-day retention); falls back to direct webcast API → yt-dlp → streamlink. Prints the URL on stdout.

Exit codes: 0 = ok, 1 = offline, 2 = all extraction strategies failed.

With -v, prints # source: cache|api|yt-dlp|streamlink to stderr.

tt-live.sh daemon [--hours N] [--poll-min M]

Spawn a background daemon. Defaults: --hours 12, --poll-min 5. The --poll-min value has a hard floor of 5; lower values are silently clamped.

The wrapper prints pid=..., username=..., workspace=..., log=..., events_dir=... and returns immediately. The daemon writes structured events to /.events.

Exit codes: 0 = spawned and alive after 1s, 2 = spawn failed (check the printed log path).


Standalone tools (workspace-free)

These two scripts are independent of tt_live.py. They do not read or write the workspace. Use them for ad-hoc probes.

get_room_id.py

SIGI_STATE scrape from /@/live. Prints identity + room fields as JSON. Exit 0/1/2 (live/offline/error).

check_alive.py

Webcast API liveness check on an already-known room_id. Prints {room_id, alive, checked_at}. Exit 0/1/2 (alive/not/error).

These are read-only counterparts to tt_live.py check for cases where workspace side-effects are not wanted.


Canonical workflow for long-running watch

When the requester asks "watch @<user> for N hours and tell me when they go live / offline":

Step 1. Resolve identity. The JSON output contains sec_uid, which is needed for the events file path.

JSON="$(tt-live.sh check )"
SEC_UID="$(echo "$JSON" | python3 -c 'import json,sys; print(json.load(sys.stdin)["sec_uid"])')"

Step 2. Spawn the daemon. Capture the workspace + events_dir from the printed key=value lines.

DAEMON_OUT="$(tt-live.sh daemon  --hours N --poll-min 5)"
EVENTS_DIR="$(echo "$DAEMON_OUT" | awk -F= '/^events_dir=/{print $2}')"
EVENTS_FILE="$EVENTS_DIR/$SEC_UID.events"

Step 3. Tail the events file. For each new line, parse evt= and announce to the requester's chat channel:

EventSub-agent action
daemon_startAcknowledge the watch has begun (optional)
go_liveAnnounce live + share the stream_url value
go_offlineAnnounce the stream ended
rename_detectedAnnounce the @handle change (old_unique_id → unique_id)
poll_errLog internally; do not announce unless multiple in a row
poll_okDo not announce — these are normal heartbeats
daemon_endAnnounce watch window ended (include reason + transitions)

Step 4. When daemon_end arrives, the watch is complete. Stop tailing.

The skill itself never announces. The sub-agent is responsible for turning events into human-readable chat messages.


Event format

One line per event. Field order is fixed:

ts= evt= sec_uid=<...> unique_id=<...> [k=v ...] [stream_url=...]

Rules:

  • ts= is always first
  • evt= is always second
  • sec_uid=, unique_id= follow if present
  • stream_url= is always the last key when present, because its value contains & and = which would break key=value parsers
  • All seven event types: daemon_start, daemon_end, poll_ok, poll_err, go_live, go_offline, rename_detected

See tt_live.md §10 for the per-event field reference.


Hard constraints

These are baked into the code and not configurable at runtime:

  • 360p stream cap. URL extraction is fixed at 360p height. Sub-agent use cases assume predictable bandwidth.
  • 5-minute poll floor. --poll-min values below 5 are clamped. TikTok rate-limits aggressive polling and there is no benefit to finer resolution for go_live / go_offline transitions.
  • No outbound notifications. No webhooks, no Slack-from-Python, no Discord posts. The sub-agent's announce mechanism is the only output channel.
  • Stream URL validity is tied to the live session. When the user goes offline and live again, the previous URL is gone — even if it's within the 3-day retention window. The cached URL is still useful as a forensic record but not as a playable stream.
  • sec_uid is the primary key. Track users by sec_uid, not by unique_id. Users can rename their @handle; sec_uid does not change.

Out of scope

  • Recording / saving the stream content
  • Multi-user batch monitoring (one user per daemon)
  • Notifications to external services
  • TikTok video downloads, comments, follower lists, anything not LIVE
  • Stop / pause / resume controls — to stop a daemon, the sub-agent kills the printed pid= and the daemon writes a daemon_end reason=interrupted event on the way out

相关技能

以 AI 机器人身份加入视频会议,提供语音、虚拟形象与屏幕共享四种模式。

作者 johnpatternai22 次安装8 星标

从 AdMapix API 拉取广告创意、应用、榜单和收入预估等数据,原样返回结构化 JSON。

作者 fly0pants4.3k 次安装296 星标

把自然语言描述转为结构化 JSON,并由 mcp-diagram-generator MCP 服务生成 Draw.io、Mermaid 或 Excalidraw 图表文件。

作者 nssa.io1.0k 次安装47 星标

诊断生产力系统反复失效的根因,给出最小干预——容量测算、瓶颈定位、可靠的本地记录。

作者 Iván855 次安装69 星标

在本地磁盘以分类纯 Markdown 文件保存需要长期留存的事实,与智能体内置记忆并存。

作者 Iván559 次安装18 星标

kikikari 的更多技能

浏览全部技能

Robust JSON parsing and validation with Pydantic schemas, JSON Schema validation, batch processing, and automatic JSON repair for LLM outputs. Use when Codex...

作者 kikikari15 次安装

Permanent log collection agent. Collects logs and history from all nodes via SSH/VPN every 3 hours. Stores in logs.db with 30-day retention. Multi-node capab...

作者 kikikari14 次安装

Musikerkennung und AudD-Kontoverwaltung über den offiziellen AudD-MCP-Server (https://mcp.audd.io) und/oder die direkte HTTP-API. Ein eigener api_token ist optional — funktioniert per OAuth-MCP ganz ohne Token, mit Trial-Plan und mit bezahltem Plan, ebenso mit dauerhaft hinterlegtem Token. Nutze diesen Skill bei Songerkennung — "welcher Song ist das?", Audio-Clip oder Datei identifizieren, Shazam-artig, Radio-/Twitch-/YouTube-Streams überwachen, DJ-Sets, Podcasts oder Videos nach Tracks durchsuchen, Tracklists, Airplay-Monitoring, Copyright-Check — und bei allem rund um das AudD-Konto: api_token eintragen, hinterlegen, aus der Zwischenablage in den Secret-Vault übernehmen, in .env setzen, rotieren; Request-Kontingent, Verbrauch, Trial-Restlaufzeit, Plan-Upgrade, Rechnungen. Auch anwenden, wenn AudD nicht namentlich genannt wird, aber ein Audio-/Video-Link oder eine lokale Audiodatei identifiziert werden soll.

作者 kikikari

Baut einen "Companion" — eine lokal laufende Beobachtungs-Anwendung: kleiner Server auf 127.0.0.1, Doppelklick-Starter, installierbare PWA, optionale Browser-Erweiterung, Meldung beim Zustandswechsel, Dauerbetrieb im Container. Nutze diesen Skill, sobald jemand etwas dauerhaft im Auge behalten und benachrichtigt werden will — Livestreams, Kanäle, Feeds, Preise, Build-Zustände, Serververfügbarkeit, Ordner, Warteschlangen. Auch wenn die Anfrage nur nach einem Teil klingt: "sag mir Bescheid wenn X online geht", "kleines Tool das im Hintergrund läuft", "Statusseite für Y", "als App installierbar", "soll dauerhaft laufen", "auch nach Neustart", "als Docker-Container". Besonders wichtig bei einer einzelnen HTML-Datei, die fremde Daten abruft: ob das trägt, hängt an einer CORS-Freigabe, die man vorher prüfen muss — sonst bleibt die Datei beim Nutzer leer.

作者 kikikari

Diagnose und Einrichtung fremder, offizieller MCP-Server (Konnektoren) in der Claude-App. Nutze diesen Skill, wenn jemand fragt: gibt es für diesen Anbieter einen offiziellen MCP-Server, trag mir den als Konnektor ein, warum sehe ich die Tools von dem Dienst nicht, welche Scopes braucht er, mein Konnektor antwortet nicht, MCP-Server hinzufügen, Connector verbinden, Server hängt in "connecting", invalid_scope, 401 nach Wochen, Tools verschwunden. Unterscheidet fünf Zustände — offen ohne Konto, verbunden mit Tools, verbunden ohne Tools, installiert aber unangemeldet, gar nicht vorhanden — und nennt pro Zustand den konkreten nächsten Schritt. Nicht anwenden bei reinen Preisfragen zu einer API, bei Code-Anfragen oder bei der allgemeinen Frage, was MCP überhaupt ist.

作者 kikikari

Führt Architekturanalyse, Komplexitätsmessung, Abstraktionsschicht-Design, Vendor Lock-in Bewertung, Refactoring-Planung und Software-Qualitätsbewertung durch.

作者 kikikari