npx claudepluginhub vincentor/claude-code-plugins[monthly|yearly|custom] [--period <YYYY-MM>]# 财务报告生成 生成结构化的个人财务分析报告。 ## 参数 $ARGUMENTS 格式示例: - `monthly` — 本月报告 - `monthly --period 2024-12` — 指定月份 - `yearly` — 本年报告 - `yearly --period 2024` — 指定年份 - `custom --from 2024-01-01 --to 2024-06-30` — 自定义期间 ## 读取配置 ## 执行步骤 1. 解析 $ARGUMENTS 确定报告类型和日期范围 2. 读取 `~/.beancounter/config.yaml` 3. 执行多轮 BQL 查询: **收支总览:** **支出分类:** **资产变动:** **大额支出 Top 10:** 4. 综合数据,撰写结构化报告(Markdown 格式),内容包含: - 收支总览(收入、支出、净结余) - 支出分类分布 - 大额支出明细 - 资产负债概览 - 与上期对比(如有数据) - 财务建议
Share bugs, ideas, or general feedback.
生成结构化的个人财务分析报告。
$ARGUMENTS 格式示例:
monthly — 本月报告monthly --period 2024-12 — 指定月份yearly — 本年报告yearly --period 2024 — 指定年份custom --from 2024-01-01 --to 2024-06-30 — 自定义期间cat ~/.beancounter/config.yaml
~/.beancounter/config.yaml收支总览:
cd ${CLAUDE_PLUGIN_ROOT}/src && uv run bean-query <main_ledger> \
"SELECT root(account, 1) as type, sum(position) as total WHERE account ~ '^(Income|Expenses)' AND date >= <start> AND date <= <end> GROUP BY type"
支出分类:
cd ${CLAUDE_PLUGIN_ROOT}/src && uv run bean-query <main_ledger> \
"SELECT root(account, 3) as category, sum(position) as total, count(*) as txns WHERE account ~ 'Expenses' AND date >= <start> AND date <= <end> GROUP BY category ORDER BY total DESC"
资产变动:
cd ${CLAUDE_PLUGIN_ROOT}/src && uv run bean-query <main_ledger> \
"SELECT account, sum(position) as balance WHERE account ~ '^(Assets|Liabilities)' GROUP BY account ORDER BY balance DESC"
大额支出 Top 10:
cd ${CLAUDE_PLUGIN_ROOT}/src && uv run bean-query <main_ledger> \
"SELECT date, narration, account, position WHERE account ~ 'Expenses' AND date >= <start> AND date <= <end> ORDER BY units(position) DESC LIMIT 10"