个人记账

v1.0.0

个人记账技能,支持文字输入和图片账单识别。当用户提到记账、记录花费、添加支出/收入、上传账单图片、查看账单、统计消费时必须使用此技能。用户单独发送图片(无任何文字)时也必须触发此技能,直接看图判断金额并记账,不要等待用户补充说明。所有账单按天存储在 bills/ 文件夹中,同一天的账单累加到同一文件。

0· 196·0 current·0 all-time

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for jzw6/personal-accounting.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "个人记账" (jzw6/personal-accounting) from ClawHub.
Skill page: https://clawhub.ai/jzw6/personal-accounting
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install personal-accounting

ClawHub CLI

Package manager switcher

npx clawhub@latest install personal-accounting
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description, SKILL.md and the included script align: a personal accounting skill that parses user text/images and appends records to bills/YYYY-MM-DD.md. There are no unrelated binaries, credentials, or external integrations requested.
Instruction Scope
Instructions require the agent to autonomously interpret images (including when the user sends only an image) and record entries without asking for confirmation. This is a behavioral/UX concern (unintended writes) but not a code-level security mismatch. The script itself only reads/writes local files under the skill folder.
Install Mechanism
Instruction-only skill with a local Python script; no install spec, no downloads, and no external package install is requested.
Credentials
The skill requires no environment variables, credentials, or config paths. The requested permissions are limited to creating/reading/writing the bills/ directory inside the skill tree, which is consistent with its purpose.
Persistence & Privilege
The script persists records by creating/appending Markdown files in bills/. always is false and the skill does not alter other skills or global agent settings. Be aware the skill will create persistent files in its directory and will write entries automatically if the agent follows the SKILL.md behavior.
Assessment
This skill appears to do what it says: local bookkeeping using a Python script that writes daily Markdown files in a bills/ directory. There is no network activity or secret access. Two practical things to consider before installing: 1) The SKILL.md requires the agent to automatically record when the user sends an image (no confirmation). If you do not want automatic writes from image-only messages, modify the instructions or require user confirmation. 2) Files are stored persistently inside the skill directory — check where that directory lives in your environment and whether you want those records there (backup, encryption, or deletion policies). If you need stricter privacy, run the script in a controlled location or require explicit confirmation before writing entries.

Like a lobster shell, security has layers — review code before you run it.

latestvk9772z2q6n25q5613hp3rhc4f583xtb1
196downloads
0stars
1versions
Updated 4w ago
v1.0.0
MIT-0

记账技能 (personal-accounting Skill)

功能概述

  • 文字记账:解析自然语言,提取金额、分类、备注
  • 图片记账:直接看图识别账单金额,由模型判断最终支付金额
  • 按天存储:账单写入 bills/YYYY-MM-DD.md,同一天记录追加到同一文件

目录结构

personal-accounting/
├── SKILL.md
├── bills/                # 账单存储目录(自动创建)
│   └── YYYY-MM-DD.md
├── scripts/
│   └── record_bill.py    # 账单写入/查询
└── references/
    └── categories.md     # 消费分类关键词参考

⚠️ 使用前提

图片记账依赖多模态模型(能看图的模型)。如果你只发图片但模型没有识别,请检查当前使用的模型是否支持图片输入。

推荐模型:Claude 3.5 Sonnet / Claude 3 Opus / GPT-4o 等支持视觉的模型。


使用流程

Step 1:判断输入类型

输入类型处理方式
纯文字直接解析金额、分类、备注
纯图片(无文字)直接看图记账,不询问用户意图
图片+文字看图判断金额,用户文字作为备注或分类提示

Step 2:解析账单信息

提取字段:

字段说明
amount金额(元,保留2位小数)
typeexpense(支出)/ income(收入)
category分类,参考 references/categories.md
note备注(可选)
date日期(默认今天)

文字解析关键词:

  • "花了 / 付了 / 消费 / 支出" → expense
  • "收到 / 收入 / 进账" → income

Step 3:图片识别(如有图片)

直接观察图片内容,按以下优先级判断金额:

  1. 🥇 「实付 / 实收 / 已支付 / 需付 / 支付金额」→ 用户最终付出的钱
  2. 🥈 「合计 / 总计 / 总额 / 应付」→ 订单总价
  3. ❌ 忽略:单品价格、优惠减免、配送费、税额、找零
  4. 若有多个候选,选语义最接近「最终实际支付」的数字
  5. 无法判断时,描述看到的内容并请用户确认金额

Step 4:写入账单文件

python scripts/record_bill.py \
  --amount <金额> \
  --type <expense|income> \
  --category <分类> \
  --note "<备注>" \
  --date <YYYY-MM-DD>   # 可选,默认今天

Step 5:回复用户

✅ 已记录
📅 2024-01-15  🏷️ 餐饮  💸 支出 ¥20.00
📝 备注:外卖黄焖鸡
📊 今日累计支出:¥68.00

账单文件格式

bills/YYYY-MM-DD.md

# 账单 2024-01-15

| 时间 | 类型 | 分类 | 金额 | 备注 |
|------|------|------|------|------|
| 08:30 | 支出 | 餐饮 | ¥15.00 | 早餐 |
| 12:15 | 支出 | 餐饮 | ¥20.00 | 外卖黄焖鸡 |
| 18:00 | 收入 | 工资 | ¥500.00 | 兼职 |

---
**今日支出:¥35.00 | 今日收入:¥500.00 | 净额:+¥465.00**

查询功能

python scripts/record_bill.py --list                        # 今日账单
python scripts/record_bill.py --list --date 2024-01-15     # 指定日期
python scripts/record_bill.py --summary --month 2024-01    # 月度汇总

错误处理

场景处理方式
图片模糊/看不清金额描述看到的内容,请用户确认
图片非账单告知用户并询问是否手动输入
未指定分类根据内容推断,告知用户可纠正

Comments

Loading comments...