Family Bookkeeping
by @hzlawliet
Manage a family bookkeeping workflow backed by Feishu Bitable. Use when the user wants to record an expense or income, say things like "记一笔""记账""入账""查本月支出""看...
clawhub install family-bookkeeping📖 About This Skill
name: family-bookkeeping description: Manage a family bookkeeping workflow backed by Feishu Bitable. Use when the user wants to record an expense or income, say things like "记一笔""记账""入账""查本月支出""看年度统计""修改这笔账""删除这笔账", or import/export household transactions from WeChat or Alipay bills. Also use when the user wants monthly or yearly summaries, category breakdowns, member-based spending analysis, duplicate-safe bill imports, or natural-language CRUD for a shared family ledger. metadata: { "openclaw": { "requires": { "env": ["FEISHU_APP_ID", "FEISHU_APP_SECRET", "FAMILY_BOOKKEEPING_APP_TOKEN", "FAMILY_BOOKKEEPING_TABLE_ID", "FAMILY_BOOKKEEPING_BITABLE_URL"] } } }
Family Bookkeeping
Overview
Use this skill as the default workflow for household bookkeeping tasks.
This skill assumes the primary ledger is provided by environment variables unless the user explicitly asks to change it:
FAMILY_BOOKKEEPING_APP_TOKENFAMILY_BOOKKEEPING_TABLE_IDFAMILY_BOOKKEEPING_BITABLE_URLPrimary goals: 1. Record income and expenses from natural language 2. Support update, query, and delete flows safely 3. Prepare for WeChat and Alipay batch bill import 4. Keep category and statistics logic consistent
Core Ledger Schema
Use these fields as the canonical schema:
日期金额记账人一级类型二级类型备注收支类型支付平台导入来源流水号创建时间更新时间Normalization rules:
金额 as a positive number金额 = 0收支类型 to distinguish 收入 vs 支出流水号 as the preferred dedupe key for imported bills一级类型=其他 and 二级类型=暂未分类Trigger Phrases
Prefer this skill when the user says or implies any of the following:
记账记一笔入账今天花了 28今天午饭 32,记王某帮我查下这个月花了多少看下 3 月餐饮支出把昨天那笔改成交通删掉今天那杯咖啡导入支付宝账单导入微信账单统计一下今年总支出按类别看本月开销Default Category System
Use this default mapping unless the user later overrides it.
餐饮
交通
日用购物
生活缴费
医疗健康
教育成长
娱乐休闲
人情社交
服饰美妆
孩子 / 家庭专项
金融支出
收入
其他
Workflow Decision Tree
1. New record flow
Use when the user wants to add a new transaction.
Extract these fields if possible:
Rules:
今天/昨天/前天; otherwise ask收支类型 is not explicit, infer from wording; if ambiguous, ask其他 / 暂未分类 rather than blocking其他Example interpretations:
今天午饭 32 → 支出 / 餐饮 / 午饭老婆买菜 86 → 支出 / 日用购物 / 买菜 / 记账人=老婆报销到账 500 → 收入 / 收入 / 报销2. Update flow
Use when the user wants to change an existing transaction.
Locate the target record using the smallest reliable candidate set based on:
Rules:
Example requests:
把昨天那笔咖啡改成 28把今天那笔买菜改成日用购物备注改成请同事喝咖啡3. Delete flow
Use when the user wants to delete a transaction.
Safety rule:
Process: 1. Find candidate records 2. If none, say so clearly 3. If one, describe it briefly and ask for confirmation if needed 4. If many, list short candidates and ask which one to delete
4. Query and statistics flow
Use when the user asks for summaries or breakdowns.
Common query intents:
一级类型二级类型记账人Response style:
Suggested summary format:
5. Import flow
Use when the user wants to import WeChat or Alipay bills.
Current policy:
Import rules:
流水号流水号日期 + 金额 + 交易对方/备注 + 支付平台导入来源其他 / 暂未分类WeChat mapping
日期 ← 交易时间金额 ← 金额(元)收支类型 ← 收/支支付平台 ← 微信流水号 ← 交易单号导入来源 ← 微信账单备注 ← 商品 + 交易对方 + 原备注(可拼接)Alipay mapping
日期 ← 优先交易付款时间,没有则用交易创建时间金额 ← 金额(元)收支类型 ← 收/支支付平台 ← 支付宝流水号 ← 交易订单号导入来源 ← 支付宝账单备注 ← 商品名称 + 交易对方 + 原备注(可拼接)Classification Heuristics
Read references/category-system.md when detailed category mapping is needed.
Read references/usage.md when practical command examples or operator-facing usage details are needed.
If confidence is low, prefer 其他 / 暂未分类.
Operational Notes
FAMILY_BOOKKEEPING_APP_TOKEN
- FAMILY_BOOKKEEPING_TABLE_ID
- FAMILY_BOOKKEEPING_BITABLE_URL
FEISHU_APP_ID
- FEISHU_APP_SECRET
Scripts
scripts/normalize_bills.py
Use this script to normalize exported WeChat or Alipay bill files into the canonical family-bookkeeping schema.
Example usage:
python3 skills/family-bookkeeping/scripts/normalize_bills.py bill.xlsx --bookkeeper 张三 --format json --output normalized.json
python3 skills/family-bookkeeping/scripts/normalize_bills.py bill.csv --platform alipay --bookkeeper 李四 --format csv --output normalized.csv
Behavior:
wechat / alipay).csv and .xlsx金额 as positive numbers收支类型不计收支 Alipay rows by defaultscripts/export_feishu_import_csv.py
Use this script to convert normalized rows into a CSV that Feishu Bitable can import directly.
Example usage:
python3 skills/family-bookkeeping/scripts/export_feishu_import_csv.py normalized.json --output feishu-import.csv
Read references/feishu-import.md for the end-to-end import flow and the target ledger mapping.
Future Expansion
This first version can later be extended with: