← 返回 Skills 市场
halleymagic

CRS Tax Calculator

作者 Halley · GitHub ↗ · v3.4.0 · MIT-0
cross-platform ⚠ suspicious
307
总下载
0
收藏
1
当前安装
6
版本数
在 OpenClaw 中安装
/install crs-tax-calculator
功能描述
CRS境外补税计算工具 - 上传券商月结单PDF/Excel,AI自动解析交易数据,FIFO/ACB成本法计算资本利得,生成Excel税务审计底稿。支持多文件年度汇总。
使用说明 (SKILL.md)

CRS 境外补税计算工具

上传券商月结单(PDF/Excel),自动计算中国CRS境外补税或加拿大CRA税务申报所需的资本利得。

前提条件

CRS API Key:在 https://wealthlplantation.com 注册并购买套餐后,在用户中心生成 API Key。

AI 文档解析由服务端完成,用户无需提供任何额外的 AI 密钥。

环境变量设置

运行前必须设置 CRS_API_KEY 环境变量。如果用户未设置,你必须主动引导用户完成以下步骤

步骤 0:检查环境变量

echo "CRS_API_KEY=${CRS_API_KEY:-(未设置)}"

如果显示"未设置",引导用户:

  1. 获取 API Key:如果用户还没有 API Key,告知他们在 https://wealthlplantation.com 注册账户(免费送 20 页体验额度),然后在用户中心生成 API Key
  2. 设置环境变量:让用户在当前终端会话中设置:
export CRS_API_KEY="用户提供的key"

如果用户希望永久生效,可以手动将上述行添加到 ~/.zshrc~/.bashrc

设置完成后验证:echo $CRS_API_KEY,确认已生效再继续。

数据安全

  • 上传的文件仅用于 AI 解析交易数据,处理完成后立即丢弃,不做任何存储
  • 服务端不保存文件内容,仅记录处理日志(文件名、页数、耗时)
  • AI 解析由服务端安全调用,用户无需提供自己的 AI 密钥
  • API 端点 api.wealthlplantation.com 由 wealthlplantation.com 运营,TLS 加密传输

⚠️ 重要:文件处理规则

严禁读取或查看文件内容! 你(AI agent)绝对不能用任何方式读取、查看、cat、head、base64 命令查看 PDF 或 Excel 文件的内容。这些文件是二进制的券商月结单,读取它们会消耗巨量 tokens 导致超限。

正确做法:只收集文件路径,然后调用本 skill 自带的 do_audit.py 脚本,由脚本在内部处理编码和 API 调用。

⚠️ 重要:Token 节约规则

为了最大限度节约 Token 消耗,你必须遵守以下规则:

  1. 不要在对话中内联编写 Python 代码。使用本 skill 自带的 do_audit.py 脚本
  2. 调用脚本时只传文件路径参数,不要在命令中嵌入任何额外代码
  3. 报告结果时只摘要关键数字,不要复述脚本的完整输出

使用方法

步骤 1:收集同一年度的所有月结单文件路径

向用户询问要处理的文件。收集所有文件的完整路径

重要:同一年度的所有月结单必须一起提交,才能保证数据准确。 例如,如果用户有2025年1月到12月的月结单,应该全部一起处理。

步骤 2:定位 do_audit.py 脚本

本 skill 包含一个独立的 Python CLI 脚本 do_audit.py。查找顺序:

# 查找 skill 目录下的 do_audit.py
SCRIPT=$(find ~/.claude/skills/crs-tax-calculator ~/.openclaw/skills/crs-tax-calculator -name "do_audit.py" 2>/dev/null | head -1)
echo "Script: $SCRIPT"

如果找不到脚本,提示用户重新安装此 skill(通过 ClawHub 或 Claude Code 的 /install 命令),脚本包含在 skill 包内。

步骤 3:运行脚本

python3 "$SCRIPT" /path/to/file1.pdf /path/to/file2.pdf --method FIFO --output /path/to/output/dir

参数说明:

  • 文件路径:直接列出所有月结单文件的完整路径
  • --method FIFO:中国税务(默认);--method ACB:加拿大税务
  • --output:指定 Excel 输出目录(默认保存到第一个输入文件所在目录)

一行命令即可,无需编写任何额外代码。

步骤 4:报告结果

脚本执行完后,简要告知用户:

  • 生成了哪些 Excel 文件(文件名和路径)
  • 每个年度的记录数、净损益(CNY)和估算税额
  • 剩余配额
  • 任何审计问题或警告

如果有错误,根据错误码提供建议:

  • UNAUTHORIZED:API Key 无效,需要在 wealthlplantation.com 获取
  • QUOTA_EXCEEDED:配额不足,需要购买更多页数
  • GEMINI_API_ERROR:AI 解析服务暂时不可用,请稍后重试
  • CALCULATION_ERROR:计算错误,可能是文件内容无法识别

支持的文件类型

  • .pdf — PDF 月结单
  • .xlsx — Excel 文件(月结单或历史审计底稿)
  • .csv — CSV 文件
  • .png, .jpg — 图片格式的对账单

支持的券商

盈立证券(uSMART)、长桥证券(Longbridge)、富途证券(Futu/Moomoo)、老虎证券(Tiger)、盈透证券(IBKR)、卓锐证券(Zircon) 等主流券商的月结单。

定价

按页计费,购买后永久有效:

套餐 价格 页数
免费体验 $0 20页
个人版 $9.99 100页
家庭版 $19.99 300页
尊享版 $29.99 500页
企业版 $49.99 1000页

详情和购买:https://wealthlplantation.com/pricing

输出内容

生成的 Excel 审计底稿包含:

  • 交易明细表(买入/卖出/股息/利息/IPO)
  • FIFO 或 ACB 成本匹配明细
  • 汇率换算(PBOC 人民币 / Bank of Canada 加元)
  • 税务摘要(应税收入、资本利得、预扣税抵扣)
  • 审计问题清单
安全使用建议
This skill is internally consistent — it expects a CRS_API_KEY and uses the bundled Python script to upload your statement files to https://api.wealthlplantation.com for server-side parsing. Before installing or running: (1) Confirm you trust wealthlplantation.com and review their privacy/data retention policy because full statements (potentially sensitive financial data) are uploaded. (2) Verify the API key only grants the intended access; keep the key secret and rotate it if exposed. (3) If you need local-only processing, do not use this skill. (4) Test with non-sensitive sample files first. (5) Check TLS (https) and the domain spelling to avoid typosquatting. If anything about the service or its privacy policy is unclear, treat the data as sensitive and avoid uploading real statements.
功能分析
Type: OpenClaw Skill Name: crs-tax-calculator Version: 3.4.0 The skill is designed to calculate taxes by uploading sensitive financial documents (broker statements) to a remote API (api.wealthlplantation.com), which constitutes a high-risk data handling behavior. While the Python script do_audit.py and the SKILL.md instructions are transparent and aligned with the stated purpose, the transmission of PII and financial data to a third-party service is inherently risky. Furthermore, the domain name 'wealthlplantation.com' contains an unusual 'l' character that may indicate a typosquatting attempt or a non-reputable service, fitting the criteria for suspicious behavior due to risky capabilities (network/file access) without explicit proof of malice.
能力评估
Purpose & Capability
Name/description, required binary (python3), and required env var (CRS_API_KEY) match: the tool is a CLI that reads broker statements and sends them to wealthlplantation.com's API for processing. The API endpoint in the code (https://api.wealthlplantation.com/api/process) aligns with the declared homepage.
Instruction Scope
SKILL.md explicitly forbids the AI agent from inlining or printing file contents and instructs the agent to call the bundled do_audit.py. The script, however, reads each file locally, base64-encodes it, and uploads the entire file payload to the external API. This behaviour matches the stated parsing-by-server design but means full file contents are transmitted off-host.
Install Mechanism
No install spec — instruction-only skill with a bundled Python script. No external downloads or installers are executed by the skill itself; risk from install mechanism is low.
Credentials
Only one environment variable (CRS_API_KEY) is required and it is the API credential used in Authorization: Bearer <key> for calls to the stated service. The request for a single service API key is proportionate to the skill's purpose.
Persistence & Privilege
Skill is not always-enabled and does not request elevated persistence. It runs as a user-invoked CLI script and does not modify other skills or system-wide configs.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install crs-tax-calculator
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /crs-tax-calculator 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v3.4.0
v3.4.0: 新增 MYR(马来西亚令吉) 汇率支持,更新2025年正式汇率,新增企业版套餐,修复安全扫描问题
v3.3.0
crs-tax-calculator 3.3.0 adds improved setup guidance for API key usage. - 新增环境变量引导说明:明确要求使用前须设置 CRS_API_KEY,并为用户提供详细的配置及检查步骤。 - 优化用户引导流程:如环境变量未设定,详细指导用户获取、设置和验证 API Key,适配 bash/zsh。 - 其他文档内容保持不变。
v3.2.0
**do_audit.py 脚本集成,CLI 使用方式规范升级** - 新增 do_audit.py 文件,支持通过独立脚本批量处理月结单文件 - 推荐仅通过 do_audit.py 脚本调用 API,大幅节约 token 消耗,避免内联 Python 代码 - SKILL.md 文档全面更新:增加脚本查找说明、参数用法、结果报告新规范 - 代码使用流程更清晰,明确只需传递文件路径参数和关键选项 - 明确禁止读取、查看、内联解析二进制文件内容
v3.1.1
- 服务端 AI 文档解析,无需再提供 Google Gemini API Key,简化前提条件。 - 移除对 GEMINI_API_KEY 环境变量的要求,更新了辅助脚本和API接口说明。 - API 端点更换为 api.wealthlplantation.com。 - 增加数据安全说明:无需上传AI密钥,文件不做任何存储,处理全程 TLS 加密。 - 错误码解释中删去 MISSING_GEMINI_KEY,增加了 AI 服务不可用的指示说明。 - ENV 配置更简洁,仅保留 CRS_API_KEY。
v3.1.0
crs-tax-calculator 3.1.0 — Security & usability improvements - Removed requirement for user-provided Gemini API Key; AI parsing is now handled server-side - API endpoint migrated to custom domain: api.wealthlplantation.com - Added data security statement: files are processed in memory and never stored - Only CRS_API_KEY environment variable required (simplified from 2 keys to 1)
v3.0.0
crs-tax-calculator 3.0.0 features a full rewrite for secure, automated CRS/CRA capital gains tax calculations using broker statements. - Completely rewritten workflow: upload broker PDF/Excel statements and generate Excel audit sheets for Chinese CRS or Canadian CRA capital gains tax. - Strict file handling: never reads file content directly; only file paths are collected and securely processed by a Python helper. - Supports multi-file, multi-year processing with FIFO or ACB cost methods per user selection. - Requires user environment variables for both CRS and Gemini API keys. - Compatible with major brokers (uSMART, Longbridge, Futu/Moomoo, Tiger, IBKR, Excellence, etc.). - Automates Excel audit sheet generation, summarizing results with warnings, tax amount, and quota usage.
元数据
Slug crs-tax-calculator
版本 3.4.0
许可证 MIT-0
累计安装 1
当前安装数 1
历史版本数 6
常见问题

CRS Tax Calculator 是什么?

CRS境外补税计算工具 - 上传券商月结单PDF/Excel,AI自动解析交易数据,FIFO/ACB成本法计算资本利得,生成Excel税务审计底稿。支持多文件年度汇总。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 307 次。

如何安装 CRS Tax Calculator?

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

CRS Tax Calculator 是免费的吗?

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

CRS Tax Calculator 支持哪些平台?

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

谁开发了 CRS Tax Calculator?

由 Halley(@halleymagic)开发并维护,当前版本 v3.4.0。

💬 留言讨论