← 返回 Skills 市场
xiaoyuanhao

Lunar Reminder

作者 xiaoyuanhao · GitHub ↗ · v1.0.1 · MIT-0
cross-platform ⚠ suspicious
335
总下载
0
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install lunar-reminder
功能描述
按农历日期设置提醒(生日、节日等)。当用户需要:(1) 按农历添加提醒事件 (2) 查看农历事件列表 (3) 农历日期与公历日期转换 (4) 设置农历生日/节日提醒 时使用此 skill。触发词:农历、农历生日、农历节日、阴历提醒。
使用说明 (SKILL.md)

Lunar Reminder

按农历日期设置提醒,支持生日、节日等重要日期的农历提醒。

数据文件

事件数据保存在:{{skillDir}}/data/events.json

Agent 工作流

1. 用户添加农历提醒

解析输入:从用户输入中提取事件名、农历月份、农历日期、提前天数(默认1)。

农历月份映射

名称 数字
正月/正/一月 1
二月/杏月 2
三月/桃月 3
四月/槐月 4
五月/榴月 5
六月/荷月 6
七月/兰月 7
八月/桂月 8
九月/菊月 9
十月/露月 10
十一月/冬月/冬 11
十二月/腊月/腊 12

农历日期映射

名称 数字
初一~初十 1~10
十一~二十 11~20
廿一/二十一~廿九/二十九 21~29
三十 30

执行步骤

  1. 读取现有事件(文件不存在则创建空数组)
  2. 检查事件名是否已存在,存在则报错
  3. 计算当年公历日期(运行下方命令)
  4. 保存事件到文件
  5. 确认添加成功

农历转公历命令(在 {{skillDir}} 目录执行):

node -e "const {Lunar}=require('lunar-javascript');const l=Lunar.fromYmd(YEAR,MONTH,DAY);const s=l.getSolar();console.log(s.getYear()+'-'+String(s.getMonth()).padStart(2,'0')+'-'+String(s.getDay()).padStart(2,'0'));"

YEARMONTHDAY 替换为实际值(如 2026, 2, 11)。

2. 用户查看提醒列表

读取 {{skillDir}}/data/events.json 文件,格式化输出每个事件的:

  • 事件名
  • 农历日期(月名+日名)
  • 今年公历日期
  • 提前提醒天数

3. 用户删除提醒

  1. 读取事件文件
  2. 过滤掉指定名称的事件
  3. 保存文件
  4. 删除对应 cron 任务:openclaw cron rm "lunar_\x3C事件名>"

4. 用户要求日期转换

农历转公历

cd {{skillDir}} && node -e "const {Lunar}=require('lunar-javascript');const l=Lunar.fromYmd(YEAR,MONTH,DAY);const s=l.getSolar();console.log(s.getYear()+'-'+String(s.getMonth()).padStart(2,'0')+'-'+String(s.getDay()).padStart(2,'0'));"

公历转农历

cd {{skillDir}} && node -e "const {Solar}=require('lunar-javascript');const s=Solar.fromYmd(YEAR,MONTH,DAY);const l=s.getLunar();const m=['','正月','二月','三月','四月','五月','六月','七月','八月','九月','十月','冬月','腊月'];const d=['','初一','初二','初三','初四','初五','初六','初七','初八','初九','初十','十一','十二','十三','十四','十五','十六','十七','十八','十九','二十','廿一','廿二','廿三','廿四','廿五','廿六','廿七','廿八','廿九','三十'];console.log(m[l.getMonth()]+d[l.getDay()]);"

5. 用户要求同步提醒

  1. 读取所有事件
  2. 对每个事件:
    • 计算公历日期
    • 减去提前天数得到提醒日期
    • 执行 cron 命令

Cron 命令格式

# 先删除旧任务
openclaw cron rm "lunar_\x3C事件名>"

# 创建新任务
openclaw cron add --name "lunar_\x3C事件名>" --cron "\x3C分> \x3C时> \x3C日> \x3C月> *" --message "🔔 农历提醒:\x3C事件名>将在\x3CN>天后到来" --tz "Asia/Shanghai"

数据格式

[
  {
    "name": "妈妈生日",
    "lunarMonth": 2,
    "lunarDay": 11,
    "lunarMonthName": "二月",
    "lunarDayName": "十一",
    "advanceDays": 1,
    "reminderTime": "09:00",
    "note": "",
    "createdAt": "2026-03-10T00:00:00.000Z"
  }
]

使用示例

添加农历提醒:妈妈生日,二月十一,提前1天提醒
查看所有农历提醒
删除农历提醒:妈妈生日
农历二月十一是公历几号
同步农历提醒到定时任务
安全使用建议
This skill appears to do exactly what it says: use lunar-javascript to convert dates, store reminders in {{skillDir}}/data/events.json, and manage scheduled reminders via openclaw cron. Before installing: (1) verify you trust the npm package version (lunar-javascript) and run a package audit if possible; (2) be aware your reminders are stored locally at the skillDir path — back up if needed; (3) the SKILL.md runs inline node and shell commands that embed event names and other values — ensure the agent or implementation sanitizes user-provided names/values to avoid accidental command injection or malformed cron job names; (4) confirm openclaw cron commands are acceptable in your environment and that the agent has permission to manage cron jobs.
功能分析
Type: OpenClaw Skill Name: lunar-reminder Version: 1.0.1 The skill implements lunar calendar reminders by instructing the agent to execute shell commands (`node -e` and `openclaw cron`) using string interpolation of user-provided inputs like event names and dates in SKILL.md. This pattern introduces a significant risk of shell injection vulnerabilities, as a user could provide a crafted event name to execute arbitrary commands. While the behavior aligns with the stated purpose and no clear evidence of malicious intent or data exfiltration was found, the reliance on unsafe command construction is a high-risk practice.
能力评估
Purpose & Capability
Name/description, declared install (lunar-javascript), and runtime behavior (convert lunar<->solar, store events, create cron jobs) are consistent. Requiring the lunar-javascript package is appropriate for calendar calculations.
Instruction Scope
Instructions stay within the stated purpose (managing reminders and conversions). Two minor concerns: (1) runtime uses inline node -e commands and shell cron commands that embed values (YEAR/MONTH/DAY and event names). The SKILL.md does not describe sanitization of user-provided event names or inputs, which could lead to accidental shell/command injection or malformed cron names if inputs contain quotes or special characters. (2) The skill reads/writes {{skillDir}}/data/events.json — expected, but users should know data is stored locally in that path.
Install Mechanism
Install spec is an npm package (lunar-javascript) which is proportionate to the stated functionality. This is a common, traceable mechanism; no arbitrary download URLs or extract steps are present.
Credentials
No environment variables, credentials, or unrelated config paths are requested. The requests are minimal and appropriate for the task.
Persistence & Privilege
Skill does not request always: true and will not force inclusion. It writes its own data file and uses platform cron commands to schedule tasks — this is expected behavior for a reminder skill and does not modify other skills or global configs.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install lunar-reminder
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /lunar-reminder 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.1
- Major refactor: removed all Node.js script files and the package-lock.json. - All operational details and examples are now documented in SKILL.md—manual workflows, commands, and data formats are included. - Skill usage workflows (add/view/delete/convert/sync) are now intended to be handled via documented external commands and file operations rather than internal scripts. - Updated and consolidated mapping tables, command samples, and agent instructions for greater clarity and less implementation ambiguity.
v1.0.0
首次发布,支持按农历日期设置提醒。 - 支持添加农历生日、节日等重要日期提醒 - 可查看、删除、列出已设置的农历提醒事件 - 提供农历与公历日期互相转换 - 每个事件自动创建 cron 定时提醒 - 支持闰月处理与提前提醒配置
元数据
Slug lunar-reminder
版本 1.0.1
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 2
常见问题

Lunar Reminder 是什么?

按农历日期设置提醒(生日、节日等)。当用户需要:(1) 按农历添加提醒事件 (2) 查看农历事件列表 (3) 农历日期与公历日期转换 (4) 设置农历生日/节日提醒 时使用此 skill。触发词:农历、农历生日、农历节日、阴历提醒。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 335 次。

如何安装 Lunar Reminder?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install lunar-reminder」即可一键安装,无需额外配置。

Lunar Reminder 是免费的吗?

是的,Lunar Reminder 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Lunar Reminder 支持哪些平台?

Lunar Reminder 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Lunar Reminder?

由 xiaoyuanhao(@xiaoyuanhao)开发并维护,当前版本 v1.0.1。

💬 留言讨论