Install
openclaw skills install birthday处理中文生日提醒场景,支持从中国身份证号码提取生日、按农历或公历保存生日、为每条记录设置独立的提前提醒天数,并生成当天或未来几天的提醒结果。当用户要实现、维护或运行“农历生日提醒”“身份证生日解析”“生日台账管理”“生日到期检查”这类任务时使用此技能。
openclaw skills install birthday当任务涉及中文生日提醒时,优先使用这个技能,尤其是下面几类场景:
{baseDir}/scripts/birthday_manager.py{baseDir}/scripts/birthday_manager.js{baseDir}/package.json{baseDir}/data/notification.json{baseDir}/references/data-format.md先确认 Python 3 或 Node.js 可用,然后直接运行对应主脚本。
python3 {baseDir}/scripts/birthday_manager.py --help
node {baseDir}/scripts/birthday_manager.js --help
npm --prefix {baseDir} run help
默认数据文件:
{baseDir}/data/birthdays.json
也可以通过 --data-file 指定其他路径。
推荐优先使用统一入口 add。脚本会自动判断传入值是身份证还是生日文本;身份证默认会把公历生日转换成农历后保存,并默认提前 1 天提醒。
python3 {baseDir}/scripts/birthday_manager.py add "张三" 11010519491231002X
node {baseDir}/scripts/birthday_manager.js add "张三" 11010519491231002X
如果想按公历保存:
python3 {baseDir}/scripts/birthday_manager.py add "张三" 11010519491231002X --calendar solar
node {baseDir}/scripts/birthday_manager.js add "张三" 11010519491231002X --calendar solar
如果想提前 3 天提醒:
python3 {baseDir}/scripts/birthday_manager.py add "张三" 11010519491231002X --remind-before 3
node {baseDir}/scripts/birthday_manager.js add "张三" 11010519491231002X --remind-before 3
手动添加农历生日:
python3 {baseDir}/scripts/birthday_manager.py add "李四" "农历:1992-8-15"
node {baseDir}/scripts/birthday_manager.js add "李四" "农历:1992-8-15"
手动添加公历生日:
python3 {baseDir}/scripts/birthday_manager.py add "王五" "公历:1988-10-01" --remind-before 7
node {baseDir}/scripts/birthday_manager.js add "王五" "公历:1988-10-01" --remind-before 7
如果是农历闰月生日,显式加上 --leap-month,例如:
python3 {baseDir}/scripts/birthday_manager.py add "赵六" "农历:8-15" --leap-month
python3 {baseDir}/scripts/birthday_manager.py list
python3 {baseDir}/scripts/birthday_manager.py list --upcoming --days 30
python3 {baseDir}/scripts/birthday_manager.py next
node {baseDir}/scripts/birthday_manager.js list
node {baseDir}/scripts/birthday_manager.js list --upcoming --days 30
node {baseDir}/scripts/birthday_manager.js next
按每条记录自己的 remind_before_days 检查是否需要提醒。命中后默认通知当前 agent;如果需要企业微信、Webhook 等渠道,配置 notification.json 后再运行。
python3 {baseDir}/scripts/birthday_manager.py check
node {baseDir}/scripts/birthday_manager.js check
指定检查日期,便于测试:
python3 {baseDir}/scripts/birthday_manager.py check --today 2026-03-13
node {baseDir}/scripts/birthday_manager.js check --today 2026-03-13
如果要做批处理或定时任务,直接读取脚本输出即可。
默认通知配置文件是 data/notification.json。开箱即用时会启用 agent 渠道,email 渠道默认关闭。
启用邮件时,优先填写或导出这些环境变量:
BIRTHDAY_SMTP_HOSTBIRTHDAY_SMTP_PORTBIRTHDAY_SMTP_USERNAMEBIRTHDAY_SMTP_PASSWORDBIRTHDAY_EMAIL_FROMBIRTHDAY_EMAIL_TO如果只需要当前 agent 收到提醒,保持默认配置即可。
当数据文件从 0 条变成 1 条,且脚本检测到当前环境是 openclaw 时,会额外输出一行:
OPENCLAW_AUTOMATION_SUGGESTION {...}
调用这个 skill 的 AI 应读取这行 JSON,并为 openclaw 创建一个每日定时检查自动化。默认建议每天 09:00 执行 check。
add 入口对身份证默认转成农历保存,对手输生日默认按农历解析。remind_before_days=1,但允许单独覆盖。check 命中后默认通知当前 agent;其他通知渠道必须通过配置文件显式配置。references/data-format.mdpackage.json 不包含第三方依赖,适合本地直接运行如果用户后续要接入企业微信、短信、邮件或系统通知:
birthday_manager.py 的数据层与提醒计算层不变check 的结果