It Ram Doctor logo

It Ram Doctor

Community
serejaris
it-ram-doctor

Process tails that hold memory for nothing: finds them and, on the owner's word, kills them. Use on "slow", "swap", "low memory", "kill the tails", "clean up memory", "ram doctor", and after closing heavy apps.

Overview

Publisherserejaris
Repositorypersonal-corp-os
Skill nameit-ram-doctor
Stars
232
Forks
26
Bundled files
3
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 3 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by serejaris on GitHub. Read the source before you install it.

Installation

Install the It Ram Doctor AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/serejaris/personal-corp-os/tree/main/skills/it-ram-doctor
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/serejaris/personal-corp-os.git /tmp/personal-corp-os
mkdir -p .claude/skills
cp -r /tmp/personal-corp-os/skills/it-ram-doctor .claude/skills/it-ram-doctor
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable It Ram Doctor in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads It Ram Doctor on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so It Ram Doctor is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

it-ram-doctor

The snapshot only reads; step 4 kills, and only on the owner's word.

When memory is short

"13 of 16 GB used" and the swap size do not show load: macOS keeps memory busy with cache and compression, and swap does not shrink until a reboot. Memory is short when any of these holds:

  • pressure: sysctl kern.memorystatus_vm_pressure_level is 4 or stays at 2 for long (threshold: on Apple silicon 2 appears under ordinary compression); memory_pressure | tail -1 shows less than 25–30% free;
  • Swapouts in vm_stat grow between two readings a minute apart;
  • swap grows three readings in a row.

No signs: clean only on a direct request. Measure a process by top -o mem or footprint; ps understates the compressed part.

Procedure

  1. Snapshot. From the skill root:

    bash
    bash scripts/tails-macos.sh                                                     # local
    ssh -o BatchMode=yes -o ConnectTimeout=8 <alias> 'bash -s' < scripts/tails-<os>.sh   # remote

    Keep the script's summary as the "before" and take the top of top -o mem: the table omits launchd services (on Linux, .service units), system processes, Claude.app and children of active sessions, and one live job (a local whisper run, 9 GB) can outweigh all the tails. Done when you hold the table, the summary and the top of top.

  2. Decide. The "Action" column sets what to do with a class (the script prints the Russian labels shown):

    ClassWhat it isAction
    claude-сессия (claude session)Claude Code CLI, bundled with Desktop or standalonekill if a tail
    хвост закрытого приложения (closed-app tail)processes of X.app with PPID 1 while X is not running, and everything under themkill
    сирота (orphan)a worker with PPID 1: omp/bun, Chrome for Testing, npx/MCP, grok/codex; duplicates markedkill
    dev-сервер (dev server)http.server, vite, npm run dev without a parent, older than a dayask
    зомби (zombie)STAT Z older than a minuteits parent reaps it: name the parent

    The script does not know session activity: match the id from the row against list_sessions. A tail is a session with lastActivityAt older than 12 h, not isRunning, with no work going on. Id "не найдена" (not found) and sessions on a remote machine (list_sessions does not know them): ask. Done when every row has an action and every claude row has a verdict: tail, live or ask.

  3. Show. The table to the owner: row, action, what dies with it. Before killing a claude process, name its dev servers and ports from the "dies with it" column. "Kill" and "clean up" go straight to step 4; "slow" and "swap" wait for the word. Done when the owner sees the table and the word is received or not needed.

  4. Kill. Only rows that passed step 2, in bash with an array, with a check and a follow-up KILL:

    bash
    # bash -c: in zsh `kill $pids` with a string silently kills nothing
    bash -c 'pids=(111 222 333); kill -TERM "${pids[@]}"; sleep 4
      for p in "${pids[@]}"; do kill -0 "$p" 2>/dev/null && kill -KILL "$p"; done'
    • Idle claude sessions ignore SIGTERM: the KILL pass is required.
    • A dev server started with & inside a session outlives it as an orphan: check the port with lsof -iTCP:<port> -sTCP:LISTEN.

    Done when no pid from the array answers kill -0 and the ports of killed dev servers are free.

  5. Verify. Run the script again. Report to the owner: pressure and the candidates' RSS before and after; swap does not shrink until a reboot, so it is not the measure. A killed claude session stays in the app's list and comes back on the next message. Killing the CLI does not free the memory of Desktop's renderer and main processes: that needs an app restart, on the owner's word, after checking it will not interrupt needed work, with another reading. Done when the run shows no killed candidates and "before" and "after" are named.

Off limits

  • the current session, active and isRunning claude sessions;
  • launchd services;
  • Claude.app.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the It Ram Doctor AI skill do?

Process tails that hold memory for nothing: finds them and, on the owner's word, kills them. Use on "slow", "swap", "low memory", "kill the tails", "clean up memory", "ram doctor", and after closing heavy apps.

Why use It Ram Doctor on TypingMind?

Because you install it once and use it with any model. It Ram Doctor is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install It Ram Doctor in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/serejaris/personal-corp-os/tree/main/skills/it-ram-doctor. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use It Ram Doctor?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with It Ram Doctor?

As many as you like. As long as a model supports skills, you can use It Ram Doctor with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the It Ram Doctor AI skill free?

Yes. It is published on GitHub by serejaris under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇