360 Secure SkillHub
360 安全技能中心

Receipt & Warranty Tracker

通过命令行录入收据文本、物品、价格和保修期限,将数据保存在本地账本中;支持查看状态、列出条目、删除、估算到期日和配置提前提醒。它不解析收据图片,未提供保修信息时不会猜测。

paradoxfuzzle
paradoxfuzzle
热度 7.65
最近更新 2026-10-10 04:31:22
分类:生活依赖:代码执行 / 读写文件应用场景:个人理财 / 任务管理 / 购物

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add receipt-warranty-tracker
Metadata
name
receipt-warranty-tracker
description
Personal admin: photograph a receipt, it stores the item, price, and warranty end date, then reminds you before coverage lapses.
user-invocable
true
metadata
{"openclaw":{"emoji":"🧾","requires":{"bins":["python3"],"files":[],"config":[]}}}

Receipt & Warranty Tracker

Snaps a receipt, it stores item/price/warranty end; the skill reminds you before coverage lapses. All data stays on disk — nothing is sent anywhere.

Ledger: ~/.openclaw/receipt-warranty-tracker/ledger.json (override the whole state dir with RECEIPT_WARRANTY_STATE_DIR for tests or parallel instances).

Commands

Run via bash: ~/.openclaw/plugin-skills/receipt-warranty-tracker/receipt_warranty.py <cmd> …. Add --json right after the program name for structured output.

Command Purpose
add --item X --receipt "…" --price 12.99 --warranty-days 365 Store a receipt+item. Repeatable as many times as you like.
add --item X --warranty-until 2027-05-01 Store when you already know the coverage end. Invalid dates are rejected.
status Per-entry state: ok / REMIND / EXPIRED / no-warranty, with days-left.
remind Mark today's reminders and save the flag (no duplicates).
list Simple registry: item / price / warranty days / warranty-until.
rm <item> Delete one entry.
estimate --date 2026-10-01 --days 3650 Estimate warranty end for already-bought items you haven't entered.
config [--remind-ahead-days N] Show/set how many days ahead reminders fire.

Behaviour rules

  • Idempotent add: the same item name replaces its previous record.
  • Price is unitless money here — you write the amount, the skill neither formats nor interprets it; use --currency to tag it.
  • Reminder policy: remind fires when warranty_until − today ≤ remind_ahead_days. remind_ahead_days is config (config --remind-ahead-days N, default 3). Once remind has fired for an entry, it won't echo again until you delete or edit it.
  • Expiry semantics: status and remind classify entries past their warranty end as EXPIRED (checked against date.today()).
  • Never invent coverage: without --warranty-days or --warranty-until, entries carry no warranty window — the skill tells you so explicitly instead of guessing.
  • Atomic writes; file lock unused: ledger saves lock briefly via tmp file + rename; concurrent CLI runs are effectively serialized by the atomic replace (the fcntl lock file is no longer used).

Example

R=~/.openclaw/plugin-skills/receipt-warranty-tracker/receipt_warranty.py
python3 $R add --item "MacBook Pro 14" --receipt "photo: 4 lines, $2499" \
  --price 2499 --warranty-days 365
python3 $R status
python3 $R remind | sed 's/^/🧾 /'