mem-rescue

mem-rescue is a skill for Claude Code from jontsai/claude-plugins. It costs 143 tokens per session (984 once invoked), scanned A, original, MIT.

A Mac-focused troubleshooting skill for diagnosing and relieving memory pressure, with best-effort Linux support. It reports memory use, large browser processes, possible leaks, recent crashes, and suggested restart actions.

In plain words
What is it for?
Use it when memory is low, swap is full, the machine is lagging, or apps fail or crash. It can produce a human-readable or JSON report and, after confirmation, restart selected apps.
Why use it?
It replaces scattered commands and guesswork when a computer is slow, swapping, or killing apps and browser tabs. It separates a read-only diagnosis from actions that quit and relaunch applications.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the mem-rescue plugin — 1 skill shipped together

Good fit Use it when memory is low, swap is full, the machine is lagging, or apps fail or crash. It can produce a human-readable or JSON report and, after confirmation, restart selected apps.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jontsai/claude-plugins/mem-rescue
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add jontsai/claude-plugins --skill mem-rescue
Clone the repo
git clone --depth 1 https://github.com/jontsai/claude-plugins

Made for: Claude Code.

Or install mem-rescue, the plugin that ships this one along with the rest of its 1 skill.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for mem-rescue

README.md
[![agentmods](https://agentmods.dev/badge/skills/jontsai/claude-plugins/mem-rescue/github.svg)](https://agentmods.dev/skills/jontsai/claude-plugins/mem-rescue)
Your own site
<a href="https://agentmods.dev/skills/jontsai/claude-plugins/mem-rescue"><img src="https://agentmods.dev/badge/skills/jontsai/claude-plugins/mem-rescue/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for mem-rescue

Your own site · 80×15
<a href="https://agentmods.dev/skills/jontsai/claude-plugins/mem-rescue"><img src="https://agentmods.dev/badge/skills/jontsai/claude-plugins/mem-rescue.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 143 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 984 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00143 $0.00984
Opus 5.5 $0.00057 $0.00394
Sonnet 5.5 $0.00029 $0.00197
Haiku 4.5 $0.00014 $0.00098

Measured today against content hash 3cbeef78587d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

mem-rescue scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/memcheck.sh, scripts/rescue.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/mem-rescue/skills/mem-rescue/SKILL.md · 70 lines

How it starts

The opening of the file, as written. The whole thing — 70 lines — stays where its author put it; the contents beside it link to each section on GitHub.

mem-rescue

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.

1. Diagnose (read-only, always safe)

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.

2. Rescue (quits and relaunches apps; confirm first)

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, so Chromium browsers restore their tabs lazily and Slack/Notion reopen where they were. The script never force-kills unless given --force, and it reports swap 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.

Reading the report

  • Verdict CRITICAL means swap is mostly full or free memory is under 20%. New processes (browser tabs, renderers) fail to launch because the compressor and swap have nowhere to put pages. The fix is "shed the biggest app family", not "close a few things".
  • Demand is physical used plus swap used. When demand is far above installed RAM, the workload simply doesn't fit, and restarting the top app is the only quick lever.
  • High CMPRS (or SWAP) relative to TOTAL on a browser means most tabs are idle background tabs that have been compressed or swapped out. A restart recovers nearly all of it because tabs come back as unloaded placeholders. Suggest enabling the browser's Memory Saver (brave://settings/system, chrome://settings/performance) so it discards idle tabs itself.
  • Leak suspects are single processes over 1 GB that have run for 2+ days. Electron renderers (Slack, Notion, Discord) grow unbounded; a relaunch resets them to a few hundred MB.
  • Many swapfiles after days of uptime means the compressor is fragmented. macOS does shrink swap once memory is freed, so a reboot is a "when convenient" item, not an emergency.
  • Crash reports for the browser at the time the user reported tab failures confirm memory starvation rather than a browser bug. On macOS the .ips file's parentProc field shows who launched the crashed process; if it was an automation agent, say so.

Read the full file on GitHub · 70 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today First seen · 70 lines · 143 tokens per session scan A 3cbeef78587d

Subscribe to this mod's changes

mem-rescue is a skill published in the GitHub repository jontsai/claude-plugins (6 stars, last pushed today), licensed MIT. It adds 143 tokens to every session and 984 once invoked, about $0.0006 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-17.

Related

Other skills, from other repositories

visual-explainer

Generate self-contained HTML pages that visually explain technical material — systems, code changes, plans, data. Use when the user asks for any diagram or visual explanation, when they want a slide deck or a longform document (user guide, how-to, reference page), when another skill needs one rendered, or proactively…

NikiforovAll/claude-code-rules · 84 tokens

reflect-solution

Summarize WHAT WAS SHIPPED in a Claude Code session as a self-contained HTML slide deck — the elevator pitch (problem, solution, decisions, artifacts, verification, gaps), not a play-by-play of tool calls or debugging detours. Defaults to the current in-context session; optionally accepts a session ID or JSONL path.…

NikiforovAll/claude-code-rules · 0 tokens

structured-plan-mode

This skill should be used when planning and tracking complex feature implementations that require systematic task decomposition. Use this skill to break down large features into manageable, well-documented tasks with clear dependencies, action items, and success criteria. The skill provides a structured template and…

NikiforovAll/claude-code-rules · 64 tokens

glab

Expert guidance for using the GitLab CLI (glab) to manage GitLab issues, merge requests, CI/CD pipelines, repositories, and other GitLab operations from the command line. Use this skill when the user needs to interact with GitLab resources or perform GitLab workflows.

NikiforovAll/claude-code-rules · 59 tokens

reflect-tree

Visualize a Claude Code session as a quest/skill tree — a navigable SVG graph where nodes are turns and edges show flow, with distinct visual encoding for normal flow, dead-ends, corrections, retries, reversals, and backtracking. Sibling to /reflect (which produces an incidents+recommendations dashboard); this one…

NikiforovAll/claude-code-rules · 0 tokens

update-component-reference

This skill should be used when the user wants to add components (commands, agents, skills, hooks, or MCP servers) to the Component Reference section of the website.

NikiforovAll/claude-code-rules · 38 tokens