AI Tool Labs

Builds about Tokens

What a codebase costs Claude in tokens, and how to send less without losing answers. The counts in these posts come from Claude itself through claude -p, not from OpenAI's tokenizer, which undercounts Claude on code by about a third.

Reading order

  1. How many tokens is my codebase? Claude counts 58% more than GPT: real Claude token counts for a codebase, and how far common estimates are off.
  2. Does Repomix compress mode hurt Claude's answers? 240 runs: packing a repo smaller with Repomix compress, and which answers it costs.
  3. Does .claudeignore work? I tested it on lockfiles in Claude Code: keeping a lockfile out of a live session, and what each way of blocking it breaks.
  1. Does .claudeignore work? I tested it on lockfiles in Claude Code

    120 Claude Code runs: .claudeignore did nothing, a Read deny rule blocked the lockfile but left Claude unable to answer, and npm ls fixed it at half the cost.

    Shipped
  2. Does Repomix compress mode hurt Claude's answers? 240 runs

    Repomix compress mode cut Claude's input 12-61% on three repos. Claude never guessed wrong, but compress drops Python functions and repeats TypeScript docs.

    Shipped
  3. How many tokens is my codebase? Claude counts 58% more than GPT

    I counted real Claude tokens for 33 files from public repos. On code, Claude 4.7 and later use 1.58 tokens per GPT token. A CLI estimates it for your repo.

    Shipped