mem-guard

by Stephan Schreiber · ★ 0 · updated 2 days ago

GuardsAutomationvalidates

0

Bash memory rules: Node commands run in claude-cmd.slice, and runs that would starve the machine are refused

install mem-guard

Install

git clone https://github.com/schreibse/claude-code-mods
claude --plugin-dir ./claude-code-mods/mem-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.call
API calls
$.env.get$.fs.read$.process.run$.session.cwd
Can see
Bash calls
Reach
level 2 of 3 runs processesreads filesreads env vars

Origin

How it got here
Automated scan of public GitHub repos, via the CC0 dataset awesome-claude-code-mods (scan of ).
Repository
github.com/schreibse/claude-code-mods
Path in repo
mem-guard
Source commit
a165487 the exact code the scan read
Author
Stephan Schreiber @schreibse
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 schreibse/claude-code-mods

coderabbit-band

schreibse/claude-code-mods

A band above the prompt with the open CodeRabbit threads and nitpicks of the branch's MR

★ 0BandsGuardsCommands

handover

schreibse/claude-code-mods

The handover sentence for a cold session: a band above the prompt, /handover-copy to copy it, and after /clear the sentence waits in the prompt as a suggestion

★ 0BandsGuardsCommands

mr-banner

schreibse/claude-code-mods

A colored card with a link under each MR/PR created, merged, approved or reviewed

★ 0ReskinsGuards

quiet-bash

schreibse/claude-code-mods

One-line tool rows, tool output hidden, inline PNG thumbnails; /quiet shows everything, /thumb shows a PNG

★ 0ReskinsGuardsCommands

quiet-spinner

schreibse/claude-code-mods

Plain words for the turn spinner and the turn-duration line

★ 0Reskins

redact

schreibse/claude-code-mods

Secrets found by betterleaks reach the model as ‹secret:…› tokens; Write/Edit restore them, other tools refuse them

★ 0Status lineGuardsPrompt

reminder-log

schreibse/claude-code-mods

Tallies the reminders Claude Code injects for the model, per session; drops the token counter and repeated attribution blocks; /reminders prints the last 30 days

★ 0CommandsPromptAutomation

usage-percent

schreibse/claude-code-mods

A row under the prompt: context, 5-hour and weekly usage; in Nx repos also memory, the session's nx serve projects and the branch's pipeline

★ 0ReskinsGuards