Skip navigation
Claude Code used 3x fewer tokens with one change:
0:00 / 0:51

Claude Code used 3x fewer tokens with one change:

Avi Chawla

@_avichawla77K followers

Visit on X
256 likesDownloadOriginal post

65,041 views

Claude Code used 3x fewer tokens with one change: - Before: 10.4M tokens · 10 errors · $9.21 cost - After: 3.7M tokens · 0 errors · $2.81 cost I used InsForge Skills + CLI as the backend context engineering layer for Claude Code (open-source and local). With Supabase, tables, RLS policies, auth providers, storage buckets, and edge functions were retrieved through separate calls. Each response entered the conversation history, so later calls carried more context. But InsForge returned the backend topology in one metadata call of roughly 500 tokens. InsForge repo: (don't forget to star it 🌟) Its instructions were also split into narrow skills for CLI operations, debugging, SDK usage, and integrations. Claude loaded only the instructions needed for the task. The CLI returned structured JSON with semantic exit codes as well. This made it clear whether a failure came from the operation itself or the code being executed, avoiding several retry loops. The token savings essentially came from replacing repeated backend discovery and debugging calls with one structured view of the backend. I wrote a detailed walkthrough of both builds, including where the extra calls, tokens, and errors came from. Read it below.

17 Comments

Comments from the original post on X (Twitter)

  • deezzex's profile picture

    @deezzex

    so basically you taught claude to ask once instead of 20 times. respect

    4 likes

  • Avi Chawla's profile picture

    @_avichawla

    that's correct

    2 likes

  • Ben Ellsworth's profile picture

    @benellsworth01

    The one metadata call replacing a bunch of separate ones explains most of the token drop. Curious what was actually causing the 10 errors before, guessing it was drift from all that extra context piling up in the history

    1 like

  • Bally_AgenticAI's profile picture

    @bally_kehal

    The 3x drop isn't from a smarter model - it's from replacing 5 chatty discovery calls with 1 structured state dump. Most token bloat is architecture, not reasoning. #ContextEngineering #AgenticAI @LangChain

  • kocer's profile picture

    @kocer_eth

    3x fewer tokens and zero errors is a clean result. most people just keep dumping more context instead of structuring it once

  • Marwan Atef's profile picture

    @Marwan_3atef

    tool schema is product design. raw API passthrough is how you burn context and teach the model to guess.

  • AXIALIS | Desktop App Tools's profile picture

    @AxialisSoftware

    How much of the token reduction survives if you normalize for the error retry loop in the baseline run?

  • rocket0x01 | ETHGas ⛽'s profile picture

    @rocket0x01

    most teams skip evals because it feels like homework then a single prompt edit silently breaks 30% of their flows

  • Gregor's profile picture

    @bygregorr

    10 errors to 0 is the real headline here

  • Viliana's profile picture

    @viliana68036380

    This is usefull content🫡

  • Varik Verilion's profile picture

    @VarikVerilion

    10.4 over 3.7 is 2.8x, not quite 3x. the errors dropping to 0 is honestly the more interesting number here, that's the part that actually saves you debugging time, not just the token count.

  • AI Mastery Guide's profile picture

    @aiseomastery

    Zero errors too, not just cheaper

  • The Bull 🐂's profile picture

    @Thebullmaxi

    Thats called over engineering lmao

  • The AI Therapist's profile picture

    @TheAIShrink

    3.7M tokens for zero errors? that’s not an efficiency hack. it’s the difference between a junior who asks questions and one who actually reads instructions. stop paying for curiosity. charge for answers

  • Corp's profile picture

    @CorppAI

    3x fewer tokens is a serious systems win. — corp

  • Giordano Bruno's profile picture

    @hellenomania

    This would cost around $0.10 cents on DeepSeek. I am genuinely shocked at the cost here. Just built Golang Htmx Alpine Tailwind Front end with Gitea worktrees and Go CMS system synced to Obsidian template tool with AI prompt injection for articles,scheduling etc $3 Wild.

  • How They Make Money's profile picture

    @steve_in_OC

    Love a number with dirt on it—messy progress beats vanity graphs. That "Claude Code used fewer" line stuck.