Getting it into your agent
There is no command for this one: it runs only inside a plugin, and the catalogue could not identify which plugin ships it. The source is linked below.
Wrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/chenyuxiaojin/xiaochen-skills/cyxj-youtube-topics)<a href="https://agentmods.dev/skills/chenyuxiaojin/xiaochen-skills/cyxj-youtube-topics"><img src="https://agentmods.dev/badge/skills/chenyuxiaojin/xiaochen-skills/cyxj-youtube-topics/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/chenyuxiaojin/xiaochen-skills/cyxj-youtube-topics"><img src="https://agentmods.dev/badge/skills/chenyuxiaojin/xiaochen-skills/cyxj-youtube-topics.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00172 | $0.03706 |
| Opus 5 | $0.00086 | $0.01853 |
| Sonnet 5 | $0.00034 | $0.00741 |
| Haiku 4.5 | $0.00017 | $0.00371 |
Grade A, and why
cyxj-youtube-topics scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 244 lines — stays where its author put it; the contents beside it link to each section on GitHub.
youtube-topic-discovery:YouTube 选题发现 + 判断
执行边界
一次调用跑一遍 7 步流程就结束——流水线的完整性由 launcher 保证,不由你保证。
输出 CYXJ_RESULT_FILE=<路径> 后立即终止:不要回头再拉一次新视频,不要二次调 write_topics.py,
不要"再补全一下"。也不要 echo 模仿 launcher 的 ===== 启动/结束/失败 ===== 日志格式。
断点续传(每步执行前先看一眼)
上一次跑可能在中间某步失败(budget 烧光 / 网络挂 / Ctrl+C),/tmp/yt_*.json 中间产物可能还在。
每步开始前检查对应输出文件,存在且 6h 内就跳过该步——超过 6h 视为过期(48h lookback 窗口已显著移位):
if [ -f /tmp/yt_videos.json ] && [ $(($(date +%s) - $(stat -f %m /tmp/yt_videos.json 2>/dev/null || stat -c %Y /tmp/yt_videos.json))) -lt 21600 ]; then
echo "复用现有 /tmp/yt_videos.json(6h 内)"
else
python3 "$SKILL_DIR/youtube_search.py" > /tmp/yt_videos.json
fi
(stat -f 是 BSD/macOS 写法,Linux 兜底用 stat -c;$SKILL_DIR 在下面「流程」开头定义。)
LLM 步骤(第 3 步聚类 / 第 5 步 verdict)同理:先 ls -la /tmp/yt_clusters.json /tmp/yt_final.json,新鲜就直接读文件进下一步。
第 6 步 write_topics.py 不做断点续传——一旦写盘就更新了 .seen_video_ids.json、话题索引、判断日志,没有"重复写入"概念。${CYXJ_TOPIC_DIR} 下已有今天的 YYYY-MM-DD HH-MM YouTube选题总览.md 就直接终止,报告"今天已经跑过了"。
角色
你是一个选题判断助手。任务不是把视频摆给用户看(那只是过滤器),而是带理由地告诉用户哪些话题值得做、哪些是跟风、哪些该跳过。理由比结论重要——好的理由能让用户反驳,反驳就是用户在思考选题。
前置准备
跑之前需要 YOUTUBE_API_KEY(可多 key 轮询)、CYXJ_TOPIC_DIR、APIFY_API_TOKEN 三个必需项,
外加可选的 CYXJ_USER_PROFILE(有它才能给"差异化切口")和 SUPADATA_API_KEY(字幕兜底)。
配置方法、多 key 轮询规则、各服务的免费额度、以及一批高级环境变量,见
${CLAUDE_PLUGIN_ROOT}/skills/cyxj-youtube-topics/references/setup.md——首次使用或脚本报缺 key 时读它。
流程
流程开头先定义 skill 目录(后续所有命令依赖它;CLAUDE_PLUGIN_ROOT 由 Claude Code 注入):
SKILL_DIR="${CLAUDE_PLUGIN_ROOT}/skills/cyxj-youtube-topics"
第一步:运行搜索脚本
python3 "$SKILL_DIR/youtube_search.py" > /tmp/yt_videos.json
输出 JSON 数组,每元素含 video_id / title / url / channel / description / relative_time / view_count_formatted / duration_formatted。
空数组([])→ 告诉用户"最近 48 小时没有新内容",结束。
第 1.5 步:跑中文区参考(默认开启)
python3 "$SKILL_DIR/chinese_reference.py" > /tmp/yt_zh_reference.json
输出最近 48 小时中文区相关视频列表(top 15,按播放量降序)。每元素含 video_id / title / url / channel / description / view_count / view_count_formatted / relative_time。
What ships with it
9 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 12d ago First seen · 244 lines · 172 tokens per session scan A d231f7bd678c
cyxj-youtube-topics is a skill published in the GitHub repository chenyuxiaojin/xiaochen-skills (6 stars, last pushed 8d ago), licensed MIT. It adds 172 tokens to every session and 3,706 once invoked, about $0.0009 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
import
Import a tasks.md into the coco tracker as an epic with dependencies, and create matching issues in the configured issue tracker.
document
Generate minimal documentation through parallel agents.
grill-me
Internal requirements-interview engine for the CCF commands plan and init. Invoked only by those commands through the Skill tool with a mode argument (plan / init); it interrogates the user one question at a time, exploring the code to self-answer first, and returns a summary of the decisions. Not a standalone…
prd-gen
A guide for turning a feature idea into a product requirements document (PRD), a structured plan that explains what to build and how success will be judged.
full-pm-cycle
A product-management workflow covering the path from market and user research through product strategy, requirements, prototype design, release planning, and post-launch review. It uses defined stages and checkpoints, and can produce HTML prototypes.
market-research
A research skill for understanding markets and users. It can study market trends, market size, competitors, and opportunities, or help design interviews, surveys, and user profiles.