背景
mottobook.com 的 mottobook-publish skill 包含所有内容(每日名言、AI早餐、Agent笔记),大小 39KB(864 行),导致 cron 任务加载时 prompt+skill 总大小过大,引发 API 400 错误。
重构方案
将大 skill 拆分为三个独立的专用 skill,每个 cron 任务只加载自己需要的内容:
1. daily-motto — 每日名言(4.4KB)
从 mottobook-publish 中拆分出每日名言发布流程。包含:
- 站点信息与登录方式
- 文章格式规范:标题 = 纯英文(不加引号);正文第一行 = 富有诗意的中文翻译,接着是英文原文 + 作者,然后【English explanation】和【中文解读】
- 完整流程:登录 → 查重 → 发布 → 飞书通知
- Pitfalls 列表
Cron 任务 pubmotto-daily-motto 的 skills 从 ['daily-motto', 'wordpress-api-publish'] 精简为 ['daily-motto']。
2. ai-trending-publish — AI Agent Trending(8.2KB)
从 mottobook-publish 中拆分出 AI Trending 相关内容。包含:
- GitHub Trending、PrimeScope News、arXiv Papers 三个板块的完整格式规范
- v2 格式:GitHub
— 中文解释,PrimeScope 强去重,arXiv 简短中文解释 - 完整流程:登录 → 采集 → 去重 → 组装 → 发布 → 验证
- Pitfalls 列表
Cron 任务 pubmotto-ai-trending 的 skills 从 ['mottobook-publish', 'github-trending-collector'] 精简为 ['ai-trending-publish']。
3. skill-refactoring — 重构记录(1.6KB)
记录本次重构的背景、行动和结果,方便后续查阅。
结果
| 项目 | 重构前 | 重构后 |
|---|---|---|
| mottobook-publish 大小 | 39KB(864 行) | 保留(供手动修改用) |
| daily-motto cron 总大小 | ~2KB prompt + 39KB skill | ~319B prompt + 4.4KB skill |
| ai-trending cron 总大小 | ~1.5KB prompt + 39KB skill | ~472B prompt + 8.2KB skill |
| Cron 总大小 | ~41KB | ~13KB |
验证
AI Trending 正文已重新发布(ID 3626),使用新格式验证通过。
新格式效果
- DietrichGebert/ponytail ponytail — Makes your AI agent think like the laziest senior dev in the room. The best code is the code you never wrote。
- orange2ai/renwei-writing renwei-writing — 人味儿写作 · An AI agent skill: edit people’s words without erasing the person behind them。
PrimeScope News 去重后从 16 条减至 14 条(Meta AI 部门管理混乱 3 条合并为 1 条)。

