tax-loss-harvesting

tax-loss-harvesting is a skill for Claude Code from JoelLewis/finance_skills. It costs 114 tokens per session (3,921 once invoked), scanned A, original, MIT.

A tax-loss harvesting workflow for finding investments with losses, choosing replacements, planning the tax effect, and monitoring after the sale. Tax-loss harvesting means selling an investment at a loss to help offset taxable gains, while following wash-sale rules.

In plain words
What is it for?
Use it to identify candidates, build a gain-and-loss budget, select replacement securities, plan execution, and check wash-sale compliance.
Why use it?
It organizes the decisions and compliance checks needed before selling a losing position. It also helps avoid treating every loss as worthwhile without considering size, holding period, taxes, and replacement choices.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: positional $N argument.

Part of the wealth-management plugin — 38 skills shipped together

Good fit Use it to identify candidates, build a gain-and-loss budget, select replacement securities, plan execution, and check wash-sale compliance.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/joellewis/finance_skills/tax-loss-harvesting
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add JoelLewis/finance_skills --skill tax-loss-harvesting
Clone the repo
git clone --depth 1 https://github.com/JoelLewis/finance_skills

Made for: Claude Code.

Or install wealth-management, the plugin that ships this one along with the rest of its 38 skills.

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 tax-loss-harvesting

README.md
[![agentmods](https://agentmods.dev/badge/skills/joellewis/finance_skills/tax-loss-harvesting/github.svg)](https://agentmods.dev/skills/joellewis/finance_skills/tax-loss-harvesting)
Your own site
<a href="https://agentmods.dev/skills/joellewis/finance_skills/tax-loss-harvesting"><img src="https://agentmods.dev/badge/skills/joellewis/finance_skills/tax-loss-harvesting/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 tax-loss-harvesting

Your own site · 80×15
<a href="https://agentmods.dev/skills/joellewis/finance_skills/tax-loss-harvesting"><img src="https://agentmods.dev/badge/skills/joellewis/finance_skills/tax-loss-harvesting.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 114 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,921 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. Third-party audits
  • Socket pass 15 Sept 2026
  • Snyk pass 15 Sept 2026
How audits are shown
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.00114 $0.03921
Opus 5.5 $0.00046 $0.01568
Sonnet 5.5 $0.00023 $0.00784
Haiku 4.5 $0.00011 $0.00392

Measured 3d ago against content hash 921e762d6800, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

tax-loss-harvesting 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 3d 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.

plugins/wealth-management/skills/tax-loss-harvesting/SKILL.md · 165 lines

How it starts

The opening of the file, as written. The whole thing — 165 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Tax-Loss Harvesting

Core Concepts

Candidate Identification

Scan the portfolio for positions with unrealized losses that meet all three filters:

  • Materiality threshold: Minimum absolute loss (e.g., $2,000) or minimum loss-to-value ratio (e.g., loss exceeds 5% of position market value). Harvesting a $200 loss on a $50,000 portfolio is not worth the operational cost.
  • Holding period filter: Positions held less than 31 days may not have meaningful losses and create short-term wash-sale complexity. Positions approaching the one-year mark (days 335-365) may benefit from waiting to convert a short-term loss into a long-term loss only if the position is expected to continue declining.
  • Loss magnitude ranking: Rank candidates by Tax Benefit = Unrealized Loss * Applicable Tax Rate. Prioritize short-term losses (taxed at ordinary rates up to 37%) over long-term losses (taxed at capital gains rates of 15-20%) when gain/loss budget allows.

Gain/Loss Budgeting

Before harvesting, build the year-to-date tax budget:

  1. Realized gains YTD: Sum all short-term and long-term capital gains already realized (including fund distributions).
  2. Planned gain exposure: Estimate gains from pending rebalancing trades, planned liquidations, or expected fund capital gain distributions.
  3. Loss carryforward balance: Check prior-year unused capital loss carryforwards (these offset gains before new harvests do).
  4. Target harvest amount: Target Harvest = (Realized Gains YTD + Planned Gains) - Loss Carryforward + $3,000 ordinary income offset. Harvesting this amount offsets all expected gains AND captures the full $3,000 annual deduction against ordinary income; harvest more to build carryforward for future years.

Replacement Security Selection

The replacement must maintain market exposure without being "substantially identical":

  • ETF-to-ETF swaps: Switch between funds tracking different indices (e.g., Vanguard Total Stock Market to Schwab Broad Market, or S&P 500 to Russell 1000). Different index methodology is generally sufficient.
  • Individual stock replacement: Replace a single stock with a sector ETF or a peer company. Example: sell Apple, buy Technology Select Sector SPDR (XLK).
  • Tracking error budget: The replacement should have a correlation of 0.95+ and tracking error under 2% annualized relative to the original holding. Wider tracking error is acceptable for larger tax benefits.
  • Expense ratio delta: Ensure the replacement does not have meaningfully higher expenses. A 10 bps cost increase on a $100K position held for 30 days costs roughly $8 — negligible against a $2,000+ tax benefit.

Read the full file on GitHub · 165 lines

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. 3d ago First seen · 165 lines · 114 tokens per session scan A 921e762d6800

Subscribe to this mod's changes

tax-loss-harvesting is a skill published in the GitHub repository JoelLewis/finance_skills (272 stars, last pushed 3d ago), licensed MIT. It adds 114 tokens to every session and 3,921 once invoked, about $0.0005 per session on Opus 5.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-11-27.

Related

tax-loss-harvesting compared with skills from other repositories

tax-loss-harvesting next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
tax-loss-harvestingJoelLewis/finance_skillsSkill2723d agoMITA114Claude Code
fiscalisteromainsimon/paperasseSkill2.6k18d agoMITA306Claude Code
controleur-fiscalromainsimon/paperasseSkill2.6k18d agoMITA136Claude Code
commissaire-aux-comptesromainsimon/paperasseSkill2.6k18d agoMITA123Claude Code
kyc-escalationmohitagw15856/pm-claude-skillsSkill1.6kyesterdayMITA93Claude Code
sox-itgcSushegaad/Claude-Skills-Governance-Risk-and-ComplianceSkill1.1k14d agoMITA202Claude Code
bankruptcy-monitor-qccThomasMoreAI/legal-skills-openSkill1441mo agoApache-2.0A496Claude Code, Codex