Getting it into your agent
This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.
/plugin marketplace add Esonhugh/ibkr-trade-analyzer/plugin install ibkr-trade-analyzerWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/esonhugh/ibkr-trade-analyzer/china-tax-year-end-plan)<a href="https://agentmods.dev/commands/esonhugh/ibkr-trade-analyzer/china-tax-year-end-plan"><img src="https://agentmods.dev/badge/commands/esonhugh/ibkr-trade-analyzer/china-tax-year-end-plan/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/commands/esonhugh/ibkr-trade-analyzer/china-tax-year-end-plan"><img src="https://agentmods.dev/badge/commands/esonhugh/ibkr-trade-analyzer/china-tax-year-end-plan.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00017 | $0.00953 |
| Opus 5 | $0.00009 | $0.00477 |
| Sonnet 5 | $0.00003 | $0.00191 |
| Haiku 4.5 | $0.00002 | $0.00095 |
Grade A, and why
china-tax-year-end-plan scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 66 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Use the china-tax skill as the primary official-source evidence and tax-planning workflow reference.
Generate a year-end tax planning review for China resident overseas brokerage activity. Focus on documentation, evidence gaps, foreign tax credit readiness, withholding sanity checks, cost-basis quality, and scenario modeling. This is not final tax or investment advice.
Workflow
- Consult
skills/china-tax/references/official-tax-rules-and-implementation-plan.mdfor official-source rules, overseas income management considerations, foreign tax credit constraints, and planning guardrails. - Determine the tax year and planning focus from
$ARGUMENTS; if absent, ask one clarifying question before choosing a tax year. - Confirm or state the user-provided assumption that the review is for a China tax resident individual; do not determine residency independently.
- Recheck official-source freshness for the relevant tax year, or flag the reference date as a limitation.
- Load current IBKR data:
- If the user provided a local file path, call
ibkr_fetch_data(mode="file", source="<path>"). - Otherwise call
ibkr_fetch_data(mode="flex").
- If the user provided a local file path, call
- Call:
ibkr_portfoliofor current holdings, cash, concentration, and currency exposure.ibkr_cost_analysisfor dividends, withholding tax, interest, fees, and tax-evidence readiness.ibkr_pnl_summaryfor realized P&L context.ibkr_analyze(sections=["diluted_cost"])if cost basis or breakeven quality is important.
- Separate observations into:
- Evidence readiness
- Foreign tax credit readiness
- Treaty withholding sanity checks
- Cost-basis / tax-lot review
- Year-end scenario modeling items
- Phrase every planning item as a neutral review point, not a buy/sell or filing directive.
Script Usage
When the user provides local evidence files and shell execution is available, provide this command for the user to run with planning mode in skills/china-tax/scripts/china_tax_self_check.py:
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 12d ago First seen · 66 lines · 17 tokens per session scan A 45c9a17a6482
china-tax-year-end-plan is a command published in the GitHub repository Esonhugh/ibkr-trade-analyzer (18 stars, last pushed 3mo ago), licensed MIT. It adds 17 tokens to every session and 953 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other commands, from other repositories
tax-review
Tax-filing compliance check — invokes tax-reviewer to produce TM-tax-{slug}.md with MeF e-file schema, Form 8879, PTIN/Circular 230, and IRC §7216 consent gaps.
billing-rate
Gestiona tarifas y facturas de servicios legales. Subcomandos: set (definir tarifa), calculate (calcular honorarios), invoice (generar factura), report (análisis), list (listar tarifas).
filings
Scan recent filings on a company and surface material events (director changes, new charges, capital events, insolvency markers). Works on GB / IE / CA / IS / FI / IM / LI / MX / KR.
monitor
AML transaction monitoring and suspicious activity reporting.
tax-planning
Optimize tax liability or ensure tax compliance.
child-support-calc
A calculator for Japanese child support and marital living costs, using the revised standard calculation method published in 2019. Child support is money paid for a child after divorce; marital living costs are shared living expenses while spouses live apart.