After building dozens of custom skills and subagents in Claude Code, two problems kept biting me:

  1. Always-loaded skill definitions were burning 7,300+ tokens before I even typed a prompt.
  2. 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 with restore.
  • 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 a SKILL.md or 5-file subagent from a one-line prompt—or point /tq-forge-learn at 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

Happy to share the scoring rubric or optimizer diff if anyone wants to inspect how the token compression works!