New to Claude Skills? Learn how to install them →

jeremylongshore on GitHub

Calculating Crypto Taxes

Free

Efficiently compute your cryptocurrency tax obligations.

Get this skill

Free · Opens the source repo

What Calculating Crypto Taxes does

Calculating Crypto Taxes is a Python-based tool designed to assist users in determining their cryptocurrency tax obligations by analyzing transaction histories. It supports various cost basis methods, including FIFO, LIFO, and HIFO, allowing users to choose the most advantageous method for their tax situation. The skill identifies taxable events such as trades, staking, and airdrops, and can generate reports compatible with IRS Form 8949, which is essential for accurate tax filing.

To use this skill, users need to export their transaction history from exchanges like Coinbase, Binance, or Kraken in CSV format. Once the data is prepared, the skill provides straightforward command-line instructions to run tax calculations. Users can compare different cost basis methods to understand their tax implications better and generate detailed reports that break down capital gains and losses by transaction. The output includes comprehensive summaries of proceeds, cost basis, and net capital gains, ensuring users have a clear picture of their tax liabilities.

This tool is particularly useful for cryptocurrency traders and investors who need to navigate the complexities of tax reporting in the rapidly evolving crypto landscape. It provides a systematic approach to calculating taxes, making it easier for users to comply with tax regulations while optimizing their tax obligations. However, it is important to note that this tool is for informational purposes only and does not constitute tax advice; users should consult a tax professional for personalized guidance.

In summary, Calculating Crypto Taxes streamlines the process of tracking and reporting cryptocurrency transactions for tax purposes, making it an essential tool for anyone engaged in crypto trading or investment.

When to use it

Use this tool when you need to calculate your crypto taxes, generate tax reports, or compare cost basis methods.

When not to use it

This skill is not suitable for users without a basic understanding of tax regulations or those who require legal tax advice.

What you can build with it

Single Exchange Tax Calculation

Use the tool to calculate taxes for trades from a single exchange using the FIFO method, which is the IRS default.

Comparing Cost Basis Methods

Run the skill to compare different cost basis methods (FIFO, LIFO, HIFO) to determine which minimizes your taxable gains.

Generating IRS Form 8949

Generate a Form 8949 compatible report for your cryptocurrency transactions, ensuring compliance with IRS requirements.

How to install Calculating Crypto Taxes

View source

1. Install with the skills CLI

npx skills add jeremylongshore/claude-code-plugins-plus-skills/calculating-crypto-taxes --agent claude-code

2. Or install it manually

Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.

Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs

Inside SKILL.md

Written by jeremylongshore

Calculating Crypto Taxes

Overview

Calculate cryptocurrency tax obligations from transaction history. Supports FIFO, LIFO, and HIFO cost basis methods, identifies taxable events (trades, staking, airdrops), and generates Form 8949 compatible reports.

DISCLAIMER: This tool provides informational calculations only, not tax advice. Consult a qualified tax professional.

Prerequisites

  • Transaction history exported as CSV from your exchanges (Coinbase, Binance, Kraken, etc.)
  • Python 3.8+ installed
  • Understanding of your tax jurisdiction's crypto rules

Instructions

  1. Prepare transaction data by exporting CSV from each exchange:

    ExchangeExport Location
    CoinbaseReports > Tax documents > Transaction history CSV
    BinanceOrders > Trade History > Export
    KrakenHistory > Export
    GenericSee ${CLAUDE_SKILL_DIR}/references/exchange_formats.md for column mapping
  2. Run basic tax calculation using FIFO (IRS default):

    python ${CLAUDE_SKILL_DIR}/scripts/tax_calculator.py --transactions your_trades.csv --year 2025  # 2025 = tax year
    
  3. Compare cost basis methods to understand tax implications:

    python ${CLAUDE_SKILL_DIR}/scripts/tax_calculator.py --transactions trades.csv --compare-methods
    

    Methods: --method fifo (IRS default), --method lifo (Last In First Out), --method hifo (minimize gains)

  4. Generate Form 8949 report as CSV:

    python ${CLAUDE_SKILL_DIR}/scripts/tax_calculator.py --transactions trades.csv --method fifo --year 2025 --output form_8949.csv --format csv  # 2025 = tax year
    
  5. Handle income events (staking, airdrops, mining, DeFi yield):

    python ${CLAUDE_SKILL_DIR}/scripts/tax_calculator.py --transactions all_events.csv --income-report
    
  6. Consolidate multi-exchange data into a unified report:

    python ${CLAUDE_SKILL_DIR}/scripts/tax_calculator.py --transactions coinbase.csv binance.csv kraken.csv --year 2025  # 2025 = tax year
    

Output

Reports include short-term and long-term capital gains/losses broken down by transaction, with proceeds, cost basis, and gain/loss per disposal. Summary shows total proceeds, total cost basis, net capital gain, and short/long-term split. Income report lists staking, airdrop, and mining income with fair market values.

See ${CLAUDE_SKILL_DIR}/references/implementation.md for detailed output format examples.

Error Handling

ErrorCauseFix
Missing columnsCSV format mismatchVerify format matches exchange template
Unknown transaction typeUnrecognized event categoryReview and manually categorize
Insufficient lotsMissing buy transactionsCheck for missing imports or transfers

Examples

Basic FIFO tax calculation - Standard IRS-default method for a single exchange:

python tax_calculator.py --transactions trades.csv --year 2025  # 2025 = tax year

HIFO to minimize gains - Highest-cost lots disposed first to reduce taxable gain:

python tax_calculator.py --transactions trades.csv --method hifo --year 2025  # 2025 = tax year

JSON output for processing - Machine-readable export for tax software integration:

python tax_calculator.py --transactions trades.csv --format json --output tax_data.json

Verbose with lot details - See which specific lots were matched to each disposal:

python tax_calculator.py --transactions trades.csv --verbose --show-lots

Resources

Frequently asked questions about Calculating Crypto Taxes

Similar skills