Real-time tax liability analysis for active crypto traders with proportional cost basis, gain classification, and tax-aware trading signals
npx skills add https://github.com/agiprolabs/claude-trading-skills --skill tax-liability-tracking
Real-time tax liability analysis purpose-built for active Solana traders. Track proportional cost basis across partial sells, classify realized vs unrealized gains, project quarterly tax obligations, and surface tax-aware signals that feed back into trading decisions.
Active crypto traders generate hundreds of taxable events per year. Without real-time tracking:
This skill keeps a running tax ledger alongside your trading activity so every decision incorporates its tax consequence.
This is the most critical concept. When you sell a portion of a position, the cost basis splits proportionally — it does not shift to zero for the remaining tokens.
Example — The Accumulate / House-Money Play:
Common mistake: Recording the partial sell as "capital recovered, remaining basis = $0." This understates the realized gain on the partial sell and overstates the gain when the remaining tokens are eventually sold. The total tax owed is the same either way, but the timing and classification (short-term vs long-term) can differ significantly.
| Classification | Holding Period | US Federal Rate (2024) |
|---|---|---|
| Short-term capital gain | < 1 year | Ordinary income rate (10-37%) |
| Long-term capital gain | >= 1 year | 0%, 15%, or 20% |
Each tax lot tracks its own acquisition date. Partial sells consume lots in the order specified by your accounting method (FIFO, LIFO, or specific identification).
Solana traders typically think in SOL but US tax obligations are denominated in USD. Every taxable event requires:
The skill tracks SOL/USD rates at each event timestamp to compute USD-denominated gains.
The after-tax P&L view shows both, with unrealized gains marked at current estimated tax rates.
from tax_tracker import TaxTracker, Trade
tracker = TaxTracker(
accounting_method="fifo",
federal_bracket=0.32, # Your marginal federal rate
state_rate=0.05, # Your state income tax rate
long_term_rate=0.15, # Your long-term capital gains rate
)
# Record the accumulate/house-money play
tracker.add_trade(Trade(
timestamp="2025-06-15T10:00:00Z",
side="buy",
token="BONK",
amount=1_000_000,
price_usd=0.00002, # Per-token price in USD
total_usd=20.00,
))
tracker.add_trade(Trade(
timestamp="2025-07-20T14:30:00Z",
side="sell",
token="BONK",
amount=800_000, # Sell 80% to recover capital
price_usd=0.000025,
total_usd=20.00,
))
# Check what happened
summary = tracker.position_summary("BONK")
print(f"Realized gain: ${summary.realized_gain:.2f}")
# Realized gain: $4.00 (sold 800k at $0.000025 = $20, basis = $16, gain = $4)
print(f"Remaining basis: ${summary.remaining_cost_basis:.2f}")
# Remaining basis: $4.00 (200k tokens x $0.00002 = $4)
print(f"Classification: {summary.gain_type}")
# Classification: short-term (held ~35 days)
# Tax-aware signals
signals = tracker.get_signals("BONK", current_price_usd=0.00003)
for signal in signals:
print(f" [{signal.type}] {signal.message}")
# [long_term_countdown] Position crosses long-term threshold in 330 days
# [profit_taking_cost] Taking full profit triggers $2.80 short-term liability
Track hundreds of daily trades, all short-term. Focus on quarterly estimated payment accuracy and cumulative liability.
Partial sell to recover capital, let remaining position ride. Proportional cost basis ensures both legs are tracked correctly.
Track positions approaching the 1-year long-term threshold. Signals alert when selling now vs waiting N days changes the tax classification.
Identify positions with unrealized losses. Harvest losses to offset gains while being mindful of wash sale rules.
Project remaining quarterly liability, identify optimization opportunities before Dec 31.
Track cost basis and gains across dozens of tokens simultaneously, with per-token and aggregate views.
Sells consume the oldest lots first. Default for most traders. Generally results in more long-term gains if you have been accumulating over time.
Sells consume the newest lots first. Can minimize short-term gains if recent purchases were at higher prices.
Choose which lots to sell. Maximum flexibility for tax optimization, but requires careful record-keeping. Must be elected before the trade, not after.
Trade Signal → Tax-Aware Filter → Execute/Defer Decision
│
├─ "Short-term gain: $X liability"
├─ "Long-term in N days — consider waiting"
├─ "Loss harvest opportunity: $X offset"
└─ "Net after-tax profit: $Y"
The tax-aware filter does not block trades — it provides information so the trader can make informed decisions about timing.
references/planned_features.md — Detailed feature list, proportional cost basis math with worked examples, gain classification rules, quarterly estimation methodologyscripts/tax_tracker.py — Demo implementation with proportional cost basis, gain classification, tax-aware signals, and quarterly projection. Run with --demo for an example accumulate/house-money scenario.Tax calculations produced by this skill are for informational tracking purposes only. Cryptocurrency tax law is complex and evolving. All tax figures should be verified by a qualified tax professional before filing. This skill does not constitute tax advice. Consult a CPA or tax attorney for guidance specific to your situation.
Automatically organizes invoices and receipts for tax preparation by reading messy files, extracting key information, renaming them consistently, and sorting them into logical folders. Turns hours of manual bookkeeping into minutes of automated organization.
Expert guidance for systematic backtesting of trading strategies. Use when developing, testing, stress-testing, or validating quantitative trading strategies. Covers "beating ideas to death" methodology, parameter robustness testing, slippage modeling, bias prevention, and interpreting backtest results. Applicable when user asks about backtesting, strategy validation, robustness testing, avoiding overfitting, or systematic trading development.
This skill calculates key financial ratios and metrics from financial statement data for investment analysis
This skill provides an advanced financial modeling suite with DCF analysis, sensitivity testing, Monte Carlo simulations, and scenario planning for investment decisions
This skill retrieves upcoming earnings announcements for US stocks using the Financial Modeling Prep (FMP) API. Use this when the user requests earnings calendar data, wants to know which companies are reporting earnings in the upcoming week, or needs a weekly earnings review. The skill focuses on mid-cap and above companies (over $2B market cap) that have significant market impact, organizing the data by date and timing in a clean markdown table format. Supports multiple environments (CLI, Desktop, Web) with flexible API key management.
Crypto wallet operations via the awal CLI — sign in, check balances, send USDC/ETH/POL/SOL, trade tokens, fund the wallet, and use the x402 payment protocol to discover paid services, pay for API calls, monetize an API, or query onchain data. Use whenever the user mentions signing in, login, authentication, wallet status, balance, address, sending money, paying someone, transferring tokens, ENS names, swapping/trading/converting tokens, funding/topping up/onramp, USDC, ETH, POL, SOL, the x402 bazaar, paid APIs, monetizing an endpoint, or querying onchain data on Base.
Access real-time and historical stock market data, forex rates, cryptocurrency prices, commodities, economic indicators, and 50+ technical indicators via the Alpha Vantage API. Use when fetching stock prices (OHLCV), company fundamentals (income statement, balance sheet, cash flow), earnings, options data, market news/sentiment, insider transactions, GDP, CPI, treasury yields, gold/silver/oil prices, Bitcoin/crypto prices, forex exchange rates, or calculating technical indicators (SMA, EMA, MACD, RSI, Bollinger Bands). Requires a free API key from alphavantage.co.
Braintree Automation: manage payment processing via Stripe-compatible tools for customers, subscriptions, payment methods, and transactions
Take agiprolabs/tax-liability-tracking from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.