$npx -y skills add agiprolabs/claude-trading-skills --skill crypto-tax-exportExport trade history and tax calculations in formats compatible with Koinly, CoinTracker, CoinLedger, TokenTax, and IRS Form 8949
| 1 | # Crypto Tax Export |
| 2 | |
| 3 | Export trade history and tax calculations for tax software and IRS filing. Handles Solana-specific transaction types (Jupiter swaps, LP operations, staking rewards, airdrops) and generates CSVs compatible with Koinly, CoinTracker, CoinLedger, TokenTax, TurboTax/TaxAct, and IRS Form 8949. |
| 4 | |
| 5 | > **Disclaimer:** This skill provides data formatting and calculation tools only. It does not constitute tax advice. Consult a qualified tax professional for guidance on reporting cryptocurrency transactions. Tax laws vary by jurisdiction and change frequently. |
| 6 | |
| 7 | ## Prerequisites |
| 8 | |
| 9 | - Python 3.10+ |
| 10 | - Trade history data (from internal trade journal, on-chain history, or exchange exports) |
| 11 | - For on-chain reconciliation: Solana RPC or Helius API access (see `helius-api` skill) |
| 12 | - For cost basis: historical price data (see `birdeye-api` or `coingecko-api` skills) |
| 13 | |
| 14 | ## Capabilities |
| 15 | |
| 16 | | Capability | Description | |
| 17 | |---|---| |
| 18 | | Multi-format CSV export | Koinly, CoinTracker, CoinLedger, TokenTax, TurboTax, TaxAct | |
| 19 | | IRS Form 8949 generation | Part I (short-term) and Part II (long-term), columns a through h | |
| 20 | | Solana tx classification | Jupiter swaps, multi-hop routes, LP deposits/withdrawals, staking, airdrops | |
| 21 | | Cost basis methods | FIFO, LIFO, HIFO, Specific Identification | |
| 22 | | Reconciliation | Match on-chain history against internal trade journal | |
| 23 | | Failed tx handling | Identify and exclude failed transactions (no taxable event) | |
| 24 | |
| 25 | ## Supported Export Formats |
| 26 | |
| 27 | ### Koinly CSV |
| 28 | |
| 29 | Koinly expects a universal import format with these columns: |
| 30 | |
| 31 | ``` |
| 32 | Date,Sent Amount,Sent Currency,Received Amount,Received Currency,Fee Amount,Fee Currency,Net Worth Amount,Net Worth Currency,Label,Description,TxHash |
| 33 | ``` |
| 34 | |
| 35 | Labels: `swap`, `staking`, `airdrop`, `liquidity_in`, `liquidity_out`, `cost`, `gift`, `lost`. |
| 36 | |
| 37 | ### CoinTracker CSV |
| 38 | |
| 39 | ``` |
| 40 | Date,Received Quantity,Received Currency,Sent Quantity,Sent Currency,Fee Amount,Fee Currency,Tag |
| 41 | ``` |
| 42 | |
| 43 | Tags: `trade`, `staking_reward`, `airdrop`, `lp_deposit`, `lp_withdrawal`. |
| 44 | |
| 45 | ### CoinLedger CSV |
| 46 | |
| 47 | ``` |
| 48 | Date (UTC),Type,Received Currency,Received Amount,Sent Currency,Sent Amount,Fee Currency,Fee Amount,Exchange/Wallet |
| 49 | ``` |
| 50 | |
| 51 | Types: `Trade`, `Income`, `Gift Received`, `Mining`, `Staking Reward`, `Airdrop`. |
| 52 | |
| 53 | ### TokenTax CSV |
| 54 | |
| 55 | ``` |
| 56 | Type,BuyAmount,BuyCurrency,SellAmount,SellCurrency,FeeAmount,FeeCurrency,Exchange,Group,Comment,Date |
| 57 | ``` |
| 58 | |
| 59 | Types: `Trade`, `Income`, `Staking`, `Airdrop`, `Spending`. |
| 60 | |
| 61 | ### TurboTax / TaxAct CSV |
| 62 | |
| 63 | Both accept a simplified Form 8949 format: |
| 64 | |
| 65 | ``` |
| 66 | Description of Property,Date Acquired,Date Sold,Proceeds,Cost Basis,Gain or Loss |
| 67 | ``` |
| 68 | |
| 69 | ### IRS Form 8949 |
| 70 | |
| 71 | Part I — Short-term (held one year or less). Part II — Long-term (held more than one year). |
| 72 | |
| 73 | Columns: |
| 74 | - **(a)** Description of property (e.g., "2.5 SOL") |
| 75 | - **(b)** Date acquired (MM/DD/YYYY) |
| 76 | - **(c)** Date sold or disposed of (MM/DD/YYYY) |
| 77 | - **(d)** Proceeds (sale price in USD) |
| 78 | - **(e)** Cost or other basis (purchase price in USD + fees) |
| 79 | - **(f)** Code, if any (per IRS instructions) |
| 80 | - **(g)** Adjustment amount |
| 81 | - **(h)** Gain or loss (d minus e, adjusted by g) |
| 82 | |
| 83 | Check box: **(A)** if basis reported to IRS, **(B)** if not, **(C)** if Form 1099-B not received. |
| 84 | |
| 85 | ## Solana Transaction Classification |
| 86 | |
| 87 | ### Jupiter Swaps (Single-Hop) |
| 88 | |
| 89 | A direct token-to-token swap. Classified as a **disposal** of the sent token and **acquisition** of the received token. Each side is a taxable event. |
| 90 | |
| 91 | ```python |
| 92 | tx = { |
| 93 | "type": "swap", |
| 94 | "sent": {"amount": 1.5, "currency": "SOL", "usd_value": 225.00}, |
| 95 | "received": {"amount": 50000, "currency": "BONK", "usd_value": 224.50}, |
| 96 | "fee": {"amount": 0.000005, "currency": "SOL", "usd_value": 0.00075}, |
| 97 | "timestamp": "2025-03-15T14:30:00Z", |
| 98 | "tx_hash": "5abc...def", |
| 99 | } |
| 100 | ``` |
| 101 | |
| 102 | ### Jupiter Swaps (Multi-Hop) |
| 103 | |
| 104 | A routed swap through intermediate tokens (e.g., SOL -> USDC -> BONK). Only the **initial send** and **final receive** matter for tax purposes. Intermediate hops are not separate taxable events. |
| 105 | |
| 106 | ### LP Deposits / Withdrawals |
| 107 | |
| 108 | - **Deposit**: Sending tokens to an LP is generally treated as a disposal at fair market value. |
| 109 | - **Withdrawal**: Receiving tokens from an LP is an acquisition at fair market value. |
| 110 | - LP tokens received/burned may be tracked for cost basis continuity. |
| 111 | |
| 112 | ### Staking Rewards |
| 113 | |
| 114 | Staking rewards (SOL validator rewards, liquid staking yield) are **income** at fair market value when received. Cost basis equals the FMV at receipt. |
| 115 | |
| 116 | ### Airdrops |
| 117 | |
| 118 | Airdrops are **income** at fair market value when the recipient gains dominion and control. Some jurisdictions differ on when dominion is established. |
| 119 | |
| 120 | ### Token Migrations |
| 121 | |
| 122 | A 1:1 token migration (e.g., protocol upgrade) is generally **not** a taxable event. The new token inherits the cost basis and holding period of |