Cheat Trends
从配置的热点源(HN / Reddit / YouTube trending / B 站热门 / 等)抓今天的热门话题,去重 + 粗打分 + 写入...
Install
npx skills add XBuilderLAB/cheat-on-content --skill cheat-trends -g -a claude-code -y- Repository
- XBuilderLAB/cheat-on-content7.4k
- Category
- Engineering
- Updated
- 9d ago
- License
- MIT
- Context cost
- Lightabout 1,350 tokens
- Runs scripts
- No, instructions only
What it does
从配置的热点源(HN / Reddit / YouTube trending / B 站热门 / 等)抓今天的热门话题,去重 + 粗打分 + 写入 candidates.md。**绝大部分人没有候选池, , 这是让"我没素材"问题在 onboarding 第二步就消失的钥匙**。触发词:"抓热点"/"fetch trends"/"今天有什么可做的"/"trending now"/"找选题"。
/cheat-trends, 热点抓取
多 adapter 模式:读各 trend-sources adapter 的输出 → 去重 → 粗打分 → 写入 candidates.md。
Overview
[用户:抓热点]
↓
[Phase 0: 读 .cheat-state.json 拿 enabled adapters]
↓
[Phase 1: 对每个 adapter 调 fetch]
↓
[Phase 2: normalize 到 candidate-schema]
↓
[Phase 3: 去重(vs candidates / predictions / trends-history)]
↓
[Phase 4: 对每个新 item 粗打分(调 cheat-score 内联逻辑)]
↓
[Phase 5: 排序 + 询问用户哪些加入 candidates.md]
↓
[Phase 6: 写入 + 更新 trends-history.jsonl 缓存]
Constants
- TREND_SOURCES = ["manual-paste"], 启用的 adapter 列表(默认仅 manual-paste,最稳)
- LOOKBACK_HOURS = 24, 抓最近 N 小时的热点
- MAX_PER_SOURCE = 20, 每个 adapter 最多 N 条
- DEDUPE = true, 去重开关
- AUTO_SCORE = true, 抓回来后自动调 cheat-score 粗打分
- MIN_COMPOSITE_TO_SUGGEST = 6.0, 低于此分的不推荐用户加入候选池(仍写入 trends-history 避免下次重复推)
💡 调用时覆盖:
/cheat-trends, sources: manual-paste,aihot,weibo-hot, max-per: 10
Inputs
| 必填 | 来源 |
|---|---|
.cheat-state.json | 默认 sources |
adapters/trend-sources/<name>.md | 各 adapter 的实现描述 |
candidates.md | 去重对照 |
predictions/*.md | 去重对照(已发的不再推) |
.cheat-cache/trends-history.jsonl | 历史抓取去重缓存 |
Workflow
Phase 0: 读启用的 adapters
# 伪代码
state = read('.cheat-state.json')
enabled_adapters = args.sources or state.get('enabled_trend_sources', ['manual-paste'])
如 enabled_adapters 为空 → 输出引导:
你目前没有启用任何热点源。
最快配法:
- 临时跑:/cheat-trends, sources: manual-paste,aihot
- 永久启用:编辑 .cheat-state.json 的 enabled_trend_sources 数组
可用 adapter(详见 adapters/trend-sources/):
- manual-paste(默认,永远能用)
- aihot(AI 热点聚合,无需 key)
- weibo-hot(微博热搜,无需 key)
- zhihu-hot(知乎热榜,无需 key)
- trendradar-mcp(TrendRadar MCP 服务,需配置)
Phase 1-2: 对每个 adapter 调 fetch + normalize
对每个 adapter,读其 adapters/trend-sources/<name>.md 中描述的 fetch 接口(实际是 Bash 调底层 Python / shell / WebFetch):
