SKILL.md
xhs-x-hotnews-grok
用 xAI Grok API(x_search)抓取近 24h X 热点 → 总结提炼 → 生成“小红书博主碎碎念/观点向”的草稿(只生成草稿,你手动发)。
准备
设置 xAI API Key:
$env:XAI_API_KEY="YOUR_KEY"
生成草稿
powershell -NoProfile -ExecutionPolicy Bypass -File D:\葡萄里面没有柚子\skills\xhs-x-hotnews-grok\scripts\xhs_hotnews.ps1
输出目录:D:\葡萄里面没有柚子\skills\xhs-x-hotnews-grok\output\
xhs_post.md:可直接复制到小红书的正文草稿raw_response.json:完整 API 原始响应(排查用)
常用参数
-Hours 24:回溯窗口(小时)-TopN 0:热点条数;0表示让模型自行决定(通常 8-12 条)-Model ...:指定模型-IncludeCitations:如 API 返回 citations,则在文末附参考链接-OutDir ...:指定输出目录
示例:
powershell -NoProfile -ExecutionPolicy Bypass -File D:\葡萄里面没有柚子\skills\xhs-x-hotnews-grok\scripts\xhs_hotnews.ps1 -Hours 24 -TopN 0 -IncludeCitations
说明
- 热点默认 global、不限领域。
- x_search 在文档里是“按日期”过滤;脚本会尽量覆盖过去 24h,并在提示词里强调“近 24h 升温”。