CPU & Memory Guard: Claude Code without a slow computer
A skill and plugin for Claude Code. Heavy jobs wait in a queue shared by every session and run at low priority, the automated browser runs without the GPU, and a hook stops more than two from opening at once. So you can keep working while Claude works.
- Works in
- Claude Code
- Systems
- Windows, macOS and Linux (tested on Windows 11)
- Requirements
- Python 3 and Node.js 18 or later. agent-browser only for the browser limits
- Privacy
- No network: only lock files on your machine
- Licence
- MIT, free
- Version
- 1.0.0
Why we built it
- While reviewing this website’s dark mode, Claude Code opened 100 pages in a row in headless Chrome, each with its WebGL animation and videos: the GPU sat at 100 % for minutes.
- With two Claude sessions at once, each starts its own build, tests and browser, and the CPU and memory cannot keep up.
- Browser sessions left open after a task keep holding memory.
- CPU & Memory Guard brings order: one heavy job at a time, at low priority, and only the pages that matter.
How to install it
In Claude Code, as a plugin (skill and hook)
Type this command in Claude Code:
/plugin install cpu-memory-guard --marketplace agenciaRSE/cpu-memory-guardGPU-free browser (if you use agent-browser)
Add this to the env block of ~/.claude/settings.json and start a new Claude Code session:
"AGENT_BROWSER_ARGS": "--disable-gpu,--force-prefers-reduced-motion"In Claude Code, by hand
Copy the skills/cpu-memory-guard folder from the repository into ~/.claude/skills/.
Add the guard.mjs hook to ~/.claude/settings.json, as the README explains.
Use it
You do not need to do anything: Claude loads it when a task is heavy or when you say the computer is slow. You can also use the queue yourself:
python ~/.claude/skills/cpu-memory-guard/scripts/queue.py --name "build" -- npm run buildWhat it does
- Machine-wide queue:
queue.pyruns one heavy job at a time across every Claude Code session. If the queue is busy, the job waits for its turn. - Low priority: the job runs at “below normal” priority on Windows (nice 10 on macOS and Linux) and its child processes inherit it, so your apps come first.
- Lean browser: with
AGENT_BROWSER_ARGS, agent-browser’s Chrome skips the GPU and asks for reduced motion, so pages stop their animations and videos. - Browser cap: the hook stops a third agent-browser session from opening and blocks loops that open many pages outside the queue, with a message saying what to do instead.
- Sample before you sweep: Claude checks one page per template instead of the whole site, reuses one browser session and closes it when done.
- Say it is slow and Claude stops the heavy work at once and carries on through the queue or with fewer pages.
Privacy and security
- Nothing leaves your machine:
queue.pyonly writes small lock files to%LOCALAPPDATA%\claude-queue(or~/.cache/claude-queue). - The hook reads the command Claude is about to run and only acts when it contains
agent-browser. If it cannot read the open sessions, it never blocks. - Python and Node.js standard libraries only, no dependencies. The code is open source: read it before you install it.
Built and maintained by AGENCIA RSE, a WordPress and custom software studio in A Coruña, Spain. We use it in every Claude Code session. See all our Claude skills
Frequently asked questions
Why does Claude Code make my computer slow?
Because it does not wait: it can start a build, a test suite and a headless browser at the same time, and do it again in every open session. With automated browsers opening many pages full of animations or video, the GPU and memory run out fast.
Does it cap Claude Code’s memory usage?
It does not put a memory limit on Claude Code itself. It stops heavy jobs piling up at once, lowers their priority and closes browsers that are no longer needed, which is what usually exhausts the memory.
Do I need agent-browser?
No. The queue and the rules work without it. The hook and the browser settings only act on agent-browser.
What if I need to see an animation or WebGL?
Open a separate session without those settings (with AGENT_BROWSER_ARGS empty), look at what you need and close it.
Does it work on Mac and Linux?
Yes. On macOS and Linux low priority means nice 10. We have tested it on Windows 11.
Is it free?
Yes. It is open source under the MIT licence.
Need a custom Claude skill?
We build Claude skills to order around your team’s processes, templates and scripts, for Claude Code, Claude Desktop and claude.ai.
Your first consultation is free. We look at what you tell us and reply within 48 business hours.