← 返回 Skills 市场
chensenym

账本

作者 chensenym · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
46
总下载
0
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install zhangben
功能描述
个人记账与资产管理 MCP 服务(陶朱账本)。通过 moneydata.cn MCP 接口管理收入、支出、资产买入/卖出、负债、交易记录、财富看板等。触发场景:用户提到记账、记收入、记支出、买资产、卖资产、查资产、查负债、查交易、查收支、财富看板、账本等个人财务操作。
使用说明 (SKILL.md)

陶朱账本 (zhangben) MCP 技能

通过 https://moneydata.cn/mcp 的 MCP 接口管理个人财务。

§1 连接与认证

  • 身份标识ID (32位): 根据 MAC 地址 MD5 生成,⚠️ 更换会导致历史数据丢失! 必须保存
  • Token 获取: POST https://moneydata.cn/api/user/token,body: {"code": "\x3Ccode>"}
    • code 构造: 身份标识ID + 10位时间戳 + f5138595b7b93cd08b8c03bbaa825ddb
    • Token 过期后用同一身份标识ID + 新时间戳即可换新 token
  • 配置保存: 生成的身份标识ID和Token必须在配置文件中保存,方便调用MCP服务使用

§2 参数陷阱(必读!)

工具 ❌ 易错写法 ✅ 正确写法
buy_asset code: "600519" price_code: "600519"
buy_asset price: 1268 cost_unit_price: 1268
buy_asset 不传币种 pay_currency: "CNY" (必填!)
sell_asset 不传币种 deposit_currency: "CNY" (必填!)
income/expense 不传币种 currency: "CNY" (必填!)
borrow/repay 不传币种 from_currency/to_currency: "CNY" (必填!)
get_income_expense_category direction: "income" direction: 1 (int)
各工具数字参数 "101" (string) 101 (number)

§3 操作速查

完整参数 schema 见 references/mcp-api.md,平台ID见 references/platform-ids.md,分类代码见 references/category-codes.md

记录收入

income(sub_category=2, amount=1000, platform_id=101, currency="CNY")
  • 工具名是 income,不是 record_income
  • record_date: 可选 YYYY-MM-DD

记录支出

expense(sub_category=44, platform_id=101, amount=2000, currency="CNY", pay_mode="balance", remark="买手机")
  • pay_mode 枚举: balance(余额) | credit(信用卡),其他值报 [30018]
  • 信用消费不扣活期余额,记为信用卡欠款,通过 repay 还款

买入资产

buy_asset(sub_type=1, price_code="600519", quantity=2, cost_unit_price=1268,
          platform_id=1, from_platform_id=101, pay_currency="CNY")
  • platform_id: 存放平台(券商),from_platform_id: 扣款平台(银行),不传则同 platform_id
  • price_code: A股 600519/SH600519 均可,基金 F000051,黄金 UDFGOLD001

卖出资产

sell_asset(sub_type=1, price_code="SH600519", platform_id=1, quantity=1,
           sell_unit_price=1300, deposit_currency="CNY", to_platform_id=101)
  • price_code 最佳实践: 用 get_asset_list 返回的格式(A股 SH600519,港股 HK00700)
  • 返回: remaining_quantity(剩余持有)、realized_profit(盈亏)、deposit_asset_id

借款/还款

borrow(from_sub_type=46, from_platform_id=101, from_currency="CNY",
       to_sub_type=21, to_platform_id=105, to_currency="CNY", quantity=100000)
repay(from_sub_type=21, from_platform_id=101, from_currency="CNY",
      to_sub_type=49, to_platform_id=101, to_currency="CNY", quantity=100)
  • borrow: from_sub_type=46(房贷)/47(车贷)/48(消费贷)/49(信用贷),to_sub_type=仅21(活期)
  • repay: from_sub_type=仅21(活期),to_sub_type=46/47/48/49

查询工具

工具 用途 关键提醒
get_asset_list 资产列表 证券 category=0(非10);看 base(CNY) 非 originalinclude_cleared(bool)含已清仓
get_liability_list 负债列表 remaining_amount,⚠️ base.total_value 可能=0
get_transaction_list 交易记录 biz_type: buy_asset/sell_asset/income/expense/repay/borrow/transfer
get_dashboard_summary 财富看板 总资产/总负债/净资产/月年变化
get_income_summary 收入汇总 传 category 按二级汇总,不传按一级
get_expense_summary 支出汇总 同上
get_platform_list 平台列表 可按 sub_type 过滤
get_income_expense_category 收支分类 direction=1(收入)/2(支出),int 非 string

§4 重要提醒

  • 跨币种买入: 买港股必须传 pay_currency="CNY",系统自动按汇率折算扣款
  • 负债查询: 看 remaining_amount(待还金额)
  • 数量单位: 股票=股,基金=份,黄金=克
  • 错误码速查: 30014(余额不足) 31002(必填缺失) — 完整列表见 references/errorcode.md
安全使用建议
Review carefully before installing. Only use this skill if you trust moneydata.cn with your personal financial records, are comfortable storing its token and stable identity value, and can confirm every write operation before it updates your ledger. The publisher should remove or clearly justify the send_message tool and add explicit confirmation guidance for income, expense, asset, borrowing, and repayment actions.
能力评估
Purpose & Capability
The stated purpose is personal bookkeeping and asset management through moneydata.cn, and most tools fit that purpose. The documented send_message tool is not justified by bookkeeping or asset-management workflows.
Instruction Scope
The skill documents read and write operations for income, expenses, assets, borrowing, repayment, dashboards, and transaction history, but it does not require explicit confirmation or explain correction/rollback before state-changing financial record updates.
Install Mechanism
The artifact is markdown-only skill documentation and reference files; no executable installer, package dependency, or local script is present.
Credentials
Use of an external MCP endpoint and bearer token is expected for this service, but the skill handles sensitive personal finance data and instructs use of a MAC-derived persistent identity.
Persistence & Privilege
The skill says the generated identity ID and token must be saved for future MCP calls. That persistence is disclosed and purpose-related, but users should understand it ties records to a stable local identifier and stored credential.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install zhangben
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /zhangben 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of zhangben skill: - Provides personal accounting and asset management services via the moneydata.cn MCP API. - Supports income, expense, asset buy/sell, liability management, transaction queries, financial dashboard, and summary operations. - Includes detailed parameter guidance and usage examples for all main functions. - Lists common configuration and input pitfalls for accurate API calls. - Consolidates important reminders and best practices for asset and liability management.
v0.1.0
陶朱账本 (zhangben) MCP 技能 1.1.0 版本发布: - 提供通过 moneydata.cn MCP 接口的一站式个人记账与资产管理服务 - 支持收入、支出、资产买入/卖出、负债、交易记录、财富看板等功能 - 详细说明必填参数与易错点,显著提升接入与操作准确性 - 整理各类常用操作示例和查询工具速查表 - 补充重要提醒及常见错误码,方便快速排查问题
元数据
Slug zhangben
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 2
常见问题

账本 是什么?

个人记账与资产管理 MCP 服务(陶朱账本)。通过 moneydata.cn MCP 接口管理收入、支出、资产买入/卖出、负债、交易记录、财富看板等。触发场景:用户提到记账、记收入、记支出、买资产、卖资产、查资产、查负债、查交易、查收支、财富看板、账本等个人财务操作。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 46 次。

如何安装 账本?

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

账本 是免费的吗?

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

账本 支持哪些平台?

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

谁开发了 账本?

由 chensenym(@chensenym)开发并维护,当前版本 v1.0.0。

💬 留言讨论