闲社服务运行正常AI智能体自动化平台
l

本地预算分析

技能标识:local-budget

Analyze exported bank/credit card CSV files locally to track spending, categorize transactions with LLM reasoning, compare against user-defined budgets, and generate markdown reports. Use when the user mentions budgeting, spending analysis, finance tracking, bank statements, credit card exports, CSV transactions, monthly spending, or wants to know where their money is going. Fully local — no third-party APIs, complete privacy. Triggers on words like budget, spending, transactions, bank CSV, cred

作者:admin | 来源记录:ClawHub
登记来源
ClawHub
版本
V 1.0.0
检测标记
后台标记通过
免费
免费获取
0
收藏
来源与检测标记为平台登记信息,并不代表已展示可复核的检测报告。使用前请核对版本、依赖和所需权限,建议先在隔离环境中运行。
概述
安装方式
版本历史

本地预算分析

本地预算

分析银行/信用卡CSV导出文件,对交易进行分类,与预算进行比较,并为Obsidian生成简洁的Markdown报告。

工作流程概览

  1. 1. 解析 — 运行 parse_csv.py 将原始CSV文件标准化为统一JSON格式
  2. 分类 — 运行 categorize.py 获取带有建议分类的、可供LLM处理的JSON文件;审查/调整
  3. 报告 — 运行 report.py 生成Markdown格式的支出报告

所有脚本位于 scripts/ 目录。预算配置和示例数据位于 assets/ 目录。支持的格式请参见 references/csv-formats.md,分类自定义请参见 references/categories.md。

第一步:解析CSV

bash
python3 scripts/parse_csv.py [--format chase|boa|generic] [--output transactions.json]

  • - 如果省略 --format 参数,将自动检测格式(检查表头列)
  • 输出交易对象的统一JSON数组
  • 每个交易:{ date: YYYY-MM-DD, description: str, amount: float, type: debit|credit, original_category: str|null }
  • 支出为正数;收入(退款/收入)为负数
  • 支持多种日期格式:MM/DD/YYYY、YYYY-MM-DD、MM/DD/YY
  • 跳过缺少日期或金额的行,并将警告记录到stderr

如果用户的银行无法自动检测,请查看 references/csv-formats.md 了解列映射,并使用适当的标志配合 --format generic,或添加新格式。

第二步:分类交易

bash
python3 scripts/categorize.py transactions.json [--budget assets/sample-budget.json] [--output categorized.json]

  • - 输出一个JSON文件,其中每笔交易根据描述关键词匹配被标记为建议的 category
  • LLM(你)应在生成报告前审查输出并调整分类
  • 默认分类:住房、餐饮、交通、公用事业、娱乐、购物、健康、订阅、收入、其他
  • 调整方式:直接编辑JSON,或告知用户哪些交易看起来分类错误并确认更正
  • 关键词匹配逻辑及自定义方法请参见 references/categories.md

LLM审查步骤: 运行categorize.py后,扫描输出中标记为其他或关键词置信度低的条目。在继续之前,请用户确认或更正这些条目。

第三步:生成报告

bash
python3 scripts/report.py categorized.json [--budget assets/sample-budget.json] [--output report.md]

  • - 生成包含以下内容的Markdown报告:
- 月度摘要(总流入/流出) - 按分类的支出与预算对比 - 消费最高的前10个商户 - 如果数据包含多个月份,显示环比趋势 - 超出预算的分类的预警提示
  • - 如果省略 --budget,报告仅显示实际数据(无预算对比)
  • 输出为兼容Obsidian的Markdown格式,包含前置元数据

预算配置

预算在JSON文件中定义。请参见 assets/sample-budget.json 获取实际示例。

json
{
monthly_budgets: {
Housing: 1800,
Food & Dining: 600
}
}

常见任务

分析我的Chase导出文件
→ parsecsv.py chaseexport.csv --format chase --output tx.json
→ categorize.py tx.json --output cat.json
→ 审查分类,然后 report.py cat.json --budget assets/sample-budget.json

显示我三月份的支出
→ 解析并分类CSV文件,然后在 report.py 中按月筛选(它会自动按月分组)

我在餐饮上超预算了
→ 运行完整流程;report.py 会用 ⚠️ 标记超预算的分类

添加新的银行格式
→ 参见 references/csv-formats.md 了解列映射规范

自定义分类
→ 参见 references/categories.md 编辑关键词列表或添加新分类

文件位置

CSV和JSON输出可存放在用户偏好的任何位置。默认工作目录为命令运行所在的目录。建议将导出文件保存在专用文件夹中,如 ~/finances/exports/。

报告可以直接保存到Obsidian库中:
bash
python3 scripts/report.py categorized.json --output ~/path/to/vault/finance/2024-03-budget.md

标签

skill ai

通过对话安装

以下为平台配置的接入选项,并非逐项实测通过。能否安装取决于客户端支持、技能来源和运行环境:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 local-budget-1775932696 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 local-budget-1775932696 技能

通过命令行安装

skillhub install local-budget-1775932696

下载

⬇ 下载 local-budget v1.0.0(免费)

文件大小: 18.21 KB | 发布时间: 2026-4-12 10:27

v1.0.0 最新 2026-4-12 10:27
Initial release: Fully local bank/credit card CSV analysis. LLM-powered categorization, budget comparison, markdown reports. No third-party APIs, complete privacy.
返回顶部