finance-automation-portfolio: Skill for Claude Code

.claude/skills/surplus/SKILL.md

surplus is a skill for Claude Code from sophonfinance-wq/finance-automation-portfolio. It costs 62 tokens per session (386 once invoked), scanned A, original, MIT.

A Canadian tax engine for foreign-affiliate surplus pools and adjusted cost base (ACB), the tax basis used to calculate gains or losses. It handles exchange rates by accounting layer, distribution rules, and reconciliation checks.

In plain words
What is it for?
Use it for cross-border tax demonstrations, surplus and ACB calculations, 212-identity checks, foreign-exchange analysis, and human-reviewed repair of drifted workpapers.
Why use it?
It helps identify calculation drift and exchange-rate sign errors, then shows which periods need human review instead of silently accepting a changed result.

Skill for Claude Code

Written for Claude Code: installed under .claude/. Also seen: positional $N argument.

This is sophonfinance-wq/finance-automation-portfolio's own configuration. It tells Claude Code how to work on finance-automation-portfolio itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything finance-automation-portfolio configures →

Reuse

Borrowing it

Nothing to install: this file belongs to sophonfinance-wq/finance-automation-portfolio. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/sophonfinance-wq/finance-automation-portfolio/main/.claude/skills/surplus/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/sophonfinance-wq/finance-automation-portfolio

Made for: Claude Code.

Wrote 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.

agentmods badge for surplus

README.md
[![agentmods](https://agentmods.dev/badge/skills/sophonfinance-wq/finance-automation-portfolio/surplus/github.svg)](https://agentmods.dev/skills/sophonfinance-wq/finance-automation-portfolio/surplus)
Your own site
<a href="https://agentmods.dev/skills/sophonfinance-wq/finance-automation-portfolio/surplus"><img src="https://agentmods.dev/badge/skills/sophonfinance-wq/finance-automation-portfolio/surplus/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.

agentmods 80×15 button for surplus

Your own site · 80×15
<a href="https://agentmods.dev/skills/sophonfinance-wq/finance-automation-portfolio/surplus"><img src="https://agentmods.dev/badge/skills/sophonfinance-wq/finance-automation-portfolio/surplus.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 62 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 386 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00062 $0.00386
Opus 5 $0.00031 $0.00193
Sonnet 5 $0.00012 $0.00077
Haiku 4.5 $0.00006 $0.00039

Measured 11d ago against content hash 38f4c78cebc9, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

surplus 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 11d 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.

.claude/skills/surplus/SKILL.md · 23 lines

What it actually says

Tax Surplus / ACB Engine

Package surplus_engine in tax-surplus-engine/. Seed 20240607. Canadian foreign-affiliate surplus pools, distribution waterfall, ACB on capital events only.

Commands (run from tax-surplus-engine/)

python -m surplus_engine --start 2021 --end 2024 --out out --xlsx
python -m surplus_engine --start 2021 --end 2024 --check    # 212 identity checks; exit 1 on any break
python -m surplus_engine.loop --demo --out out              # HUMAN-GATED LOOP: settle drifted periods earliest-first
python -m pytest -q                                         # 7,498 tests

Showpieces

  • FX sign-flip: out/fx_layer_analysis.md — USD ACB $0 but per-layer CAD ACB $(660.35); find the flag glyph.
  • Loop demo: 3 turns lock FY2021-23, breaks 6->4->2->0, verdict FLAG (CAD 107,088.50 adjustments for human review).

Loop verdicts (surplus_engine/loop.py)

PASS (0) / FLAG (0, material -> human reviews what changed) / FAIL (1). Sensor = reconcile.py (independent re-derivation); authority = SurplusEngine.run on seeded facts. Never invents: settled set is byte-identical to a clean run.

Changes

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.

  1. 11d ago First seen · 23 lines · 62 tokens per session scan A 38f4c78cebc9

Subscribe to this mod's changes

surplus is a skill published in the GitHub repository sophonfinance-wq/finance-automation-portfolio (11 stars, last pushed 15d ago), licensed MIT. It adds 62 tokens to every session and 386 once invoked, about $0.0003 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.