← Back to Skills Marketplace
201
Downloads
1
Stars
0
Active Installs
8
Versions
Install in OpenClaw
/install keep-accounts
Description
家庭财务记账系统,负责记录家庭收支、查看余额、月度统计等财务操作。当用户提到以下场景时使用此技能:(1) 记录消费、支出、收入 - 如"花了XX钱"、"今天吃了顿饭XX元"、"发了工资XX";(2) 查看账户余额 - 如"账户还剩多少钱"、"余额多少";(3) 财务统计 - 如"这个月花了多少"、"月度报表"、"...
README (SKILL.md)
家庭财务记账技能
快速开始
常用命令
# 快速记账
python3 /path/to/finances/scripts/finance_db.py --add 账本 账户 类型 金额 分类 描述
# 查看所有账户余额
python3 /path/to/finances/scripts/finance_db.py -b
# 月度统计报表
python3 /path/to/finances/scripts/finance_db.py -s [YYYY-MM]
参数说明
| 参数 | 说明 | 示例 |
|---|---|---|
| 账本 | 账本名称 | default |
| 账户 | 账户名称或ID | 主账户 / B001 |
| 类型 | 收入/支出/转账 | 收入 / 支出 |
| 金额 | 数字金额 | 79.7 |
| 分类 | 消费分类 | 餐饮 / 工资 / 购物 |
| 描述 | 交易描述 | 肯德基 / 月薪 |
记账工作流
1. 记录消费
用户: "今天搓一顿肯德基,79块7"
操作: python3 .../finance_db.py --add default 主账户 支出 79.7 餐饮 肯德基
2. 记录收入
用户: "今天发工资了,15000"
操作: python3 .../finance_db.py --add default 主账户 收入 15000 工资 月薪
3. 查看余额
用户: "看一下所有账户"
操作: python3 .../finance_db.py -b
4. 月度统计
用户: "看一下这个月花了多少"
操作: python3 .../finance_db.py -s 2026-04
5. 转账操作
转账需要记录两条交易(一出一入):
假设用户说"从主账户转1000到日常支出":
# 第一条:主账户支出100(转出)
python3 .../finance_db.py --add default 主账户 支出 1000 转账 转至日常支出
# 第二条:日常支出收入1000(转入)
python3 .../finance_db.py --add default 日常支出 收入 1000 转账 来自主账户
6. 近7日/特定周期查询
使用Python脚本查询:
python3 -c "
import sqlite3, datetime
conn = sqlite3.connect('{WORKSPACE}/finances/db/finance.db')
conn.row_factory = sqlite3.Row
cur = conn.cursor()
week_ago = (datetime.datetime.now() - datetime.timedelta(days=7)).strftime('%Y-%m-%d')
cur.execute('''
SELECT t.date, t.amount, t.category, t.description, a.name as account
FROM transactions t
JOIN accounts a ON t.account_id = a.id
WHERE t.date >= ?
ORDER BY t.date DESC
''', (week_ago,))
for r in cur.fetchall():
print(f\" {r['date']} ¥{r['amount']:.2f} [{r['category']}] {r['description']}\")
conn.close()
"
核心原则
- 严禁编造数据:金额必须由用户主动提供
- 统一用ID记录:账户用ID(如B001),不是名称
- 转账记录两条:内部流动需要一出一入两条记录
- 统计排除转账:月度报表自动排除转账分类
- 负数余额是合法的:部分账户(如投资账户)设计为跟踪盈亏,负数表示亏损
数据库信息
- 数据库路径:
{WORKSPACE}/finances/db/finance.db - 详细Schema: 参见
references/finance.md
账户ID速查
| ID | 账户名称 |
|---|---|
| B001 | 主账户 |
| B002 | 储蓄账户 |
| B003 | 日常支出 |
| B004 | 梦想基金 |
| B005 | 医疗基金 |
| B006 | 零花钱 |
| B007 | 游戏账户 |
| B008 | 数字资产 |
| B009 | 备用账户 |
| B010 | 养老账户A |
| B011 | 养老账户B |
| B012 | 子女基金 |
| B013 | 二手平台 |
| B014 | 投资账户 |
Usage Guidance
This skill appears to be a straightforward local bookkeeping tool. Before installing, confirm where the script will live so you know exactly which filesystem path will hold the database (SKILL.md shows {WORKSPACE}/finances/db/finance.db but the script uses a path relative to its file location). Back up any existing DB before first run. Be aware the skill prints local transactions and balances to STDOUT — do not run it in contexts where those outputs could be forwarded to external services you don't trust. Finally, inspect or run the provided scripts in a controlled environment (or sandbox) if you want to verify behavior before using with real financial data.
Capability Analysis
Type: OpenClaw Skill
Name: keep-accounts
Version: 2.1.0
The skill bundle is a legitimate family finance tracking system that uses a local SQLite database to manage accounts and transactions. The Python script (scripts/finance_db.py) and instructions (SKILL.md) are well-structured, use parameterized queries to prevent SQL injection, and contain no evidence of data exfiltration, malicious execution, or unauthorized access.
Capability Assessment
Purpose & Capability
Name/description (家庭记账) align with provided artifacts: SKILL.md, a reference doc, and a single Python script that implements adding transactions, balances, and monthly stats. No unrelated binaries, credentials, or services are requested.
Instruction Scope
Runtime instructions are narrowly scoped to local bookkeeping operations (running the provided Python script and querying the local sqlite DB). Minor inconsistency: SKILL.md uses a {WORKSPACE}/finances/db/finance.db placeholder while the script computes DB_PATH relative to its file location (../db/finance.db). This is an operational mismatch (where the DB will be created/read) but not a security red flag. The instructions do read and print local financial data (expected for functionality) — ensure you are comfortable with that data being printed to agent outputs or logs.
Install Mechanism
No install spec; it's an instruction-only skill with a local Python script. Nothing is downloaded or written by an installer in the package metadata.
Credentials
The skill requests no environment variables, credentials, or external config paths. The code uses local filesystem only for a sqlite DB; this is proportional to a bookkeeping tool.
Persistence & Privilege
always is false and the skill does not request elevated platform privileges. It creates/uses a local sqlite DB in a relative db/ directory — standard behavior for a local app.
How to Use
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install keep-accounts - After installation, invoke the skill by name or use
/keep-accounts - Provide required inputs per the skill's parameter spec and get structured output
Version History
v2.1.0
v2.1: emoji输出格式规范 + 账户结构优化 (天狼声学实验室/删除闲鱼店铺)
v1.0.6
- 技能名称由“家庭记账手册”更新为“家庭财务记账”
- 精简和调整了描述中的中文与英文表达
- 其余文档内容、功能说明和用法未作改动
v1.0.5
- The skill name in SKILL.md was updated to include English: "Family Account Book / 家庭记账手册".
- No functional or workflow changes were introduced.
- Documentation is now clearer for bilingual users.
v1.0.4
keep-accounts 1.0.4
- Minor internal update in scripts/finance_db.py.
- No user-facing changes or documentation updates.
v1.0.3
- Changed skill name in SKILL.md from "keep-accounts" to "Family Account Book"
- No changes to core commands or usage documentation
- No functional code or workflow modifications
- All other content remains the same in structure and instructions
v1.0.2
Version 1.0.2 of keep-accounts
- No file changes detected; documentation and functionality remain the same.
- All existing features and usage guidelines are unchanged from the previous release.
v1.0.1
keep-accounts v1.0.1
- 更新账户示例名称,更通用规范(如“主账户”“日常支出”等,原为具体家庭成员或自定义名称)
- 账户ID速查表同步更改,原有账户名称更改为通用名称
- 部分命令及工作流说明中的账户名与ID示例相应调整
- 其余功能说明、核心原则与用法不变
v1.0.0
keep-accounts 1.0.0
- 初始版本上线,支持家庭财务收支记账、查看账户余额、月度统计、账户转账等操作。
- 支持通过命令行快速记账、查询余额及生成月度统计报表。
- 明确流水录入流程与各账户ID分配,方便账本管理和明细查询。
- 提供财务数据查询代码示例,可灵活统计近7日/指定时段明细。
- 设置账务原则:金额需用户输入、账户用ID、转账需双记录、月报排除转账、负数余额有效。
Metadata
Frequently Asked Questions
What is Family Account Book 家庭财务记账?
家庭财务记账系统,负责记录家庭收支、查看余额、月度统计等财务操作。当用户提到以下场景时使用此技能:(1) 记录消费、支出、收入 - 如"花了XX钱"、"今天吃了顿饭XX元"、"发了工资XX";(2) 查看账户余额 - 如"账户还剩多少钱"、"余额多少";(3) 财务统计 - 如"这个月花了多少"、"月度报表"、"... It is an AI Agent Skill for Claude Code / OpenClaw, with 201 downloads so far.
How do I install Family Account Book 家庭财务记账?
Run "/install keep-accounts" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Family Account Book 家庭财务记账 free?
Yes, Family Account Book 家庭财务记账 is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does Family Account Book 家庭财务记账 support?
Family Account Book 家庭财务记账 is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Family Account Book 家庭财务记账?
It is built and maintained by tbook (@silent404); the current version is v2.1.0.
More Skills