Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By sahasrarjnv0.1.0In 1 marketplace
Caps RAM used by Bash-spawned work via a background watchdog (macOS).
Run automatically on Claude Code events. Claude doesn't decide.
1 caution to review before installing
A hook runs when Claude uses the Bash tool
Static checks of hooks, mods, MCP servers and commands. Not a security audit.
1 marketplace, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
A lightweight Claude Code plugin that caps the RAM used by Bash-spawned work, so a
runaway build/test/script can't OOM your Mac. Pure bash + ps + jq — no other
dependencies.
macOS has no cgroups, so there's no preventive hard cap for a process running
directly on the host. claude-ramparts runs a small background watchdog: a
SessionStart hook launches a daemon that polls Claude's process tree every
250 ms and kills any command subtree over the per-command cap, or trims the
tree when the global budget is exceeded. A PostToolUse hook tells Claude
when a command was killed. The daemon never touches the Claude process itself.
Each Claude session gets its own isolated daemon and data directory, keyed by
the hook's session_id. This means multiple concurrent Claude sessions are
independently governed — the second session does not inherit the first session's
daemon, and ending one session does not affect any other. All state (kills.log,
pidfiles, config overrides) lives under a per-session subdirectory.
This is reactive, not preventive: a process can briefly spike before being killed. It reliably prevents sustained overuse — the kind that freezes a machine. Governs Bash-spawned subprocesses only — not Claude's own internal tools.
Requires jq (brew install jq).
Dev / local:
claude --plugin-dir /path/to/claude-ramparts
Via marketplace:
# in Claude Code
/plugin marketplace add /path/to/claude-ramparts
/plugin install claude-ramparts@claude-ramparts-marketplace
Defaults: 4 GB per command, 8 GB total. Override by creating
config.json in the plugin's data dir (${CLAUDE_PLUGIN_DATA}/config.json):
{ "perCommandMB": 2048, "globalBudgetMB": 4096, "action": "kill" }
Fields: perCommandMB, globalBudgetMB, pollIntervalMs, graceMs,
action (kill | warn-only).
bash tests/run.sh # unit tests
RG_RUN_INTEGRATION=1 bash tests/run.sh # + real-process watchdog test
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
npx claudepluginhub sahasrarjn/claude-ramparts --plugin claude-rampartsPlugins from other owners that cover similar ground