# Trader Tax

Tax Optimizer.

- Repository: https://github.com/Jakeschincariol/trader-skill (1074 stars)
- Category: Engineering
- License: MIT
- Last updated: 2026-10-14
- Runs scripts: yes, review before use

## Install

Claude Code: `npx skills add Jakeschincariol/trader-skill --skill trader-tax -g -a claude-code -y`
Codex: `npx skills add Jakeschincariol/trader-skill --skill trader-tax -g -a codex -y`
Cursor: `npx skills add Jakeschincariol/trader-skill --skill trader-tax -g -a cursor -y`
Gemini CLI: `npx skills add Jakeschincariol/trader-skill --skill trader-tax -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add Jakeschincariol/trader-skill`

## Description

Tax Optimizer. Tracks cost-basis lots for every position (FIFO, highest cost first, or specific lots), shows unrealized gains and losses by lot with short or long term, works out what a sale would realize before you sell, finds tax-loss harvesting candidates over a loss threshold, checks the wash sale rule (30 days before and after, GOOG and GOOGL as one family), and writes harvest sells only as proposals. Not tax advice. Use when the user says "what are my gains", "cost basis", "tax lots", "tax-loss harvest", "what would selling cost me in tax", "short or long term", "wash sale", or before selling anything.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# trader-tax

The Tax Optimizer does the arithmetic on the user's lots so nobody sells
blind. It never decides what is right for the user's taxes. **This is not tax
advice**: a tax professional decides what applies to them. Say that once,
early, in every answer that uses this skill.

`${CLAUDE_SKILL_DIR}` below is this skill's folder (where this SKILL.md lives).

```bash
python3 "${CLAUDE_SKILL_DIR}/lots.py" report --lots              # every lot, gain or loss, term
python3 "${CLAUDE_SKILL_DIR}/lots.py" sell KO 2 --price 90.11    # what a sale would realize (FIFO)
python3 "${CLAUDE_SKILL_DIR}/lots.py" sell KO 2 --method specific --lots KO-2
python3 "${CLAUDE_SKILL_DIR}/lots.py" harvest --min-loss 100     # candidates, with wash-sale checks
python3 "${CLAUDE_SKILL_DIR}/lots.py" harvest --min-loss 100 --write
python3 "${CLAUDE_SKILL_DIR}/lots.py" wash KO                    # is buying KO today a wash sale?
```

## What it reads and writes

| file | what |
| --- | --- |
| `trader/portfolio.json` | positions with lots: `{"id", "date", "shares", "cost"}` (cost = total basis); shape: `portfolio.example.json` here |
| `trader/prices.json` | current prices (trader-alerts: `alerts.py quote --holdings --write`) |
| `trader/orders.json` | planned buys count for wash sales; `harvest --write` replaces it with sell proposals |
| `trader/state/tax.json` | the realized sales it logs with `sell --record` |

Lots come from the fills trader-broker records (`ticket.py fill`), or from the
user's broker statement. If a position has shares but no lots, ask for the
purchase dates and costs. Never invent a cost basis.

## The rules it applies (US federal, arithmetic only)

The rest: https://github.com/Jakeschincariol/trader-skill/blob/HEAD/trader-tax/SKILL.md
