cost-basis-engine

Compute cryptocurrency cost basis using FIFO, LIFO, HIFO, Specific Identification, and Average Cost methods.

266|54|Updated Mar 11, 2026
One-click install
npx skills add https://github.com/agiprolabs/claude-trading-skills --skill cost-basis-engine
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cost-basis-engine
Source: https://github.com/agiprolabs/claude-trading-skills/tree/main/skills/cost-basis-engine
Command: npx skills add https://github.com/agiprolabs/claude-trading-skills --skill cost-basis-engine

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill automates the complex calculation of cost basis for cryptocurrency trades using multiple accounting methods, helping users understand their tax liabilities.

Core Features & Use Cases

  • Multi-Method Calculation: Supports FIFO, LIFO, HIFO, Specific ID, and Average Cost.
  • Handles Complex Events: Accurately accounts for partial sells, airdrops, staking rewards, LP entry/exit, and multi-hop swaps.
  • Use Case: Before tax season, run your entire year's trade history through this Skill to compare the tax implications of each method and choose the most advantageous one for reporting.

Quick Start

Use the cost-basis-engine skill to compare tax implications for selling 120 tokens on 2025-04-01 at a price of $3.00.

Frequently Asked Questions about cost-basis-engine

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I calculate crypto cost basis for tax reporting?

Crypto cost basis is calculated by matching acquisition costs to sales using accounting methods like FIFO, LIFO, HIFO, Average Cost, or Specific Identification to determine realized gains and estimated tax liabilities.

What is the difference between FIFO, LIFO, and HIFO for crypto taxes?

FIFO sells oldest assets first, LIFO sells newest first, and HIFO sells highest-priced assets first, directly impacting realized gains and estimated tax liabilities for your crypto trades.

How do I handle airdrops and staking rewards when calculating cost basis?

Airdrops and staking rewards are treated as complex events with specific cost basis rules, ensuring accurate gain calculations when processing partial sells or multi-hop transactions alongside standard trades.

Can I compare tax liabilities across different accounting methods for my crypto trades?

Yes, comparative analysis evaluates realized gains and estimated tax liabilities across FIFO, LIFO, HIFO, Specific Identification, and Average Cost methods to help you choose the most advantageous reporting approach.

How does cost basis calculation work for multi-hop crypto transactions?

Multi-hop transactions are processed as complex events, accurately tracking token swaps and LP entry/exit to establish precise cost basis and realized gains across the entire transaction chain.