/mem-rescue:mem-rescuefrom mem-rescue
Diagnoses and fixes memory pressure on Mac (Linux best-effort) with one read-only script for diagnosis and one for graceful app restarts. Use when the machine is slow, beachballing, swapping, or apps crash.
Ships in mem-rescue. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Two bundled scripts replace the dozen ad-hoc top, ps, and vm_stat calls a memory
diagnosis normally takes. Both live in this skill's scripts/ directory; run them from the
directory this skill was loaded from (the loader tells you where that is). Running them by
path, with no shell pipeline around them, also lets the user allowlist them once in their
agent so they never prompt.
scripts/memcheck.sh # human report
scripts/memcheck.sh --json # same data, machine-readable
Output: a verdict (OK / STRAINED / CRITICAL), the headline numbers, memory by app family, Chromium/Electron process counts, the largest renderer processes, leak suspects, crash reports from the last 24h, and ranked restart actions with estimated recoverable memory.
Run it once, read it, and go straight to the answer. Don't re-derive the numbers with your own
top or ps calls unless the report is missing something specific.
scripts/rescue.sh --dry-run brave slack # shows what would happen
scripts/rescue.sh brave slack # does it
scripts/rescue.sh all # brave slack notion calendar
Quits are graceful. Chromium browsers are relaunched with --restore-last-session, so tabs
come back as unloaded placeholders whatever the browser's "On startup" setting is; Slack and
Notion reopen where they were on their own. The script never force-kills unless given
--force; with it, an app that ignores the quit for 45s gets SIGKILL, and if it somehow
survives that the script says so and does not relaunch it. Swap is reported before and after.
Quitting the user's browser or chat client interrupts their work. Unless the user already told you to restart things ("restart brave", "go ahead and rescue it"), show the ranked actions from the report and ask which ones to run. When they say yes, run rescue once, then run memcheck again and show the before/after.
brave://settings/system, chrome://settings/performance) so it discards idle tabs itself..ips file's parentProc field shows
who launched the crashed process; if it was an automation agent, say so.Lead with the verdict and the one or two numbers that matter (swap used, free %, biggest app). Then the ranked actions as a short list. Keep the full table out of the message unless the user asks; they can run memcheck themselves. After a rescue, show a before/after table with swap, compressor, free %, and the restarted app's footprint.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub jontsai/claude-plugins --plugin mem-rescue