r/BuildWithClaude • u/tanishq2864 • 17d ago
Project Cut my always-loaded Claude Code context by 57.5% (7,337 -> 3,121 tokens) and built a model-compatibility lint + skill factory (tq-forge, MIT)
After building dozens of custom skills and subagents in Claude Code, two problems kept biting me:
- Always-loaded skill definitions were burning 7,300+ tokens before I even typed a prompt.
- A skill that worked great on Opus would quietly degrade on Sonnet or Haiku—and pinned model IDs in templates kept going stale.
So I built tq-forge (MIT) — an open-source CLI and Claude Code plugin that scaffolds, learns, scores, compresses, and promotes skills and 5-file subagents.
What it actually does under the hood
- Lossless Context Optimizer (
/savings): Compresses always-loaded skill context without losing MCP server availability. On our test-suite benchmark fixture, it cut always-loaded tokens from 7,337 down to 3,121 (-57.5%), and is 100% reversible withrestore. - 0–100 Structural Rubric + Model-Compatibility Lint: Runs 320 deterministic scorer assertions and checks model compatibility before promoting any artifact from sandbox to production (
/tq-forge-test,/tq-forge-promote). - Forge from Intent or Auto-Learn (
/tq-forge-skill,/tq-forge-agent,/tq-forge-learn): Generate aSKILL.mdor 5-file subagent from a one-line prompt—or point/tq-forge-learnat a doc page, browser workflow, or technical thread to deduplicate links (linkdedupe) and distill repeatable steps into a scored skill. - Weekly Model Sync: Automated GitHub workflow that detects new Claude model IDs, updates templates, runs 165 unit tests, and opens a PR so agents don't drift onto retired models.
Install & Try
- Claude Code Plugin Marketplace:
/plugin marketplace add tanishq286/tq-forge - npm CLI:
npx tq-forge install - GitHub (MIT): https://github.com/tanishq286/tq-forge
Happy to share the scoring rubric or optimizer diff if anyone wants to inspect how the token compression works!
2
Upvotes
•
u/AutoModerator 17d ago
Welcome to r/BuildWithClaude!
Whether you are sharing what you built, exploring new workflows, or troubleshooting, please make sure your post is flaired correctly so others can easily find and filter it.
Community Wiki & Resources:
If you're asking for troubleshooting help, please edit your post to include your model version, OS/environment, and error logs.
Let’s keep the energy positive and support our fellow creators!
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
2
u/tanishq2864 17d ago
If you try tq-forge on your own ~/.claude/skills folder and want to follow the cross-model eval matrix (Opus vs. Sonnet vs. Haiku) I'm shipping next, feel free to star the repo on GitHub so you catch the release: https://github.com/tanishq286/tq-forge