Building an Open‑Source AI Bookkeeping Skill for Codex/WorkBuddy and Feishu CLI
The author created a set of four AI‑driven bookkeeping Skills that let users record, query, and generate monthly HTML reports with a single natural‑language command in WeChat, Codex, WorkBuddy or TraeWork, storing data locally in SQLite and in Feishu multidimensional tables, and released the whole solution as open source.
Problem
Typical bookkeeping apps require opening the app, tapping a plus button, selecting a category, choosing an account, adding a note, and saving. The multi‑step workflow leads to missed entries, abandoned usage, and eventual uninstallation.
Solution Overview
An AI‑driven bookkeeping system replaces the UI with four AI Skills that can be invoked from a single natural‑language utterance in WeChat, Codex, WorkBuddy or TraeWork. A spoken or typed command such as "今天午饭 46,支付宝" is parsed into date, amount, category, account and the original phrase, then persisted and made queryable.
Architecture
The processing pipeline is:
[Codex/WorkBuddy/TraeWork/Other Agent]
│
说一句话
▼
[4 个 Skills]
│
解析、校验、查询、汇总
▼
[SQLite 本地账本 / 飞书多维表]
│
▼
[HTML 月账单 + 同源 JSON]The chat window handles input and queries, Feishu tables store and display data, and an HTML file provides the end‑of‑month review. An early prototype used only Feishu as storage; a local SQLite layer was added later for reliability.
Skills Package
The four Skills are published as an open‑source package that can be installed with a single command:
npx skills add tjxj/ai-bookkeeping-skills setup-ai-bookkeeping: initializes the local SQLite ledger, checks Feishu connectivity, and can create nine Feishu tables from scratch. record-ai-bookkeeping: adds single or multiple entries; supports modifications, refunds, reimbursements, transfers, foreign‑currency entries, duplicate submissions, undo and recovery. ask-ai-bookkeeping: read‑only skill that answers financial questions by month, category, account or reimbursement status. report-ai-bookkeeping: generates an offline‑viewable HTML monthly statement together with a JSON export.
Natural‑Language Entry Examples
今天和小王吃饭我付了 260,其中 130 公司报销
从招行转 3000 到支付宝
大阪晚饭 4200 日元,汇率 0.049,VisaRefunds and reimbursements are linked back to the original transaction; the total amount cannot exceed the original expense. Errors can be edited, undone, or restored.
Backend Schema
Nine Feishu tables constitute the backend, each serving a specific purpose:
流水 : stores every real‑world cash movement – the single source of truth.
录入收件箱 : keeps the original phrase, source, processing status, failure reason and retry count.
账户 : manages cash, Alipay, WeChat, bank cards, credit cards and other funds.
分类 : unified management of primary/secondary categories, aliases and merchant rules.
预算 : handles total budget, category‑level budget and special budgets such as travel.
项目与行程 : separately tracks travel, renovation, courses, equipment and other events.
周期计划 : manages recurring items like salary, rent, utilities, memberships and insurance.
收入与目标 : records expected income, surplus targets, savings goals and emergency funds.
规则与设置 : stores base currency, timezone, confirmation mode, large‑amount thresholds and version info.
The setup-ai-bookkeeping command can preview the table‑creation plan with --dry-run and apply it with --apply, creating 140 fields and 13 views in a single operation.
Automatic Checks
The project bundles 62 automatic checks. The most stringent checks detect duplicate submissions, enforce reversible undo, and catch bugs where a modified amount fails to trigger downstream recalculations.
Conclusion
The described technical route demonstrates how AI can be integrated into bookkeeping workflows, and the same pattern can be applied to other AI‑driven automations.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Old Zhang's AI Learning
AI practitioner specializing in large-model evaluation and on-premise deployment, agents, AI programming, Vibe Coding, general AI, and broader tech trends, with daily original technical articles.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
