← 返回 Skills 市场
linzmin

Bill Reminder

作者 linzmin · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
110
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install bill-reminder
功能描述
账单提醒技能 - 自动监控账单到期并发送微信提醒
使用说明 (SKILL.md)

账单提醒技能

🦆 你的私人账单管家,再也不怕忘记还款!


🎯 功能特性

  • ✅ 支持多种账单类型(信用卡、花呗、房租、水电费等)
  • ✅ 灵活周期设置(每月、每周、每年)
  • ✅ 提前 N 天提醒,避免逾期
  • ✅ 微信消息提醒,及时触达
  • ✅ 还款记录自动保存
  • ✅ 逾期提醒(前 3 天持续提醒)
  • ✅ 命令行操作,简单高效

🚀 快速开始

1. 安装

# 自动安装(发布后)
npx clawhub@latest install bill-reminder

# 或手动安装
cd ~/.openclaw/workspace/skills/bill-reminder
./install.sh

2. 添加账单

# 基本用法
./scripts/add-bill.js "信用卡" 5000 15

# 完整参数
./scripts/add-bill.js "信用卡" 5000 15 monthly 3
# 参数:名称 金额 日期 周期 提前天数

3. 查看账单

./scripts/list-bills.js

4. 标记还款

./scripts/mark-paid.js 1 "已还清"

📋 命令详解

添加账单 add-bill.js

./scripts/add-bill.js \x3C名称> \x3C金额> \x3C日期> [周期] [提前天数]

参数说明:

参数 必填 默认值 说明
名称 - 账单名称(如:信用卡、花呗、房租)
金额 - 账单金额(元)
日期 - 每月几号(1-31)
周期 monthly monthly/weekly/yearly
提前天数 3 提前几天提醒(0-30)

示例:

# 信用卡每月 15 号 5000 元,提前 3 天提醒
./scripts/add-bill.js "信用卡" 5000 15

# 花呗每月 8 号 2000 元,提前 1 天提醒
./scripts/add-bill.js "花呗" 2000 8 monthly 1

# 房租每月 1 号 3000 元,提前 5 天提醒
./scripts/add-bill.js "房租" 3000 1 monthly 5

# 每周提醒(如:周报)
./scripts/add-bill.js "周报" 0 1 weekly 1

# 每年提醒(如:保险)
./scripts/add-bill.js "车险" 3000 15 yearly 7

查看账单 list-bills.js

# 查看活跃账单
./scripts/list-bills.js

# 查看所有账单(包括已删除)
./scripts/list-bills.js --all

# 查看还款历史
./scripts/list-bills.js --history

输出示例:

📋 账单列表

============================================================

1. ⚠️ 信用卡
   💰 ¥5000
   📅 每月 15 日
   ⏰ 提前 3 天提醒
   📆 还有 2 天到期
   ✓ 上次还款:2026/2/15

2. ✅ 房租
   💰 ¥3000
   📅 每月 1 日
   ⏰ 提前 5 天提醒
   📆 还有 15 天到期
   ✓ 上次还款:2026/3/1

============================================================
总计:2 个账单

标记还款 mark-paid.js

./scripts/mark-paid.js \x3C序号> [备注]

示例:

# 标记第 1 个账单已还
./scripts/mark-paid.js 1

# 添加备注
./scripts/mark-paid.js 2 "已还清全部"

删除账单 remove-bill.js

./scripts/remove-bill.js \x3C序号>

示例:

# 删除第 1 个账单
./scripts/remove-bill.js 1

⏰ 自动提醒

定时任务

安装时会自动添加 cron 任务,每天 9:00 检查账单:

0 9 * * * /path/to/bill-reminder/scripts/check-bills.js >> ~/.openclaw/logs/bill-reminder.log 2>&1

提醒规则

情况 提醒时间 提醒内容
提前 N 天 到期前 N 天的 9:00 ⏰ 账单提醒
到期当天 到期日 9:00 ⚠️ 今天到期!
逾期 1-3 天 逾期后每天 9:00 🚨 已逾期!

防重复机制

  • 同一天的同类型提醒只发送一次
  • 次日自动清除标记,允许再次提醒

💬 微信提醒示例

提前提醒

⏰ 账单提醒

📋 招商银行信用卡
💰 ¥5000
📅 15 日到期

还有 3 天,别忘了哦~ 🦆

到期提醒

⚠️ 今天到期!

📋 招商银行信用卡
💰 ¥5000

今天最后期限,快还!🦆

逾期提醒

🚨 已逾期!

📋 招商银行信用卡
💰 ¥5000
📅 逾期 2 天

赶紧还,要产生利息了!🦆

还款确认

✅ 已记录还款!

📋 招商银行信用卡
💰 ¥5000
📅 下次到期:4 月 15 日

继续保持良好的信用记录~ 🦆

📁 文件结构

bill-reminder/
├── SKILL.md                    # 本文件
├── README.md                   # 快速入门
├── package.json                # 项目配置
├── install.sh                  # 安装脚本
├── scripts/
│   ├── add-bill.js             # 添加账单
│   ├── list-bills.js           # 查看账单
│   ├── remove-bill.js          # 删除账单
│   ├── mark-paid.js            # 标记还款
│   └── check-bills.js          # 检查到期(cron 用)
├── data/
│   └── bills.json              # 账单数据存储
└── tests/
    └── test-bill-reminder.sh   # 测试脚本

💾 数据格式

data/bills.json 存储所有账单数据:

{
  "bills": [
    {
      "id": "bill_1711432800000",
      "name": "招商银行信用卡",
      "amount": 5000,
      "dueDay": 15,
      "cycle": "monthly",
      "advanceDays": 3,
      "userId": "[email protected]",
      "createdAt": "2026-03-26T13:00:00Z",
      "lastPaid": "2026-02-15T10:30:00Z",
      "nextDue": "2026-04-15T00:00:00Z",
      "status": "active"
    }
  ],
  "paymentHistory": [
    {
      "billId": "bill_1711432800000",
      "paidAt": "2026-02-15T10:30:00Z",
      "amount": 5000,
      "note": "已还清"
    }
  ]
}

🔧 配置

环境变量

变量 默认值 说明
WEIXIN_CHANNEL openclaw-weixin 微信渠道 ID
WEIXIN_ACCOUNT d72d5b576646-im-bot 微信账号 ID
WEIXIN_USER_ID [email protected] 接收提醒的用户 ID

修改提醒时间

编辑 crontab:

crontab -e

修改第一行(9 改成你想要的小时):

0 9 * * * /path/to/check-bills.js >> ...

❓ 常见问题

Q: 支持多个用户吗?

A: 目前每个用户需要单独配置。可以在添加账单时指定不同的 userId

Q: 可以设置多个提醒时间吗?

A: 目前固定每天 9:00 检查。如需多次提醒,可以添加多个 cron 任务:

# 早晚各检查一次
0 9 * * * /path/to/check-bills.js >> ...
0 20 * * * /path/to/check-bills.js >> ...

Q: 数据会丢失吗?

A: 数据存储在本地 JSON 文件,建议定期备份:

cp ~/.openclaw/workspace/skills/bill-reminder/data/bills.json ~/backup/bills-$(date +%Y%m%d).json

Q: 支持农历日期吗?

A: 目前只支持公历。农历需求可以提 Issue~

Q: 逾期后怎么停止提醒?

A: 标记还款即可:

./scripts/mark-paid.js \x3C序号>

🔒 安全说明

  • 所有数据存储在本地,不会上传
  • 微信消息通过 OpenClaw 官方渠道发送
  • 建议定期备份 data/bills.json

📝 更新日志

v1.0.0 (2026-03-26)

  • ✅ 初始版本发布
  • ✅ 支持添加/查看/删除账单
  • ✅ 支持标记还款
  • ✅ 自动到期检查(cron)
  • ✅ 微信提醒(提前/到期/逾期)
  • ✅ 还款历史记录

🤝 贡献

欢迎提交 Issue 和 Pull Request!


📄 许可证

MIT-0 License


🦆 作者

鸭鸭 (Yaya) - 你的私人账单管家

安全使用建议
What to consider before installing: - Functional fit: The files implement a local bill tracker that sends WeChat messages via a local 'openclaw' CLI and schedules a daily cron job. That matches the skill description. - Metadata gaps: The package metadata does NOT declare required binaries (Node.js and the 'openclaw' CLI) or the WEIXIN_* env vars the code reads. Expect to have Node.js and the OpenClaw CLI available and authenticated before using this skill. - Persistence: install.sh will add a line to your user crontab and create logs under ~/.openclaw. If you don’t want that, inspect and run the install steps manually or edit the install script before running. - Security risk — shell injection: The scripts build shell commands by embedding message text and user-provided fields directly into a string passed to execSync. If a bill name or note contains quotes or malicious content, it could break out and run arbitrary shell commands. To reduce risk: - Only install from a trusted source. - Inspect or patch sendWeixinMessage to avoid shell interpolation (use child_process.spawn with args array or properly escape/quote inputs). - Validate/sanitize user inputs (names, notes) before adding them to data or sending messages. - Data locality: Data is stored in a local JSON file (data/bills.json). Back it up if needed and set file permissions if you want to restrict access. - Testing: The included tests expect 'jq' to be installed; run tests in a safe environment. Consider running the skill in a container or isolated account if you want to limit the blast radius. If you are comfortable with the above (or can patch the code to avoid execSync string interpolation and fix metadata), the skill is usable. If not, decline or request the author to (1) declare required binaries/envs, (2) remove or document the cron modification explicitly, and (3) fix the command-construction to avoid shell injection.
功能分析
Type: OpenClaw Skill Name: bill-reminder Version: 1.0.0 The skill bundle contains a critical shell injection vulnerability across multiple scripts (add-bill.js, check-bills.js, mark-paid.js, and remove-bill.js). User-supplied input, such as bill names, is directly interpolated into a shell command string executed via 'execSync' to send WeChat messages, allowing for arbitrary command execution if a name contains shell metacharacters (e.g., "; command ;"). Additionally, the scripts contain a hardcoded WeChat USER_ID ([email protected]), which is highly specific for a general-purpose skill. While these represent severe security flaws, they appear to be unintentional vulnerabilities rather than explicit malware.
能力评估
Purpose & Capability
The skill's code implements local bill storage, cron-based checks, and sending WeChat messages via the local 'openclaw' CLI — which matches the stated purpose. However the registry metadata did not declare required binaries (Node.js and the 'openclaw' CLI) even though install.sh and the scripts require them; the SKILL.md documents WEIXIN_* env vars but the package metadata lists no required environment variables. These mismatches are inconsistent and should be corrected.
Instruction Scope
SKILL.md and the scripts stay within the feature scope (adding/listing/removing bills and sending reminders). However the scripts construct shell commands with unescaped, user-controllable content (bill names, notes, message text, userId) passed to execSync('openclaw message send ... --message "..."'). This creates a command-injection risk if names/notes contain quotes or shell metacharacters. The install script also automatically appends a cron job to the user's crontab (persistent system change) — expected for cron-based reminders but worth explicit user consent.
Install Mechanism
There is no network download; install.sh is included and does local setup (permission bits, create log dir, init data file, add crontab). No external arbitrary URL downloads or archives were used. This is lower-risk than fetching remote code, but it does make persistent changes (crontab) and requires utilities that the metadata doesn't declare.
Credentials
The SKILL.md documents three environment variables (WEIXIN_CHANNEL, WEIXIN_ACCOUNT, WEIXIN_USER_ID) with sensible defaults and the code uses them. The registry metadata, however, lists no required env vars or primary credential. Also the scripts rely on the 'openclaw' CLI being installed and authenticated — but that CLI's credentials are not declared by the skill. This gap reduces transparency and could confuse users about what secrets/credentials are needed.
Persistence & Privilege
The skill adds a cron job to the user's crontab to run daily checks and writes logs/data under ~/.openclaw — these are persistent changes within the user's account (not system-wide). 'always' is false (not force-included). Adding a crontab entry is expected for this functionality but is a privileged persistent action that should be presented clearly to users before install.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install bill-reminder
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /bill-reminder 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
bill-reminder v1.0.0 - 初始版本发布 - 支持添加、查看、删除各类账单(信用卡、花呗、房租等) - 可设置周期(每月/每周/每年)及提前提醒天数 - 账单到期、逾期和还款支持自动微信提醒 - 标记还款功能,自动保存历史记录 - 命令行操作与本地 JSON 文件存储
元数据
Slug bill-reminder
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Bill Reminder 是什么?

账单提醒技能 - 自动监控账单到期并发送微信提醒. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 110 次。

如何安装 Bill Reminder?

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

Bill Reminder 是免费的吗?

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

Bill Reminder 支持哪些平台?

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

谁开发了 Bill Reminder?

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

💬 留言讨论