Personal finance

From malue-ai/dazee-small · View interactive version

Personal finance is an AI agent skill from the GitHub repository malue-ai/dazee-small. Track personal income and expenses, generate spending reports, manage budgets. All data stored locally for privacy.

How to use this skill

Skill file

个人记账

帮助用户记录收支、生成消费报告、管理预算。所有数据存储在本地,保护财务隐私。

使用场景

执行方式

通过本地 JSON 文件存储账目数据,LLM 解析自然语言记账指令。

数据存储

账目文件:~/Documents/xiaodazi_finance/records.json

{
  "records": [
    {
      "date": "2026-02-09",
      "type": "expense",
      "amount": 35.00,
      "category": "dining",
      "description": "lunch",
      "currency": "CNY"
    }
  ],
  "budgets": {
    "dining": { "monthly_limit": 3000, "currency": "CNY" }
  }
}

记账

# 读取现有记录
cat ~/Documents/xiaodazi_finance/records.json 2>/dev/null || echo '{"records":[],"budgets":{}}'

# 追加记录(通过 Python)
python3 -c "
import json, os
path = os.path.expanduser('~/Documents/xiaodazi_finance/records.json')
os.makedirs(os.path.dirname(path), exist_ok=True)
try:
    data = json.load(open(path))
except:
    data = {'records': [], 'budgets': {}}
data['records'].append({
    'date': '2026-02-09',
    'type': 'expense',
    'amount': 35.00,
    'category': 'dining',
    'description': 'lunch',
    'currency': 'CNY'
})
json.dump(data, open(path, 'w'), ensure_ascii=False, indent=2)
print('recorded')
"

生成报告

import json
from collections import defaultdict

data = json.load(open("~/Documents/xiaodazi_finance/records.json"))

# 按类别汇总
by_category = defaultdict(float)
for r in data["records"]:
    if r["type"] == "expense":
        by_category[r["category"]] += r["amount"]

for cat, total in sorted(by_category.items(), key=lambda x: -x[1]):
    print(f"{cat}: {total:.2f}")

支出分类

| 类别 | 关键词示例 |

|---|---|

| dining | 午餐、晚饭、外卖、咖啡 |

| transport | 打车、地铁、加油、停车 |

| shopping | 衣服、电子产品、日用品 |

| housing | 房租、水电、物业 |

| entertainment | 电影、游戏、旅游 |

| education | 课程、书籍、培训 |

| health | 医药、体检、健身 |

安全规则

输出规范

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.