私人天气助手 — 早间实况 · 晚间预告 · 一周预报 · 极端预警
城市/单位/语言等资料由 Agent 从 MEMORY.md 读出后作为
--city/--units/--lang参数传入(见下方「用户资料」)。
指令脚本说明今日天气morning-push.js <userId> --city <城市> --units <..> --lang <..>今日温度/湿度/风力/分时预报/穿衣/出行建议明日预告evening-push.js <userId> --city <城市> ...明日天气预告 + 提醒 + 后天预览一周预报forecast.js <userId> --city <城市> ...未来7天逐日天气 + 趋势 + 穿衣建议下周周报weekly-push.js <userId> --city <城市> ...每周六推送下周天气 + 最佳出行日月度概况monthly-push.js <userId> --city <城市> ...每月末推送下月气候 + 分旬预测开启推送push-toggle.js on <userId> --city <城市> ...定时推送(早/晚/周报/月报),资料烘焙进 cron关闭推送push-toggle.js off <userId>停止全部推送推送状态push-toggle.js status <userId>提示从 MEMORY.md 查看推送配置
本 skill 不向磁盘写任何用户数据。用户的城市、单位、语言、推送时间、时区全部保存在 OpenClaw 原生 MEMORY.md 中,由 Agent 读写、跨会话保留。
流程:
register.js,它会输出一段 <!-- weather-daily:profile:<userId> --> markdown 区块。 把该区块写入 MEMORY.md。--city/--units/--lang 参数传给推送脚本。push-toggle.js on,这些字段会被 烘焙进 cron 任务命令,使无头定时推送无需读取任何文件。push-toggle.js on 覆盖 cron。资料区块格式示例:
markdown
<!-- weather-daily:profile:alice -->
## Weather profile · alice
- userId: alice
- city: 上海
- units: °C / metric
- language: 中文 (zh)
- morningTime: 07:00
- eveningTime: 21:00
- timezone: Asia/Shanghai
- push: enabled telegram 07:00/21:00
<!-- /weather-daily:profile -->
每日早间推送(默认 07:00),包含:
每日晚间推送(默认 21:00),包含:
类型说明🌧️ 降雨中雨/大雨/暴雨预警❄️ 降雪小雪/大雪/暴雪预警💨 大风6级以上大风预警🌀 台风台风路径与影响范围🥶 寒潮大幅降温预警🔥 高温35°C+ 高温预警🌫️ 空气质量AQI 重度污染预警
bash
node scripts/register.js <userId> <city> [units] [morningTime] [eveningTime] [language] [timezone]
# 示例:
node scripts/register.js alice 上海
node scripts/register.js bob "New York" imperial 08:00 22:00 en America/New_York
register 不写任何文件;它打印一段 <!-- weather-daily:profile:<userId> --> 区块,请存入 MEMORY.md。
bash
node scripts/push-toggle.js on <userId> --city <城市> [--units metric|imperial] [--lang zh|en] \
[--morning 07:00] [--evening 21:00] [--channel telegram] [--timezone Asia/Shanghai]
node scripts/push-toggle.js off <userId>
node scripts/push-toggle.js status <userId>
支持渠道: telegram / feishu / slack / discord
bash
node scripts/morning-push.js <userId> --city <城市> --units <metric|imperial> --lang <zh|en>
node scripts/forecast.js <userId> --city <城市> --units <..> --lang <..>
fs 写入规范。MEMORY.md,由你本机的 Agent 管理,不经过任何外部服务。telegram/ feishu/ slack/ discord 由 openclaw 运行时投递,skill 不调用任何渠道 API、不持有 token。<!-- weather-daily:profile:<userId> --> 区块即清除该用户的全部配置。node scripts/register.js <userId> <city>,并把输出的资料区块存入 MEMORY.mdVersion: 1.1.0 · Updated: 2026-07-02