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.
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.
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.
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.
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.