machine-guard

by joeldg · ★ 3 · updated 13 days ago

Status lineGuardsCommandsTools & agentsvalidates

0

Memory, swap, GPU and the CPU cores macOS is using on the status line, and a machine_status tool for Claude; refuses heavy local jobs (training, inference, rendering, Docker) while memory is critical or the Mac is reserved with /busy.

install machine-guard

Install

git clone https://github.com/joeldg/claude-mods
claude --plugin-dir ./claude-mods/machine-guard

Then run /reload-plugins or start a new session. Requires Claude Code 2.1.287+.

View source on GitHub

What it hooks into

From an automated scan with claude plugin validate, not a security review. Mods run with your permissions; read the code before installing.

Events
session.starttool.calltool.checkcommand.run
API calls
$.clock.after$.clock.now$.command.register$.env.get$.fs.read$.fs.write$.process.run$.session.id$.state.get$.state.set$.tool.register$.ui.log$.ui.status$.ui.toast
Can see
Bash callsmcp__machine-guard__machine_status calls
Reach
level 2 of 3 runs processeswrites filesdrives Claudereads filesreads env varsreads mod statedraws

Origin

How it got here
Automated scan of public GitHub repos, via the CC0 dataset awesome-claude-code-mods (scan of ).
Repository
github.com/joeldg/claude-mods
Path in repo
machine-guard
Source commit
2eab818 the exact code the scan read
Author
@joeldg
License
No license declared — ask the author before reusing code.
First published
Last pushed
First listed here

Name and description come from the mod's own manifest. We link to the code; we don't host it, and it stays under its author's license.

More from joeldg/claude-mods

mod-monitor

joeldg/claude-mods

Watches how your other mods really behave: hook failures and slow hooks (read off the chain's own trace), what each one did (toasts, status lines, commands, processes, model calls, writes), with /mods for a live pane and /mods report for the last day, week or month. Changes nothing they do; no model calls.

★ 3PanesBandsStatus line

modal-meter

joeldg/claude-mods

Watches your Modal apps from the CLI, in projects that use Modal: running apps and containers on the status line, a toast when one has been up too long, today's spend where the CLI reports it, and a pane to stop an app (after you confirm). One session polls for all the open ones; a CLI that refuses (no token, a config error) is left alone for an hour, with its own reason shown. No model calls.

★ 3PanesStatus lineGuards

pr-autopilot

joeldg/claude-mods

Watches your open pull requests: CI pass/fail toasts for the PRs you open here, failing-check logs attached when you mention them, a prs_status tool so Claude reads them without gh, and the post-merge ritual (fetch --prune, switch, ff-only pull, delete the branch) done for you with no model calls; in a linked worktree it only fetches and leaves the worktree to you. Tells you once when gh's...

★ 3Status lineGuardsCommands

recall

joeldg/claude-mods

Makes past sessions recallable: indexes Claude Code and Codex transcripts, subagent runs, memory files, standing orders and second-opinion reviews into a local SQLite index (kept after Claude Code deletes old transcripts), gives Claude search, expand, recap and list tools, and adds /recall (search, last session, timeline, decisions, commands, files, PRs, ask), /remember, a...

★ 3PanesBandsStatus line

repo-brief

joeldg/claude-mods

Gathers the repo's state at session start (branch, ahead/behind, uncommitted work, recent commits, open PRs with CI, focus-label issues, stale branches) with no model calls, shows it in a band above the prompt and hands Claude the same summary in its first message.

★ 3BandsCommandsPrompt

routine-watch

joeldg/claude-mods

Tells you when a scheduled routine (a scheduled-task run) stops to wait on you: a Mac notification, an optional phone push and a status line once a permission ask has stood 20 s (configurable; auto mode decides most asks by itself sooner) or when it asks you a question, plus a note when it finishes. Optionally lets routines read the web without asking. No model calls.

★ 3Status lineGuardsCommands

second-opinion

joeldg/claude-mods

/second-opinion asks Fable (or the model you set) for a candid senior review of your recent commits, branch, uncommitted diff or a plan file, in the background without switching the session's model. Each run is one paid model call against your usage; the review opens in a pane, is saved under ~/.claude/second-opinions/, and can be handed to Claude with your next prompt.

★ 3PanesStatus lineCommands

secret-guard

joeldg/claude-mods

Holds back a prompt that looks like it carries a secret (API keys, tokens, access-key pairs, private keys, passwords) before it reaches the transcript, puts it back in the box, and offers to save the secret as an env var in ~/.zshrc and send $NAME instead. No model calls.

★ 3BandsCommandsPrompt

slicer-handoff

joeldg/claude-mods

Hands models to the right slicer: full-spectrum (Snapmaker U1) files Claude tries to open in Bambu Studio go to Snapmaker Orca instead, and previous slicer windows are gently quit first so they don't pile up. /slice opens a file the same way.

★ 3ToastsGuardsCommands

stall-alarm

joeldg/claude-mods

Raises the alarm when a long-running session stalls while you are away: a permission dialog or a question that has waited for you past a threshold (toast, Mac notification, optional phone push, repeated while it stays open), and a turn that stopped on a login, usage-limit or billing error, with the fix. Leaves scheduled routines to routine-watch. No model calls.

★ 3Status lineGuardsCommands

standing-orders

joeldg/claude-mods

Keeps the instructions you give Claude ("never…", "from now on…", "in this project…") as standing orders for the project or the session, offered in a band above the prompt, and hands them back to Claude after every compaction or /clear, with the active /goal. No model calls.

★ 3BandsCommandsPrompt

test-gardener

joeldg/claude-mods

Makes Claude consolidate tests instead of appending them. After it writes or edits a test file, a note names the test files that already cover the module, the near-duplicates and clones among the tests it just added, and a file past the size guideline; a tests_neighbourhood tool answers the same before tests are written; /tests audit lists the consolidations for the project (clones...

★ 3BandsGuardsCommands

Other mods in Status line, close to this one by stars.