it-ram-doctor
Skill243 starsChanged 3 months agoMITView on GitHub
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.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- serejaris/personal-corp-osword for word, first seen Oct 25, 2026
Other versions1 project uses a version of this.
Word for word · 1
- serejaris/personal-corp-os★ 243100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository31 other files it gives its agents.
- AGENTS.mdAGENTS.md
- art-directorSkill
- audit-agent-rulesSkill
- avatarSkill
- benchmarkSkill
- cc-analyticsSkill
- ceo-councilSkill
- claude-md-writerSkill
- claude-sessions-syncSkill
- corp-doctorSkill
- corp-newSkill
- dailySkill
- fable-ruki-agentySkill
- gh-issuesSkill
- grill-meSkill
- harnessSkill
- html-draftSkill
- ideaSkill
- make-3dSkill
- make-landingSkill
- managerSkill
- meeting-copilotSkill
- readme-generatorSkill
- retroSkill
- safe-public-releaseSkill
- sdlc-milestonesSkill
- tg-bot-opsSkill
- to-issuesSkill
- to-prdSkill
- weekly-planningSkill
- weekly-retroSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 19
No signs: clean only on a direct request.
- Distinctive: line 46
Kill: Only rows that passed step 2, in bash with an array, with a check and a follow-up KILL:
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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_levelis 4 or stays at 2 for long (threshold: on Apple silicon 2 appears under ordinary compression);memory_pressure | tail -1shows less than 25–30% free; Swapoutsinvm_statgrow 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
Snapshot. From the skill root:
bash scripts/tails-macos.sh # local ssh -o BatchMode=yes -o ConnectTimeout=8 <alias> 'bash -s' < scripts/tails-<os>.sh # remoteKeep the script's summary as the "before" and take the top of
top -o mem: the table omits launchd services (on Linux,.serviceunits), 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 oftop.Decide. The "Action" column sets what to do with a class (the script prints the Russian labels shown):
Class What it is Action claude-сессия(claude session)Claude Code CLI, bundled with Desktop or standalone kill if a tail хвост закрытого приложения(closed-app tail)processes of X.appwith PPID 1 whileXis not running, and everything under themkill сирота(orphan)a worker with PPID 1: omp/bun, Chrome for Testing, npx/MCP, grok/codex; duplicates marked kill dev-сервер(dev server)http.server, vite,npm run devwithout a parent, older than a dayask зомби(zombie)STAT Z older than a minute its 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 withlastActivityAtolder than 12 h, notisRunning, with no work going on. Id "не найдена" (not found) and sessions on a remote machine (list_sessionsdoes not know them): ask. Done when every row has an action and every claude row has a verdict: tail, live or ask.- 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.
Kill. Only rows that passed step 2, in bash with an array, with a check and a follow-up KILL:
# 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 withlsof -iTCP:<port> -sTCP:LISTEN.
Done when no pid from the array answers
kill -0and the ports of killed dev servers are free.- 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
isRunningclaude sessions; - launchd services;
- Claude.app.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

