← 返回 Skills 市场
patello

Financial Categorizer

作者 Patrik Ekenberg · GitHub ↗ · v1.0.2 · MIT-0
cross-platform ✓ 安全检测通过
48
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install financial-categorizer
功能描述
Process bank transaction CSV exports (Nordea, ICA), auto-categorize transactions using configurable rules, manage transaction links, and generate analytical...
使用说明 (SKILL.md)

financial-categorizer

Process bank transaction CSV exports, auto-categorize transactions using configurable rules, manage transaction links, and generate analytical SQLite database views.

Quick Start

Run the CLI tool from your terminal pointing to your database path:

# 1. Add your personal checking account
python cli.py --db ../data/finance.db add-account "Nordea Checking" --type personal --ownership 1.0

# 2. Add hierarchical categories
python cli.py --db ../data/finance.db add-category "Food"
python cli.py --db ../data/finance.db add-category "Groceries" --parent 1

# 3. Add auto-categorization rules
python cli.py --db ../data/finance.db add-rule 2 "ICA MAXI" --type contains
python cli.py --db ../data/finance.db add-rule 1 "^Hyra" --type regex

# 4. Import transactions from a bank CSV file
python cli.py --db ../data/finance.db import transactions.csv --account "Nordea Checking"

# 5. Run auto-categorization over uncategorized transactions
python cli.py --db ../data/finance.db categorize

# 6. View monthly summary statistics
python cli.py --db ../data/finance.db stats-summary

Data Storage Pattern

User data lives OUTSIDE the skill directory. Recommended structure:

workspace-finance/
├── skills/financial-categorizer/   # Portable skill (shareable)
│   ├── SKILL.md
│   ├── cli.py
│   ├── setup.py
│   └── financial_categorizer/
└── data/                           # Your private data
    ├── finance.db
    └── exports/
        ├── Nordea_Checking.csv
        └── ICA_Shared.csv

The skill provides logic. Your data stays private and portable.

CLI Reference

Command Description
import \x3Cfiles> Import bank CSV transactions
accounts List all registered bank accounts
add-account \x3Cname> Create a new bank account
update-account \x3Cid> Update account ownership ratio, type, name, etc.
delete-account \x3Cid> Delete a bank account
categories List all categories in tree view
add-category \x3Cname> Create a new category
update-category \x3Cid> Update category parents or fields
delete-category \x3Cid> Delete a category
rules List all auto-categorization rules
add-rule \x3Ccat_id> \x3Cpattern> Add a categorization rule (regex, contains, exact)
remove-rule \x3Cid> Remove an auto-categorization rule
preview \x3Cpattern> Preview which transactions match a pattern before adding a rule
categorize [--all] Run auto-categorization rules
uncategorized List all uncategorized transactions
manual-match \x3Ctxn_id> \x3Ccat_id> Manually assign a category override to a transaction
stats-summary Monthly summary of income, expenses, and net
stats-category \x3Cname> Category total with subcategory rollups
stats-trend \x3Cname> Monthly trend for a category
stats-top Top spending categories sorted by total expenses
link \x3Cfrom_id> [to_id] --type Link transactions (e.g. transfers, reimbursements)
unlink \x3Cid> Remove a link
links List all transaction links
recalculate Manually recalculate adjusted amounts for all transactions
db-cleanup [--dry-run] Purge orphaned transaction links and rules (Integrity Cleanup)

Skill Contents

financial-categorizer/
├── SKILL.md                    # This file
├── requirements.txt            # pip dependencies
├── setup.py                    # setuptools configuration
├── cli.py                      # Main entrypoint
└── financial_categorizer/      # Package code
    ├── __init__.py
    ├── categorizer.py          # Auto-categorization & rule engine
    ├── db_handler.py           # Database CRUD & raw schema setup
    ├── importer.py             # CSV Parser (Nordea & ICA formats)
    └── stats.py                # SQL View registers and stats math

SQLite Database Schema & Views

This skill utilizes a dynamic database schema. Analytical SQL views are registered dynamically to provide high performance and low-overhead querying for dashboards (e.g., Grafana):

  1. v_effective_transactions — Joins transactions with accounts to factor in ownership ratios and transfer link adjustments.
  2. v_monthly_summary — Calculates net income/expenses by month.
  3. v_category_monthly — Calculates monthly spending by category.
  4. v_daily_spending — Daily expense aggregation.
  5. v_cumulative_spending_monthly — Running month-to-date daily cumulative spending.
  6. v_daily_spending_moving_average — 30-day moving average of daily spending.
  7. v_category_monthly_averages — Average monthly spending by category.
  8. v_salary_period_summary — Expense/income summary grouped by salary periods (25th to 24th).
  9. v_breakout_categories — Groups monthly spending into high-level categories (Groceries, Loans, Housing, Leisure, Car, etc.).
  10. v_uncategorized_groups — Groups uncategorized transactions by normalized Swish/Card payment descriptions to identify potential new rules.

Dependencies

  • pytest - For testing suite
  • Standard library modules: sqlite3, csv, datetime, logging, re, argparse, os

Install: pip install -e .

安全使用建议
Install only if you are comfortable with a local CLI that can modify your finance database. Keep backups of the SQLite database before running delete, cleanup, auto-link, or bulk recategorization commands, and prefer dry-run options where available.
能力评估
Purpose & Capability
The skill's capabilities match its stated purpose: importing bank CSVs, categorizing transactions, managing accounts/categories/rules/links, and generating SQLite-based finance reports.
Instruction Scope
The documentation clearly lists mutating and deleting CLI commands, but destructive commands such as delete-category, delete-account, remove-rule, unlink, auto-link, and db-cleanup do not consistently document confirmation, backup, or undo expectations.
Install Mechanism
Installation uses a simple setuptools package with a console entry point and no external runtime dependencies beyond the Python standard library.
Credentials
The tool operates on user-specified local CSV files and a local SQLite database; no network calls, credential/session access, broad filesystem indexing, or background workers were found.
Persistence & Privilege
Persistence is limited to the local SQLite database path selected by the user, but several commands can permanently change records or derived financial analysis state.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install financial-categorizer
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /financial-categorizer 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.2
Automated release from git tag 1.0.2
元数据
Slug financial-categorizer
版本 1.0.2
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Financial Categorizer 是什么?

Process bank transaction CSV exports (Nordea, ICA), auto-categorize transactions using configurable rules, manage transaction links, and generate analytical... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 48 次。

如何安装 Financial Categorizer?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install financial-categorizer」即可一键安装,无需额外配置。

Financial Categorizer 是免费的吗?

是的,Financial Categorizer 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Financial Categorizer 支持哪些平台?

Financial Categorizer 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Financial Categorizer?

由 Patrik Ekenberg(@patello)开发并维护,当前版本 v1.0.2。

💬 留言讨论