DEV Community

Breno Alvim
Breno Alvim

Posted on

Half my Claude Code usage limit went to typing, so I made a free model do it

You hit the Claude Code limit at 3pm. You scroll back through the session and half the tokens went to typing: a rename across 20 files, boilerplate, tests from a spec you had already written. Claude didn't need to think about any of that.

I built legwork for that half. It's a Claude Code skill that hands mechanical, fully specified tasks to a free model running in a jailed worker. Claude keeps the planning and the review.

How a run goes

  1. Claude spots a sub-task that fits in one paragraph, where a mistake is cheap to catch and no secrets are involved. Design, hard bugs and security code stay with Claude.
  2. It writes a self-contained request and calls legwork.py run. The script starts Free Claude Code if it's down. That's a local proxy that puts a free provider (NVIDIA NIM, Groq and others) behind the Claude Code CLI.
  3. The worker runs headless with fcc-claude -p in the narrowest folder that covers the task, and edits the files.
  4. Claude reads git diff, runs the tests, fixes what needs fixing and records a verdict: ok, fixed or redo.
Created greet.py with a greet(name) function that returns 'Hello, <name>!'.

legwork: run c3268ef1 done · groq/qwen/qwen3.8-27b · 2 turns · 7s · 7,843 tokens kept off your Claude limit
Enter fullscreen mode Exit fullscreen mode

My first real run kept 175,341 tokens off my limit in 5.8 minutes of worker time. Claude still had to fix part of the output, and that's the job of the review step.

The jail

I treat the worker as untrusted, so legwork launches it with these locks:

Lock What it blocks
--tools Read,Edit,Write,Glob,Grep shell commands, web access, subagents
--restricted anything outside the run folder, your user settings
--strict-mcp-config every MCP server you have installed
--disable-slash-commands skills and slash commands
jail-settings.json .env*, keys, certificates, .git, .claude, .npmrc, .netrc, files named like token or secret, local databases

The jail limits what the worker can touch. Your request and the files the worker reads still go to the provider you configured, and free tiers may keep them. Skip client code under NDA and anything with personal data.

Why not claude-code-router?

A router swaps the model for the whole session. legwork keeps Claude as the planner and reviewer and sends out only the tasks a weaker model can handle.

Picking a model

Each agent step resends 15k to 30k tokens, so tokens per minute and requests per day decide which free model holds up. You can name profiles in ~/.claude/legwork/config.json:

{ "profiles": { "fast": "groq/qwen/qwen3.8-27b" } }
Enter fullscreen mode Exit fullscreen mode

A fast profile handles one or two files. The default profile handles multi-file work. legwork.py doctor pings every profile and tells you what answers today, and legwork.py stats keeps a scoreboard of runs, tokens and review verdicts.

Try it

Install Free Claude Code, paste a free provider key in its Admin UI (NVIDIA NIM is a good default), then inside Claude Code:

/plugin marketplace add obrenoalvim/legwork
/plugin install legwork@legwork
Enter fullscreen mode Exit fullscreen mode

Ask Claude to "run the legwork doctor". After that it delegates on its own when a task fits, or you ask: "legwork: add docstrings to every function in src/utils".

The script needs only the Python standard library (3.10+) and runs on Windows, macOS and Linux.

Repo: https://github.com/obrenoalvim/legwork (MIT)

Which part of your Claude Code session would you hand to a cheaper model first?

Ps: I'm building BloodLink, a free platform connecting blood donors to donation campaigns.

Top comments (2)

Collapse
 
hon6 profile image
hon6 •

Keeping planning and review with Claude while a cheap worker does the mechanical edits, then reading git diff before accepting, is a sensible way to stretch a limit. Knowing how close you are to the limit also helps: Kiteline (open source, GitHub hon6/kiteline) shows the subscription usage on the phone next to the agent sessions, so you can decide when to hand work off before you hit it at 3pm.

Collapse
 
paul_irolla_6b5ae261d0224 profile image
Paul Irolla •

I'm building Tokenade, and the number that fills a limit is the re-read history: each turn re-reads it, so that usually outweighs the new words typed. Measure the typing before moving it to a free model.