← Back to Skills Marketplace
gmmg55

Cai Gun Gun

by Jiaqi · GitHub ↗ · v1.7.0 · MIT-0
cross-platform ✓ Security Clean
64
Downloads
0
Stars
0
Active Installs
9
Versions
Install in OpenClaw
/install cai-gun-gun
Description
财滚滚(Cai Gun Gun) 💰🐶 个人记账小助手,记录日常开支、收入、查看账单汇总。支持快速记账如"咖啡 30"、"工资 5000",查询余额和消费统计。触发词:记账、我要记账、记一笔、查账单、本周消费、本月支出、导出账单、财务分析、财滚滚。
README (SKILL.md)

finance-tracker (财滚滚) 💰🐶 - 个人财务小助手

可爱的个人记账工具,帮你轻松管理日常收支。

核心能力

1. 快速记账

用户用自然语言描述消费或收入,自动解析并记录:

中午吃饭花了30
咖啡 25
工资到账 8000
买衣服 299

2. 记录管理

  • 删除记录:删掉早上的咖啡账单删除今天的第3条记录
  • 查看记录:今天的账单本周消费本月支出

3. 财务分析

  • 简单查询:本月花了多少最近一周的消费
  • 报告生成:分析一下这周的财务状况生成月度报告

4. 数据管理

  • 导出 Excel:导出账单导出本月的记录
  • 切换账本:切换到旅游账本

5. 分类管理

  • 智能推断:根据备注自动推断分类
  • 自动添加:输入不存在的分类会自动创建
  • 手动管理:添加/列出分类

6. 🆕 用户画像

  • 记录用户偏好设置
  • 默认账户、默认账本
  • 月预算目标
  • 分类偏好记忆

7. 🆕 账本管理

  • 多账本支持(日常/旅游/项目...)
  • 每个账本有独立的ID和Emoji
  • 快速切换当前账本

8. 🆕 账户管理

  • 多账户支持(支付宝/微信/现金/银行卡...)
  • 每个账户有独立的ID和Emoji
  • 设置默认账户

9. 🆕 多用户支持

  • 支持多家庭成员独立记账
  • 各自的账本、账户、偏好设置

工作流程

记账流程

  1. 解析用户输入 — 识别金额、类型、分类、时间、备注、账户
  2. 确认关键信息 — 金额和类型必须明确,其他可推断
  3. 调用脚本存储 — 运行 python scripts/tracker.py add ...
  4. 友好反馈 — 保存成功 + 分类确认(如推断)+ 夸奖用户

自然语言解析规则

用户说 解析为
X元X块X (数字) 金额
买了消费 支出
收入到账收到 收入
借了负债 负债
用支付宝微信支付现金 账户
餐饮关键词(饭、吃...) 分类:餐饮
咖啡 分类:餐饮 > 咖啡
喝茶、茶饮、茶楼 分类:餐饮 > 茶饮
奶茶、果茶 分类:餐饮 > 饮料
早餐、早饭 分类:餐饮 > 早餐
午饭、午餐、中午 分类:餐饮 > 午餐
晚饭、晚餐、晚上 分类:餐饮 > 晚餐
下午茶 分类:餐饮 > 下午茶(仅下午时段使用)
购物关键词(买衣服、淘宝、超市...) 分类:购物
时间词(早上、中午、晚上、昨天...) 时间推断

删除记录

解析用户意图后调用:

python scripts/tracker.py delete --id \x3C记录ID>
python scripts/tracker.py delete --today 3  # 删除今天第3条
python scripts/tracker.py delete --date 2026-04-27 --desc "咖啡"  # 按描述匹配

导出 Excel

python scripts/tracker.py export --month 2026-04
python scripts/tracker.py export --all

生成分析报告

python scripts/tracker.py report --week
python scripts/tracker.py report --month

数据结构

数据存储在 skill 目录的 data/ 子目录下(随 skill 安装,走到哪里带到哪里):

config.json — 配置

{
  "current_ledger": "ledger_001",
  "categories": {
    "expense": {
      "餐饮": ["早餐", "午餐", "晚餐", "夜宵", "聚餐", "外卖", "零食饮料"],
      "交通": ["地铁公交", "打车", "加油", "停车", "共享单车"],
      "购物": ["服饰", "日用品", "数码电器", "美妆护肤"],
      "娱乐": ["电影", "游戏", "KTV", "旅游"],
      "居住": ["房租", "水电", "物业", "宽带"],
      "医疗": ["药品", "挂号", "体检"],
      "教育": ["书籍", "课程", "培训"],
      "其他": []
    },
    "income": {
      "工资": ["基本工资", "奖金", "绩效"],
      "投资": ["股票", "基金", "理财"],
      "副业": ["兼职", "稿费", "接单"],
      "其他": []
    }
  }
}

🆕 profiles.json — 用户画像

{
  "profiles": {
    "user_001": {
      "id": "user_001",
      "name": "默认用户",
      "emoji": "👤",
      "default_account": "account_002",
      "default_ledger": "ledger_001",
      "category_preferences": {
        "午餐": "餐饮>午餐",
        "早餐": "餐饮>早餐"
      },
      "monthly_budget": 5000,
      "created_at": "2026-04-27T17:41:00"
    }
  },
  "current_user": "user_001"
}

🆕 ledgers.json — 账本

{
  "ledgers": {
    "ledger_001": {
      "id": "ledger_001",
      "name": "日常账本",
      "emoji": "📓",
      "owner_id": "user_001",
      "created_at": "2026-04-27T17:41:00"
    }
  },
  "current_ledger": "ledger_001"
}

🆕 accounts.json — 账户

{
  "accounts": {
    "account_001": {
      "id": "account_001",
      "name": "支付宝",
      "emoji": "💰",
      "owner_id": "user_001",
      "balance": 0,
      "created_at": "2026-04-27T17:41:00"
    },
    "account_002": {
      "id": "account_002",
      "name": "微信",
      "emoji": "💳",
      "owner_id": "user_001",
      "balance": 0,
      "created_at": "2026-04-27T17:41:00"
    }
  }
}

transactions.json — 交易记录

[
  {
    "id": "tx_20260427_001",
    "date": "2026-04-27",
    "time": "12:30",
    "type": "expense",
    "category": "餐饮",
    "subcategory": "午餐",
    "amount": 30.0,
    "account": "微信",
    "ledger": "ledger_001",
    "note": "午饭",
    "inferred_category": false,
    "created_at": "2026-04-27T12:30:00"
  }
]

成功反馈模板

基础模板

✅ 记好啦!{类型} {金额}元 — {分类}{备注}

账本:{账本名称} | 账户:{账户名称}

{夸奖语}

💡 **小提示:当前版本暂时无云服务,数据只保存到了本地,记得及时导出保存防止丢失哦!**

🎲 **随机小贴士(每次随机一条)**

> 每次回复时从下面随机选一条(也可以自己发挥),语气轻松活泼:

- "试试直接说「财滚滚」就能叫出来我哦~"
- "可以说「本月支出」查看本月花了多少~"
- "支持多账本!说「新建账本 旅游」试试~"
- "给钱分类贴标签,方便月底分析~"
- "记得定期导出 Excel 备份哦~"
- "语音输入也能记账,试试直接说话~"
- "记账时加个备注,比如「同事聚餐」,月底翻看超有意思~"
- "说「财务报告」可以生成月度图表~"
- "收支一眼看出,理财从记账开始~"
- "有疑问随时问我,财滚滚随时待命~"

⚠️ 【必须显示】数据安全提示是必选项!每次记账成功后都必须显示这条提示,不得省略!

🆕 分类确认提示(当分类为自动推断时)

如果分类是系统自动推断的(inferred_category: true),在反馈中添加确认提示:

🤔 我猜是「{分类}」,对吗?
  ✅ 对的  |  ✏️ 改分类  |  💾 记住午餐默认记这里

用户可以:

  • 说"对的"或"是的" → 确认分类
  • 说"改成XXX分类" → 修改分类
  • 说"记住"或"以后都这样" → 保存分类偏好

显示名称转换

  • defaultledger_001 → 显示为「📋 默认账本」
  • 账本带emoji → 显示为「📓 日常账本」
  • 账户带emoji → 显示为「💳 微信」

夸奖语(AI 动态生成)

不要使用硬编码的夸奖! 让 AI 根据当前时间、上下文自然生成。

生成原则:

  • 根据时间段调整语气和用词
  • 结合具体金额、分类说点有意思的
  • 语气要像朋友聊天,不像机器人
  • 可以加emoji,但不要过量

时间参考:

  • 早上(6-9点):"早啊!这么早就有进账,今天要发财呀~"
  • 上午(9-12点):"上午记账,效率超高!"
  • 中午(12-14点):"午饭钱记好了,吃饱才有力气搞钱~"
  • 下午(14-18点):"下午茶时间来一杯?记得记账哦~"
  • 晚上(18-22点):"晚上好!今天辛苦啦,花了多少钱~"
  • 深夜(22点后):"这么晚还在记账,自律达人!"

金额参考:

  • 小钱(\x3C50):"奶茶钱记上了,今天对自己好一点~"
  • 中等(50-500):"正常开销,精打细算~"
  • 大钱(>500):"大开销要心疼一下,但也值!"

分类参考:

  • 餐饮:可以聊吃的
  • 交通:可以说出行
  • 购物:可以夸眼光
  • 收入:一定要夸!"工资到账!人生赢家~"

示例(对比):

❌ 生硬:"养成记账好习惯,财富自由不是梦~" ✅ 自然:"早上好呀!第一笔咖啡钱记好了,今天也是元气满满的一天~"

❌ 生硬:"又记了一笔,越来越有财商了!" ✅ 自然:"工资到账!8000块稳稳的,这个月可以对自己好一点~"

❌ 生硬:"今天也是精打细算的一天!" ✅ 自然:"月底了还能保持记账习惯,太棒了!看着账单就很有安全感吧~"

注意事项

  1. 金额必须明确 — 如果无法确定金额,询问用户
  2. 默认值
    • 类型默认为支出
    • 分类默认为"其他"
    • 账户默认为用户偏好设置(默认微信)
    • 时间默认为当前时间
  3. 删除确认 — 删除记录前确认用户意图
  4. 数据安全 — 导出时提醒用户备份
  5. 错误处理 — 文件不存在时自动初始化
  6. 🆕 分类确认 — 自动推断分类时提示用户确认
  7. 🆕 偏好记忆 — 用户确认分类后可保存偏好

脚本调用

# 添加记录
python scripts/tracker.py add --type expense --category 餐饮 --amount 30 --note "午饭"

# 指定二级分类
python scripts/tracker.py add --type expense --category 餐饮 --subcategory 午餐 --amount 30 --note "午饭"

# 指定账户
python scripts/tracker.py add --type expense --amount 30 --account 支付宝 --note "午饭"

# 删除记录
python scripts/tracker.py delete --id tx_20260427_001

# 查询记录
python scripts/tracker.py list --today
python scripts/tracker.py list --week
python scripts/tracker.py list --month 2026-04

# 统计汇总
python scripts/tracker.py summary --week
python scripts/tracker.py summary --month

# 导出
python scripts/tracker.py export --month 2026-04 --output ~/Desktop/账单.xlsx

# 报告
python scripts/tracker.py report --week --format html

# 分类管理
python scripts/tracker.py category list
python scripts/tracker.py category add --type expense --category 宠物
python scripts/tracker.py category add --type expense --category 宠物 --subcategory 猫粮

# 🆕 账本管理
python scripts/tracker.py ledger list
python scripts/tracker.py ledger add --name 旅游账本 --emoji ✈️
python scripts/tracker.py ledger switch --id ledger_002

# 🆕 账户管理
python scripts/tracker.py account list
python scripts/tracker.py account add --name 信用卡 --emoji 💳 --balance 1000
python scripts/tracker.py account default --id account_001

# 🆕 用户画像
python scripts/tracker.py profile show
python scripts/tracker.py profile set --default-account account_001 --monthly-budget 5000

依赖

  • Python 3.8+
  • pandas(数据处理)
  • openpyxl(Excel导出)
  • matplotlib(图表生成)
Usage Guidance
This skill appears to be a self-contained, local personal bookkeeping helper that executes the included Python script and stores data in a data/ folder inside the skill. Before installing or running it: 1) review the entire scripts/tracker.py file for any network calls (requests/urllib/socket) or subprocess/os.system usage that would access the network or arbitrary filesystem locations — the portion provided shows only local JSON I/O but the file was partially truncated; 2) back up any important data before using export/import features; 3) because the source and homepage are unknown, prefer running it in a sandboxed environment if you are unsure (or inspect the full script yourself); and 4) if you need stronger assurances, ask the publisher for source hosting or a reproducible build so you can audit the code fully.
Capability Assessment
Purpose & Capability
Name/description (personal finance tracker) match the requested artifacts: an included Python script (scripts/tracker.py) and SKILL.md that instructs the agent to run that script. There are no unrelated env vars, binaries, or external services declared. The feature set (add/delete/query/export/report/multi-user) aligns with a local ledger script.
Instruction Scope
SKILL.md instructs the agent to parse natural-language entries and invoke the local Python script (python scripts/tracker.py ...) to add/delete/export/report. The skill states data is stored locally under the skill's data/ directory. The instructions do not request reading other system config/credentials or transmitting data to external endpoints.
Install Mechanism
There is no install spec (instruction-only plus a bundled script). Nothing is downloaded or written to atypical system locations by an install step. Running the included Python script is the expected mechanism.
Credentials
The skill declares no required env vars, credentials, or config paths. The script (as reviewed) reads/writes JSON files under a local data/ directory. No requests for unrelated secrets or cloud credentials were found in the provided content.
Persistence & Privilege
Flags show always:false and normal autonomous invocation permitted. The skill stores only local files within its own data/ directory. It does not request to modify other skills or system-wide configuration in the reviewed content.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install cai-gun-gun
  3. After installation, invoke the skill by name or use /cai-gun-gun
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.7.0
Version 1.7.0 - Updated skill metadata in SKILL.md: renamed "finance-tracker(cai-gun-gun)" to "finance-tracker(Cai-Gun-Gun)" and slightly adjusted the description for clarity and formatting. - No changes to feature set, code, or functionality.
v1.6.1
- No file changes detected in this version. - No functional or documentation changes introduced.
v1.6.0
# cai-gun-gun 1.6.0 Changelog - 优化了自然语言解析,细化饮品类支出分类(如咖啡、茶饮、奶茶等自动识别为更具体的二级分类)。 - 明确下午茶类仅限下午时段自动归类。 - 丰富了“餐饮”相关关键词的自动分类覆盖,提高记账准确性。
v1.5.0
- 增加了“随机小贴士”模块,每次记账成功后随机显示一条小贴士,提升用户趣味体验。 - 记账成功反馈模板中新增小贴士内容,其它内容保持原有功能与格式。 - 无其它功能或逻辑变动,数据结构与交互方式不变。
v1.4.0
- 移除了全部本地数据文件,包括账户、用户画像、账本、配置、交易记录等数据。 - 本次更新使 skill 不再自带任何用户数据和配置示例,仅保留功能描述与文档。 - 用户需在新环境下初始化数据文件,所有历史记账和偏好记录将不再随 skill 分发。 - 文档内容无变动,核心功能与描述未更新。
v1.3.0
- Major update: Added full local JSON data persistence for accounts, ledgers, user profiles, and transactions. - New data files: accounts.json, ledgers.json, profiles.json, config.json, transactions.json added to the data/ directory. - Now supports multi-user, multi-account, and multi-ledger management natively. - User preferences, monthly budgets, and category habits can be stored and retrieved per user. - Data safety reminder after each record is now mandatory and explicitly documented.
v1.2.0
- Improved the compliment system: removed static compliment examples and added detailed dynamic compliment generation principles based on time, amount, category, and context. - Updated documentation to clarify that compliments should be generated dynamically by the system, not hardcoded. - No changes to coding or features—documentation update only.
v1.1.0
- Skill name updated to `finance-tracker(cai-gun-gun)` and description refined for clarity. - No functional or feature changes; all instructions, examples, and content remain the same. - This release mainly improves naming consistency and user-facing description.
v1.0.0
Initial release of cai-gun-gun 1.0.0: - Personal finance assistant supporting fast natural language bookkeeping. - Features record management, financial analysis, data export, and categorization. - New: Supports multiple users, ledgers, and accounts, each with independent settings and preferences. - New: User profiles, budgeting, and preference memory for personalized bookkeeping. - Built-in commands for adding, deleting, querying records, financial summaries, and exporting data. - Friendly feedback templates with category confirmation, account/ledger emoji support, and encouraging tips.
Metadata
Slug cai-gun-gun
Version 1.7.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 9
Frequently Asked Questions

What is Cai Gun Gun?

财滚滚(Cai Gun Gun) 💰🐶 个人记账小助手,记录日常开支、收入、查看账单汇总。支持快速记账如"咖啡 30"、"工资 5000",查询余额和消费统计。触发词:记账、我要记账、记一笔、查账单、本周消费、本月支出、导出账单、财务分析、财滚滚。 It is an AI Agent Skill for Claude Code / OpenClaw, with 64 downloads so far.

How do I install Cai Gun Gun?

Run "/install cai-gun-gun" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Cai Gun Gun free?

Yes, Cai Gun Gun is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Cai Gun Gun support?

Cai Gun Gun is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Cai Gun Gun?

It is built and maintained by Jiaqi (@gmmg55); the current version is v1.7.0.

💬 Comments