Xpersona
F

Family Account Book 家庭财务记账

CLAWHUB · Unverified

家庭财务记账系统,负责记录家庭收支、查看余额、月度统计等财务操作。当用户提到以下场景时使用此技能:(1) 记录消费、支出、收入 - 如"花了XX钱"、"今天吃了顿饭XX元"、"发了工资XX";(2) 查看账户余额 - 如"账户还剩多少钱"、"余额多少";(3) 财务统计 - 如"这个月花了多少"、"月度报表"、"... Skill: Family Account Book 家庭财务记账 Owner: silent404 Summary: 家庭财务记账系统,负责记录家庭收支、查看余额、月度统计等财务操作。当用户提到以下场景时使用此技能:(1) 记录消费、支出、收入 - 如"花了XX钱"、"今天吃了顿饭XX元"、"发了工资XX";(2) 查看账户余额 - 如"账户还剩多少钱"、"余额多少";(3) 财务统计 - 如"这个月花了多少"、"月度报表"、"... Tags: latest:2.1.0 Version history: v2.1.0 | 2026-04-05T16:53:49.812Z | user v2.1: emoji输出格式规范 + 账户结构优化 (天狼声学实验室/删除闲鱼店铺) v1.0.6 | 2026-04-02T02:44:04.665Z | auto - 技能名称由“家庭记账手册”更新为“家庭财务记账” - 精简和调整了描述

62
Rank
84
Safety
1.1k
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 1.1K downloads reported by the source. Last updated 10/11/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Install and run

Setup complexity: low.

clawhub skill install s175m8ecshrqyqy5nvsg3nr5ks83zt6g:keep-accounts
  1. Setup complexity is classified as HIGH. You must provision dedicated cloud infrastructure or an isolated VM. Do not run this directly on your local workstation.
  2. Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-silent404-keep-accounts/snapshot"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

Documentation

CLAWHUB

46,774 characters of source documentation, loaded on request.

Extracted files

4 files captured from the source.

SKILL.md

---
name: Family Account Book / 家庭财务记账
description: 家庭财务记账系统,负责记录家庭收支、查看余额、月度统计等财务操作。当用户提到以下场景时使用此技能:(1) 记录消费、支出、收入 - 如"花了XX钱"、"今天吃了顿饭XX元"、"发了工资XX";(2) 查看账户余额 - 如"账户还剩多少钱"、"余额多少";(3) 财务统计 - 如"这个月花了多少"、"月度报表"、"本周支出";(4) 账户转账 - 如"从A账户转B账户"、"转账XX元";(5) 创建新账户或初始化账本;(6) 询问预算或财务规划。
---

# 家庭财务记账技能

## 快速开始

### 常用命令

```bash
# 快速记账
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到日常支出":
```python
# 第一条:主账户支出100(转出)
python3 .../finance_db.py --add default 主账户 支出 1000 转账 转至日常支出

# 第二条:日常支出收入1000(转入)
python3 .../finance_db.py --add default 日常支出 收入 1000 转账 来自主账户
```

### 6. 近7日/特定周期查询
使用Python脚本查询:
```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()
"
```

## 核心原则

1. **严禁编造数据**:金额必须由用户主动提供
2. **统一用ID记录**:账户用ID(如B001),不是名称
3. **转账记录两条**:内部流动需要一出一入两条记录
4. **统计排除转账**:月度报表自动排除转账分类
5. **负数余额是合法的**:部分账户(如投资账户)设计为跟踪盈亏,负数表示亏损

## 数据库信息

- **数据库路径**: `{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 | 投资账户 |

_meta.json

{
  "ownerId": "kn75ddhs7qybty4hbva0fcangd83z028",
  "slug": "keep-accounts",
  "version": "2.1.0",
  "publishedAt": 1775408029812
}

references/finance.md

# 家庭财务数据库参考文档

## 数据库位置
```
{WORKSPACE}/finances/db/finance.db
```

## 数据库结构

### accounts(账户表)

| 字段 | 类型 | 说明 |
|------|------|------|
| id | TEXT | 账户ID(如B001) |
| ledger | TEXT | 账本名称 |
| member | TEXT | 成员名称 |
| name | TEXT | 账户名称 |
| type | TEXT | 账户类型 |
| initial_balance | REAL | 初始余额 |
| budget | REAL | 预算额度 |
| remark | TEXT | 备注 |

### transactions(交易表)

| 字段 | 类型 | 说明 |
|------|------|------|
| id | INTEGER | 主键自增 |
| date | TEXT | 日期(YYYY-MM-DD) |
| ledger | TEXT | 账本名称 |
| account_id | TEXT | 账户ID |
| type | TEXT | 类型(收入/支出/转账) |
| amount | REAL | 金额(始终为正数) |
| category | TEXT | 分类 |
| description | TEXT | 描述 |

### members(成员表)

| 字段 | 类型 | 说明 |
|------|------|------|
| feishu_id | TEXT | 飞书用户ID(主键) |
| nickname | TEXT | 昵称 |
| ledger | TEXT | 账本名称 |
| account_id | TEXT | 默认账户ID |
| role | TEXT | 角色(管理员/成员) |

## 账户ID速查

| ID | 账户名称 |
|----|----------|
| B001 | 主账户 |
| B002 | 储蓄账户 |
| B003 | 日常支出 |
| B004 | 梦想基金 |
| B005 | 医疗基金 |
| B006 | 零花钱 |
| B007 | 游戏账户 |
| B008 | 数字资产 |
| B009 | 备用账户 |
| B010 | 养老账户A |
| B011 | 养老账户B |
| B012 | 子女基金 |
| B013 | 二手平台 |
| B014 | 投资账户 |

## 数据库初始化SQL

如需重新初始化数据库,执行以下SQL:

```sql
CREATE TABLE IF NOT EXISTS accounts (
    id TEXT PRIMARY KEY,
    ledger TEXT NOT NULL,
    member TEXT NOT NULL,
    name TEXT NOT NULL,
    type TEXT NOT NULL,
    initial_balance REAL NOT NULL DEFAULT 0,
    budget REAL DEFAULT 0,
    remark TEXT
);

CREATE TABLE IF NOT EXISTS transactions (
    id INTEGER PRIMARY KEY AUTOINCREMENT,
    date TEXT NOT NULL,
    ledger TEXT NOT NULL,
    account_id TEXT NOT NULL,
    type TEXT NOT NULL,
    amount REAL NOT NULL,
    category TEXT NOT NULL,
    description TEXT,
    notes TEXT DEFAULT "",
    FOREIGN KEY (account_id) REFERENCES accounts(id)
);

CREATE TABLE IF NOT EXISTS members (
    feishu_id TEXT PRIMARY KEY,
    nickname TEXT NOT NULL,
    ledger TEXT NOT NULL,
    account_id TEXT NOT NULL,
    role TEXT DEFAULT 'member'
);
```

## 常用查询

### 查看账户余额
```python
import sqlite3
conn = sqlite3.connect('{WORKSPACE}/finances/db/finance.db')
conn.row_factory = sqlite3.Row
cur = conn.cursor()
cur.execute('SELECT * FROM accounts ORDER BY id')
for row in cur.fetchall():
    print(dict(row))
conn.close()
```

### 查找账户ID
```python
# 精确查找
account = conn.execute('SELECT id FROM accounts WHERE name = ? OR id = ?', (name, name)).fetchone()

# 模糊查找
account = conn.execute('SELECT id FROM accounts WHERE name LIKE ?', (f'%{name}%',)).fetchone()
```

skill-card.md

## Description:

Family Account Book 家庭财务记账 records household income, expenses, transfers, balances, and monthly summaries in a local SQLite account book.

This skill is ready for commercial/non-commercial use.

## Publisher:

[silent404](https://clawhub.ai/user/silent404)

### License/Terms of Use:

MIT-0

## Use Case:

External users and agents use this skill to maintain household financial records, including adding income or expense entries, checking account balances, producing monthly summaries, and recording transfers between accounts.

### Deployment Geography for Use:

Global

## Known Risks and Mitigations:

Risk: The skill can persistently change local household finance records.

Mitigation: Require explicit user confirmation before add, transfer, initialization, or account-affecting actions.

Risk: Natural-language account selection and fuzzy matching can post entries to the wrong account.

Mitigation: Prefer account IDs over fuzzy account names before writing transactions.

Risk: Finance records may become inaccurate if data is lost or transfers are only partially recorded.

Mitigation: Keep database backups and review transfer entries before relying on reports.

Risk: The current implementation is not suitable as an authoritative financial ledger.

Mitigation: Use it for household tracking only until amount validation, ledger scoping, and atomic transfer handling are added.

## Reference(s):

- [ClawHub skill page](https://clawhub.ai/silent404/skills/keep-accounts)
- [家庭财务数据库参考文档](artifact/references/finance.md)

## Skill Output:

**Output Type(s):** [Text, Markdown, Code, Shell commands, Configuration]

**Output Format:** [Markdown guidance with shell commands and local SQLite query or update output]

**Output Parameters:** [1D]

**Other Properties Related to Output:** [Can persistently create or update a local household finance SQLite database when the agent executes the provided commands.]

## Skill Version(s):

2.1.0 (source: server release metadata)

## Ethical Considerations:

Users should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.

Sponsored

Ads related to Family Account Book 家庭财务记账 and adjacent AI workflows.