Agent skill

Crypto Tax Export

by agiprolabs in agiprolabs/claude-trading-skills

Export trade history and tax calculations in formats compatible with Koinly, CoinTracker, CoinLedger, TokenTax, and IRS Form 8949

MITAuto-check passedBusiness, Finance & HR

Install Crypto Tax Export

skills CLI
$ npx skills add agiprolabs/claude-trading-skills --skill crypto-tax-export -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install agiprolabs/claude-trading-skills crypto-tax-export --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/agiprolabs/claude-trading-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/crypto-tax-export .claude/skills/crypto-tax-export && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
crypto-tax-export
GitHub stars
410
Token cost
~2.4k tokens
SKILL.md length
763 words
Files
6 (incl. scripts, references)
Skills in repo
68
Repo updated
First seen
Licence
MIT

At a glance

Export trade history and tax calculations in formats compatible with Koinly, CoinTracker, CoinLedger, TokenTax, and IRS Form 8949

  • Works in 4 steps: Missing trades — on-chain tx not in… → Phantom trades — journal entry with no… → Amount mismatches — journal amount… → …
  • Tasks that involve Crypto and DeFi analysis
  • SKILL.md covers Prerequisites, Capabilities, Supported Export Formats and Solana Transaction…, plus 6 more sections
  • Runs Python scripts from its folder; calls python

What it does

Crypto Tax Export is an agent skill from agiprolabs/claude-trading-skills. Export trade history and tax calculations in formats compatible with Koinly, CoinTracker, CoinLedger, TokenTax, and IRS Form 8949

Its SKILL.md is about 2.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 7 other files, including scripts and reference files (for example `references/planned_features.md` and `scripts/tax_exporter.py`).

It sits in Business, Finance & HR, covering Crypto and DeFi analysis and CSV and tabular files. It works with Solana. The repository describes itself as: 68 trading, DeFi, and quantitative finance Agent Skills. Works with Claude Code, Cursor, Codex, Gemini CLI, and 30+ other tools. The licence is MIT.

When your agent uses it

  • Tasks that involve Crypto and DeFi analysis
  • Tasks that involve CSV and tabular files

Example prompts

  • “/crypto-tax-export”

Requirements

  • Python 3

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Missing trades — on-chain tx not in journal (manual entry missed)
  2. Phantom trades — journal entry with no matching on-chain tx
  3. Amount mismatches — journal amount differs from on-chain amount
  4. Duplicate entries — same tx recorded twice

What it can do on your machine

Read from SKILL.md and the folder at commit 981e1d7. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Crypto Tax Export loads about 2.4k tokens when it runs, and up to ~4.2k if it reads all its reference files. Until then it costs about 37 tokens; SKILL.md has 763 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~37
When it runs · the whole SKILL.md, loaded when a task matches
~2.4k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~4.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from agiprolabs/claude-trading-skills at commit 981e1d7, republished under its MIT licence (© agiprolabs). 763 words, ~2,368 tokens.

Download SKILL.mdSave it as .claude/skills/crypto-tax-export/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.
name
crypto-tax-export
description
Export trade history and tax calculations in formats compatible with Koinly, CoinTracker, CoinLedger, TokenTax, and IRS Form 8949
license
MIT
metadata.author
agipro
metadata.version
0.1.0
metadata.category
trading

Crypto Tax Export

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.

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.

Prerequisites

  • Python 3.10+
  • Trade history data (from internal trade journal, on-chain history, or exchange exports)
  • For on-chain reconciliation: Solana RPC or Helius API access (see helius-api skill)
  • For cost basis: historical price data (see birdeye-api or coingecko-api skills)

Capabilities

CapabilityDescription
Multi-format CSV exportKoinly, CoinTracker, CoinLedger, TokenTax, TurboTax, TaxAct
IRS Form 8949 generationPart I (short-term) and Part II (long-term), columns a through h
Solana tx classificationJupiter swaps, multi-hop routes, LP deposits/withdrawals, staking, airdrops
Cost basis methodsFIFO, LIFO, HIFO, Specific Identification
ReconciliationMatch on-chain history against internal trade journal
Failed tx handlingIdentify and exclude failed transactions (no taxable event)

Supported Export Formats

Koinly CSV

Koinly expects a universal import format with these columns:

Date,Sent Amount,Sent Currency,Received Amount,Received Currency,Fee Amount,Fee Currency,Net Worth Amount,Net Worth Currency,Label,Description,TxHash

Labels: swap, staking, airdrop, liquidity_in, liquidity_out, cost, gift, lost.

CoinTracker CSV
Date,Received Quantity,Received Currency,Sent Quantity,Sent Currency,Fee Amount,Fee Currency,Tag

Tags: trade, staking_reward, airdrop, lp_deposit, lp_withdrawal.

CoinLedger CSV
Date (UTC),Type,Received Currency,Received Amount,Sent Currency,Sent Amount,Fee Currency,Fee Amount,Exchange/Wallet

Types: Trade, Income, Gift Received, Mining, Staking Reward, Airdrop.

TokenTax CSV
Type,BuyAmount,BuyCurrency,SellAmount,SellCurrency,FeeAmount,FeeCurrency,Exchange,Group,Comment,Date

Types: Trade, Income, Staking, Airdrop, Spending.

TurboTax / TaxAct CSV

Both accept a simplified Form 8949 format:

Description of Property,Date Acquired,Date Sold,Proceeds,Cost Basis,Gain or Loss
IRS Form 8949

Part I — Short-term (held one year or less). Part II — Long-term (held more than one year).

Columns:

  • (a) Description of property (e.g., "2.5 SOL")
  • (b) Date acquired (MM/DD/YYYY)
  • (c) Date sold or disposed of (MM/DD/YYYY)
  • (d) Proceeds (sale price in USD)
  • (e) Cost or other basis (purchase price in USD + fees)
  • (f) Code, if any (per IRS instructions)
  • (g) Adjustment amount
  • (h) Gain or loss (d minus e, adjusted by g)

Check box: (A) if basis reported to IRS, (B) if not, (C) if Form 1099-B not received.

Solana Transaction Classification

Jupiter Swaps (Single-Hop)

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.

python
tx = {
    "type": "swap",
    "sent": {"amount": 1.5, "currency": "SOL", "usd_value": 225.00},
    "received": {"amount": 50000, "currency": "BONK", "usd_value": 224.50},
    "fee": {"amount": 0.000005, "currency": "SOL", "usd_value": 0.00075},
    "timestamp": "2025-03-15T14:30:00Z",
    "tx_hash": "5abc...def",
}
Jupiter Swaps (Multi-Hop)

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.

LP Deposits / Withdrawals
  • Deposit: Sending tokens to an LP is generally treated as a disposal at fair market value.
  • Withdrawal: Receiving tokens from an LP is an acquisition at fair market value.
  • LP tokens received/burned may be tracked for cost basis continuity.
Staking Rewards

Staking rewards (SOL validator rewards, liquid staking yield) are income at fair market value when received. Cost basis equals the FMV at receipt.

Show full SKILL.md (306 more words)Show less
Airdrops

Airdrops are income at fair market value when the recipient gains dominion and control. Some jurisdictions differ on when dominion is established.

Token Migrations

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 the old token.

Failed Transactions

Failed Solana transactions (status: failed, or inner instruction errors) are not taxable events. The transaction fee (SOL) may still be deductible as a cost of doing business in some jurisdictions. Always exclude failed txs from trade export.

Cost Basis Methods

python
from enum import Enum

class CostBasisMethod(Enum):
    FIFO = "fifo"      # First In, First Out (IRS default)
    LIFO = "lifo"      # Last In, First Out
    HIFO = "hifo"      # Highest In, First Out (minimizes gains)
    SPEC_ID = "spec_id" # Specific Identification (requires lot tracking)

def compute_gain(
    proceeds: float,
    cost_basis: float,
    adjustments: float = 0.0,
) -> float:
    """Compute gain or loss for Form 8949 column (h)."""
    return proceeds - cost_basis + adjustments

Reconciliation

Reconciling on-chain history with an internal trade journal catches:

  1. Missing trades — on-chain tx not in journal (manual entry missed)
  2. Phantom trades — journal entry with no matching on-chain tx
  3. Amount mismatches — journal amount differs from on-chain amount
  4. Duplicate entries — same tx recorded twice

Reconciliation workflow:

python
def reconcile(
    journal_trades: list[dict],
    onchain_txs: list[dict],
    tolerance: float = 0.001,
) -> dict:
    """Match journal entries to on-chain transactions.

    Args:
        journal_trades: Internal trade records with tx_hash field.
        onchain_txs: Parsed on-chain transactions.
        tolerance: Relative tolerance for amount matching.

    Returns:
        Dict with matched, missing_onchain, missing_journal,
        mismatched lists.
    """
    onchain_by_hash = {tx["tx_hash"]: tx for tx in onchain_txs}
    matched, missing_onchain, missing_journal, mismatched = [], [], [], []

    for trade in journal_trades:
        tx = onchain_by_hash.pop(trade.get("tx_hash", ""), None)
        if tx is None:
            missing_onchain.append(trade)
        elif abs(trade["amount"] - tx["amount"]) / max(tx["amount"], 1e-9) > tolerance:
            mismatched.append({"journal": trade, "onchain": tx})
        else:
            matched.append({"journal": trade, "onchain": tx})

    missing_journal = list(onchain_by_hash.values())

    return {
        "matched": matched,
        "missing_onchain": missing_onchain,
        "missing_journal": missing_journal,
        "mismatched": mismatched,
        "summary": {
            "total_journal": len(journal_trades),
            "total_onchain": len(onchain_txs),
            "matched": len(matched),
            "missing_onchain": len(missing_onchain),
            "missing_journal": len(missing_journal),
            "mismatched": len(mismatched),
        },
    }

Quick Start

python
from scripts.tax_exporter import (
    generate_demo_trades,
    export_koinly_csv,
    export_form_8949_csv,
)

# Generate sample trades
trades = generate_demo_trades()

# Export to Koinly format
export_koinly_csv(trades, "koinly_import.csv")

# Export to Form 8949 format
export_form_8949_csv(trades, "form_8949.csv")

Run the demo directly:

bash
python scripts/tax_exporter.py --demo

Use Cases

End-of-Year Tax Filing

Export all trades from your journal, reconcile with on-chain history, generate Form 8949 line items, and import into TurboTax or hand to your CPA.

Tax-Loss Harvesting Review

Export with HIFO cost basis method to identify positions with unrealized losses that could offset gains before year-end.

Multi-Platform Consolidation

Combine trades from multiple wallets and DEXs into a single Koinly or CoinTracker import file for unified portfolio tax reporting.

Audit Preparation

Use reconciliation to verify completeness of your trade records against on-chain history. Produce a clean Form 8949 with supporting transaction hashes.

Files

FileDescription
references/planned_features.mdExport format specs, Form 8949 mapping, Solana tx classification, reconciliation methodology
scripts/tax_exporter.pyDemo script: generate trades, export to Koinly CSV and Form 8949 CSV, show format differences
  • helius-api — Fetch and parse Solana transaction history for reconciliation
  • birdeye-api / coingecko-api — Historical price data for cost basis lookups
  • solana-onchain — Wallet transaction analysis and classification
  • trade-journal — Internal trade record keeping

© agiprolabs, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 5 other files (scripts, references) in skills/crypto-tax-export of agiprolabs/claude-trading-skills.

  • SKILL.md
  • demo_cointracker_export.csv
  • demo_form_8949.csv
  • demo_koinly_export.csv
  • references/planned_features.md
  • scripts/tax_exporter.py

Open the folder on GitHubat commit 981e1d7

Compare with similar skills

Crypto Tax Export next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Crypto Tax Export compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Crypto Tax Export this skillagiprolabs/claude-trading-skills410—~2.4kAutomated safety check: PassMIT
Swapper Depositswapperfinance/swapper-toolkit852—~1.8kAutomated safety check: PassMIT
Solana Skillnpc-live/clawfirm156—~1kAutomated safety check: PassNone
Metaplexelophanto/EloPhanto106—~1.6kAutomated safety check: PassApache-2.0
Trading Signalbinance/binance-skills-hub1.1k—~682Automated safety check: PassNone
Squadsinternet-court/internet-court-skill6.6k2 repos~5.9kAutomated safety check: PassApache-2.0

Similar skills

  • Swapper Deposit

    swapperfinance/swapper-toolkit

    Deposit and bridge funds into a wallet or protocol using Swapper Finance.

    852 GitHub stars~1.8k tokensUpdated 6 mo ago
    Business, Finance & HRAuto-check passed
  • Solana Skill

    npc-live/clawfirm

    Interact with Solana blockchain via Helius APIs. An agent skill from npc-live/clawfirm.

    156 GitHub stars~1k tokensUpdated 3 mo ago
    Business, Finance & HRAuto-check passed
  • Metaplex

    elophanto/EloPhanto

    Metaplex development on Solana — NFTs, tokens, compressed NFTs, candy machines, token launches.

    106 GitHub stars~1.6k tokensUpdated 9 days ago
    Business, Finance & HRAuto-check passed
  • Trading Signal

    binance/binance-skills-hub

    Per-trade smart-money signals — each result is a discrete buy or sell event from a tracked smart-money wallet, with trigger price, current price, max gain since trigger, and exit rate.

    1.1k GitHub stars~682 tokensUpdated 29 days ago
    Business, Finance & HRAuto-check passed
  • Squads

    internet-court/internet-court-skill

    Complete guide for Squads Protocol - Solana's leading smart account and multisig infrastructure.

    6.6k GitHub starsUsed in 2 repos~5.9k tokens
    Business, Finance & HRAuto-check passed
  • Solana

    Tommy-yw/RunbookHermes

    Query Solana blockchain data with USD pricing — wallet balances, token portfolios with values, transaction details, NFTs, whale detection, and live network stats.

    546 GitHub starsUsed in 1 repo~1.6k tokens
    Business, Finance & HRAuto-check passed

More from agiprolabs/claude-trading-skills

All 68 skills in this repo
  • Backtrader

    agiprolabs/claude-trading-skills

    Event-driven backtesting with bar-by-bar execution, complex order types, multiple analyzers, and custom indicators

    410 GitHub stars~2.4k tokensUpdated 1 mo ago
    Auto-check passed
  • Birdeye API

    agiprolabs/claude-trading-skills

    Solana token market data via Birdeye — prices, OHLCV, trades, token metadata, security checks, and trader activity

    410 GitHub stars~1.8k tokensUpdated 1 mo ago
    Auto-check passed
  • Coingecko API

    agiprolabs/claude-trading-skills

    Broad crypto market data from CoinGecko covering 13,000+ tokens.

    410 GitHub stars~1.6k tokensUpdated 1 mo ago
    Auto-check passed
  • Cointegration Analysis

    agiprolabs/claude-trading-skills

    Cointegration testing for pairs trading using Engle-Granger, Johansen, and rolling stability analysis

    410 GitHub stars~2.1k tokensUpdated 1 mo ago
    Auto-check passed
  • Copy Trading

    agiprolabs/claude-trading-skills

    Wallet evaluation, monitoring, and copy-trade strategy design for Solana DEX trading

    410 GitHub stars~2.4k tokensUpdated 1 mo ago
    Auto-check passed
  • Correlation Analysis

    agiprolabs/claude-trading-skills

    Cross-asset correlation analysis including rolling correlation, hierarchical clustering, tail dependence, and regime-dependent correlation

    410 GitHub stars~2.4k tokensUpdated 1 mo ago
    Auto-check passed

Works with

Questions about Crypto Tax Export

What does Crypto Tax Export do?

Export trade history and tax calculations in formats compatible with Koinly, CoinTracker, CoinLedger, TokenTax, and IRS Form 8949. Crypto Tax Export is an agent skill from agiprolabs/claude-trading-skills.

When should I use Crypto Tax Export?

Crypto Tax Export fits situations like: tasks that involve Crypto and DeFi analysis; tasks that involve CSV and tabular files.

How do I install Crypto Tax Export in Claude Code?

Run `npx skills add agiprolabs/claude-trading-skills --skill crypto-tax-export -a claude-code`. Or copy the skill folder (skills/crypto-tax-export in agiprolabs/claude-trading-skills) into .claude/skills/crypto-tax-export in your project. Claude Code loads it when a task matches its description.

How do I install Crypto Tax Export in Codex?

Run `npx skills add agiprolabs/claude-trading-skills --skill crypto-tax-export -a codex`. Or copy the skill folder (skills/crypto-tax-export in agiprolabs/claude-trading-skills) into .agents/skills/crypto-tax-export in your project. Codex loads it when a task matches its description.

Can I use Crypto Tax Export in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add agiprolabs/claude-trading-skills --skill crypto-tax-export -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/crypto-tax-export, .gemini/skills/crypto-tax-export, .github/skills/crypto-tax-export and .opencode/skills/crypto-tax-export in your project.

What does Crypto Tax Export need to run?

Going by SKILL.md and its folder, Crypto Tax Export needs Python for the scripts in its folder and the command-line tools its instructions call (python). Our summary lists: Python 3.

Does Crypto Tax Export access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Crypto Tax Export safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Crypto Tax Export use?

Crypto Tax Export is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Crypto Tax Export use?

About 2.4k tokens (SKILL.md is roughly 9.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.9k tokens, read only when the agent opens those files.

What are the alternatives to Crypto Tax Export?

Skills that share tags, products or a category with Crypto Tax Export: Swapper Deposit (swapperfinance/swapper-toolkit, 852 stars), Solana Skill (npc-live/clawfirm, 156 stars), Metaplex (elophanto/EloPhanto, 106 stars) and Trading Signal (binance/binance-skills-hub, 1.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Crypto Tax Export?

agiprolabs (a GitHub user) maintains it in agiprolabs/claude-trading-skills, which has 410 GitHub stars. The repository holds 68 skills in this directory. The repository was last updated on September 3, 2026.

Source: agiprolabs/claude-trading-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.