Communitygithub.com

geoqiao/short-video-skills

每天定时从抖音创作者中心、视频号助手、小红书创作服务平台只读采集作品数据(播放、完播率、2 秒跳出或快速划走、平均播放时长、点赞收藏转发评论、涨粉、流量来源、搜索词、留存曲线),存成按日期命名的快照,再排成每条作品的时间序列。采集时间写在配置文件里。适用于设置每日采集、手动补采、看某条视频的数据走势、写周报前汇总数据。

short-video-skills 是什么?

short-video-skills is a Claude Code agent skill that 每天定时从抖音创作者中心、视频号助手、小红书创作服务平台只读采集作品数据(播放、完播率、2 秒跳出或快速划走、平均播放时长、点赞收藏转发评论、涨粉、流量来源、搜索词、留存曲线),存成按日期命名的快照,再排成每条作品的时间序列。采集时间写在配置文件里。适用于设置每日采集、手动补采、看某条视频的数据走势、写周报前汇总数据。.

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/geoqiao/short-video-skills/tree/HEAD/skills/video-data

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

Collect Short Video Data

Creator backends only show current cumulative values—there's no way to see what yesterday's numbers were. Saving a snapshot at the same time each day lets you calculate the daily increment and detect changes after any adjustments.

Collection uses playwright-cli to connect to a user's already-logged-in Chrome, opens the relevant tab to read the data loaded on the backend page, then closes it. It is read-only: no buttons are clicked, no settings are changed.

Preparation

  • playwright-cli and its accompanying Chrome extension; Chrome must be logged into the platforms you want to collect. For scheduled collection, Chrome must be running and the computer must not sleep.
  • Place a video-data.json file in the project root directory (follow video-data.example.json as a template):
FieldDefaultDescription
time"12:10"Daily collection time, HH:MM, in the local timezone
timezoneLocal timezoneDetermines which date's snapshot file is used
platformsCollect all threeChoose from douyin, weixin, xiaohongshu
outDirdata/snapshotsSnapshot directory, relative to the project root

Choose a time after content is published and consistent each day. Backend data for each platform has a delay; videos posted in the evening are more stable when collected around noon the next day.

Collection

Run from the project root directory (<skill> is the path to this skill's folder):

node <skill>/scripts/collect.mjs            # Collect all platforms in config
node <skill>/scripts/collect.mjs douyin     # Catch up only one platform
  • Output is saved as <outDir>/<date>.json. Re-running on the same day merges results: successfully collected data overwrites previous data for that platform, and failed platforms keep the existing snapshot from that day.
  • The file is written after each platform completes, so an interruption won't lose already-collected data.
  • Exit code is 1 when a platform fails; the terminal shows which platform and what error. not_logged_in means the login has expired—ask the user to re-login in Chrome. For other errors, manually retry once first; Douyin occasionally has temporary failures.
  • Do not run while the user has an unsaved form open in Chrome: the collection opens new tabs, which might steal focus from the form.

Scheduling

node <skill>/scripts/schedule.mjs prints a cron expression and a crontab line based on the time field. It only prints, does not modify the system setting. To change the time, update video-data.json and then recreate the scheduled task. Choose one of two options:

  • Agent's built-in scheduler (recommended): Create a scheduled task using the printed cron expression, with a prompt like "Run the video-data collection in , retry failed platforms once, and report the number of works and followers for each platform." The agent can read errors and perform catch-up collections.
  • System crontab: The user manually adds the printed line into crontab -e. Logs are written to collect.log in the snapshot directory.

Before creating a scheduled task or modifying the crontab, show the time and command to the user first.

What's in the Snapshot

Each platform has a section: account (nickname, followers), works[] (each work includes id, desc, publishedAt, durationSec, metrics), and optionally error or warning. Ratios are decimals (0.55 means 55%).

PlatformExtra DataLimitations
DouyinTraffic sources, chapter click rates, search terms, retention curves for works from the last 30 days (up to 12 works)Work list reads at most 5 pages
WeixinDaily trends for plays, likes, shares, and followers per account, broken down by sourceWork list only reads the first page; writes a warning if there are more pages
XiaohongshuImpressions, cover click-through rate, 2-second skip rate, 5-second completion rateOnly collects video notes from the last 30 days (up to 12 works); no source analysis if views are under 100

Metrics with different definitions cannot be directly compared: Douyin and Xiaohongshu's early departure metric is "2-second skip rate," while Weixin's is "fast swipe rate" (fast_flip_rate).

Viewing Data

node <skill>/scripts/stats.mjs organizes all snapshots into a per-video table: daily plays, incremental plays, average play duration, completion rate, early departure rate, interactions, and follower growth, along with the latest traffic sources, search terms, and retention curves.

When the sample size is small, conclusions are marked as "insufficient sample." When comparing two videos, first compare the same number of hours after publication, then examine what changed.

What to Explain in the Delivery

  • Which platforms were collected, how many works and followers for each, and which platform failed and why.
  • The snapshot file path.
  • For scheduling: the cron expression, the time zone for the trigger time, and which scheduling method is being used.

Individual skills in this repo

This repo contains 2 individual skills — each has its own dedicated page.

相关技能