一键导入
export-beancount
Export balanced journals to Beancount ledger SoR (prove job). Use when beancount or export ledger.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Export balanced journals to Beancount ledger SoR (prove job). Use when beancount or export ledger.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Default for throw-work: dump a folder, "do the accounting", "sort my books", year end, prepare financial statements / MPERS pack without naming a stage. One intake then books; resumes from engagement_state.json. Depth-scoped done.
Human pack (HTML board) plus statements when depth needs them. Use when presenting books, opening the pack, or drafting FS/notes from adjusted TB.
Prove the job for this engagement depth (books scorecard or full QC).
Optional router if lost — which slash to use. Prefer saying do the accounting.
Scaffold clients/<slug> folder layout. Use when new client folder or workspace layout. Also the shelf step: organize scattered docs by entity and period before extract (see shared/shelf-first.md).
Firm profile cold-start (not a client dump). Use when set up the firm or first install.
| name | export-beancount |
| description | Export balanced journals to Beancount ledger SoR (prove job). Use when beancount or export ledger. |
Push final (or draft-marked) books into Beancount — the ledger system of record.
workpapers/journals*.json + COA → ledger/main.beancount → Fava
Excel remains human working papers. Beancount is where the ledger lives for agents and git.
Load: references/beancount_integration.md
| Situation | Output |
|---|---|
| QC passed / finalise done | ledger/main.beancount |
| User wants mid-engagement preview | ledger/draft.beancount (label provisional) |
| Unbalanced journals | Refuse until fixed |
workpapers/journals.json exists (and journals_ye.json if YE posted)workpapers/coa.json or entity COA templatepip install beancount recommended for --bean-checkpython3 scripts/export_to_beancount.py \
--client-dir "<client_workspace>" \
--output "<client_workspace>/ledger/main.beancount" \
--bean-check
Or explicit paths:
python3 scripts/export_to_beancount.py \
--journals workpapers/journals.json \
--journals-ye workpapers/journals_ye.json \
--coa references/coa_templates/coa_sdn_bhd.json \
--currency MYR \
--title "LEGAL NAME SDN. BHD." \
--output ledger/main.beancount \
--bean-check
Assets:…, Liabilities:…, Equity:…, Income:…, Expenses:…)open directives*.account_map.json sidecarbean-checkDone when: ledger/main.beancount written from balanced journals; refuse if any JE unbalanced.
ledger/main.beancount (or draft path)ledger/main.beancount.account_map.jsonengagement_state.json: artifact beancount_ledger, stage notevalidate-beancount if check not runopen-fava to show the user| Issue | Action |
|---|---|
| Unbalanced JE | Stop; fix journals |
| bean-check fail | Show stderr; fix mapping/dates |
| Missing beancount install | pip install beancount fava once |