← 返回 Skills 市场
web3aivc

birthday

作者 web3aivc · GitHub ↗ · v1.0.1 · MIT-0
cross-platform ⚠ suspicious
269
总下载
0
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install birthday
功能描述
处理中文生日提醒场景,支持从中国身份证号码提取生日、按农历或公历保存生日、为每条记录设置独立的提前提醒天数,并生成当天或未来几天的提醒结果。当用户要实现、维护或运行“农历生日提醒”“身份证生日解析”“生日台账管理”“生日到期检查”这类任务时使用此技能。
使用说明 (SKILL.md)

当任务涉及中文生日提醒时,优先使用这个技能,尤其是下面几类场景:

  • 需要把生日按农历保存,并在每年自动换算到当年的公历提醒日期
  • 需要同时支持农历和公历两种记录方式
  • 需要为每条记录单独设置提前提醒天数,而不是全局统一配置
  • 需要本地脚本来维护生日数据、列出最近生日、检查提醒结果

主要资源

  • Python 主脚本:{baseDir}/scripts/birthday_manager.py
  • JavaScript 主脚本:{baseDir}/scripts/birthday_manager.js
  • Node.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 指定其他路径。

常见任务

1. 从身份证添加生日

推荐优先使用统一入口 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

2. 手动添加生日

手动添加农历生日:

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

3. 查看记录

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

4. 检查提醒

按每条记录自己的 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_HOST
  • BIRTHDAY_SMTP_PORT
  • BIRTHDAY_SMTP_USERNAME
  • BIRTHDAY_SMTP_PASSWORD
  • BIRTHDAY_EMAIL_FROM
  • BIRTHDAY_EMAIL_TO

如果只需要当前 agent 收到提醒,保持默认配置即可。

OpenClaw 定时器

当数据文件从 0 条变成 1 条,且脚本检测到当前环境是 openclaw 时,会额外输出一行:

OPENCLAW_AUTOMATION_SUGGESTION {...}

调用这个 skill 的 AI 应读取这行 JSON,并为 openclaw 创建一个每日定时检查自动化。默认建议每天 09:00 执行 check

工作规则

  1. 优先保留结构化数据,不要只在 Markdown 里手工维护生日表。
  2. 从身份证提取到的是公历生日。
  3. 当用户没有特别说明时,统一 add 入口对身份证默认转成农历保存,对手输生日默认按农历解析。
  4. 每条记录默认 remind_before_days=1,但允许单独覆盖。
  5. 对农历生日,提醒时必须先换算为目标年份的公历日期,再计算剩余天数。
  6. check 命中后默认通知当前 agent;其他通知渠道必须通过配置文件显式配置。
  7. 输出给用户时,同时显示“存储口径”和“本次实际提醒的公历日期”,避免混淆。

数据与实现说明

  • 数据字段见 references/data-format.md
  • Python 与 JavaScript 脚本共用同一种 JSON 数据结构
  • package.json 不包含第三方依赖,适合本地直接运行
  • 脚本内置了 1900-2099 年的农历换算表,不依赖第三方库
  • 身份证支持 18 位,也兼容 15 位老身份证
  • 如果遇到超出农历换算表范围的年份,应直接报错,不要默默给出错误结果

修改建议

如果用户后续要接入企业微信、短信、邮件或系统通知:

  1. 保持 birthday_manager.py 的数据层与提醒计算层不变
  2. 在外层增加发送器脚本,只消费 check 的结果
  3. 不要把发送逻辑硬编码进生日计算核心逻辑
安全使用建议
This appears to be a local birthday/reminder utility that stores records under the skill's data folder and optionally sends notifications. Before installing or running: 1) review data/notification.json to ensure any webhook URLs or email destinations are ones you trust; 2) if enabling email, provide SMTP credentials only to trusted mail servers (these are optional); 3) note that the JavaScript version may invoke local sendmail (child_process) and the Python version can use SMTP or urllib for webhooks — this is consistent with the documented notification channels; 4) the scripts write data files inside the skill directory (data/birthdays.json), so check filesystem permissions. If you want extra assurance, run the scripts offline or inspect the full scripts (they are included) before enabling networked notification channels.
功能分析
Type: OpenClaw Skill Name: birthday Version: 1.0.1 The skill bundle is a legitimate utility for managing Chinese lunar and solar birthdays, including ID card parsing and automated reminders. It features robust logic for calendar conversion, implements data masking for sensitive ID card information (scripts/birthday_manager.py and scripts/birthday_manager.js), and uses standard notification methods like SMTP and webhooks that are user-configurable via environment variables. No evidence of malicious intent, data exfiltration to unauthorized endpoints, or harmful prompt injection was found; the use of OpenClaw automation suggestions is transparent and aligned with the tool's stated purpose.
能力评估
Purpose & Capability
Name/description match the included Python and JavaScript scripts: parsing ID cards, lunar/solar conversion, per-record remind-before, listing and checking reminders. The presence of SMTP/sendmail/webhook-related code aligns with the documented notification channels. No unrelated cloud credentials or system access are requested.
Instruction Scope
SKILL.md instructs running the bundled scripts, points to local data and notification config, and documents optional environment variables for email. The instructions do not ask the agent to read arbitrary system files or exfiltrate data; network notifications (email/webhook) are explicitly optional and configurable.
Install Mechanism
No install spec or remote downloads are present; this is an instruction-plus-source skill where scripts live in the repo. No archive extraction or external package fetch during install is required (package.json has no third‑party dependencies).
Credentials
No required environment variables or credentials are declared. The skill documents optional SMTP-related environment variables for enabling email notifications; these are proportionate to the documented email channel. No other secrets or unrelated service credentials are requested.
Persistence & Privilege
always is false and the skill does not request persistent platform privileges. It creates and writes its own data/notification JSON files in the skill directory (expected for local state). It does not modify other skills or global agent config beyond optionally printing an OpenClaw automation suggestion line.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install birthday
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /birthday 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.1
- 增加默认通知配置文件 data/notification.json,支持通过配置选择通知渠道(如 agent、email 等)。 - 将生日添加入口统一为 add,自动识别身份证及各类生日文本,简化用法。 - 默认出厂时仅 agent 渠道启用,邮件等需用户显式配置。 - 增加 OpenClaw 自动化建议输出,新建数据时自动提示每日定时任务设置。 - 修改和简化说明文档,精简入口命令并明确数据与通知配置分离。
v1.0.0
Initial release of the birthday skill for Chinese birthday reminders - Supports extracting birthdays from Chinese ID card numbers (15 or 18 digits) - Enables storage and annual reminder of birthdays by lunar or solar calendar - Allows per-entry configuration of advance reminder days - Provides Python and JavaScript scripts for adding, listing, and checking birthday reminders, with command-line usage - Built-in lunar calendar conversion for years 1900–2099, with error handling for unsupported years - Outputs reminder dates in both the storage format and the converted solar date for clarity
元数据
Slug birthday
版本 1.0.1
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 2
常见问题

birthday 是什么?

处理中文生日提醒场景,支持从中国身份证号码提取生日、按农历或公历保存生日、为每条记录设置独立的提前提醒天数,并生成当天或未来几天的提醒结果。当用户要实现、维护或运行“农历生日提醒”“身份证生日解析”“生日台账管理”“生日到期检查”这类任务时使用此技能。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 269 次。

如何安装 birthday?

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

birthday 是免费的吗?

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

birthday 支持哪些平台?

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

谁开发了 birthday?

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

💬 留言讨论