AIToday

A new AI skill called token-saviour cuts codebase-reading costs by ~66% by routing tasks to the right tool instead of reflexively reading whole files.

Hacker News2d ago2 min read
A new AI skill called token-saviour cuts codebase-reading costs by ~66% by routing tasks to the right tool instead of reflexively reading whole files.

Summaries like this, in your inbox every morning.

Sign up free →

3 Key Points

  1. 1

    What happened: A methodology was benchmarked on a ~30-file Python app showing that swapping whole-file reads for semantic retrieval reduced total tokens by ~66%. The approach uses four specialized tools—serena or graphify for code navigation, rtk for command output, and caveman for trimming verbose replies—each handling a different layer of token cost.

  2. 2

    Why it matters: When an AI agent works in a codebase, input dominates the token bill (~88% in the benchmark), and most of that waste comes from over-reading. Routing the right query to the right tool (e.g., graphify for tracing a 4-layer call path at 65 tokens vs. 1,633 for reading files) dramatically reduces cost without losing understanding, freeing tokens for the actual task.

  3. 3

    What to watch: The recommended stack—(serena or graphify) + rtk + caveman—achieved a combined −70% token reduction. The tools are independent: each owns one layer, so they stack additively. The approach trades reflexive reads for semantic queries, making it most valuable for large codebases where reading overhead is highest.

Discussion

No comments yet. Be the first to share your thoughts!

Log in to join the discussion

Related Articles

Stay ahead with AI news

Get curated AI news from 200+ sources delivered daily to your inbox. Free to use.

Get Started Free

Free · takes 30 seconds · unsubscribe anytime

5 minutes a day. The AI essentials.

200+ sources · Email / LINE / Slack

Get it free →