skills/process-cleanup/SKILL.md
Finds stale and resource-hungry processes, scores them by waste, and presents a cleanup report with friendly names. Use this skill when the user says 'what's eating my RAM', 'kill stale processes', 'clean up my machine', 'free up memory', 'my computer is slow', 'what's running', 'too many things open', or asks to find/kill background processes. Also use proactively when you notice sluggishness, process spawn failures, or many duplicate processes during normal work.
npx skillsauth add b-open-io/prompts process-cleanupInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Autonomously investigate running processes, score them by waste (resources x staleness), and produce a categorized report with friendly names and ready-to-use kill commands.
This skill runs without user interaction. Gather everything, analyze, score, and present the full report. The user decides what to kill after reading it.
Run the bundled script — it handles all data collection, scoring, and safety classification in one pass:
bash ${CLAUDE_PLUGIN_ROOT}/skills/process-cleanup/scripts/cleanup-report.sh
The script outputs structured JSON to stdout (progress messages go to stderr). Parse the JSON to build your report.
ps -eo pid,ppid,rss,%cpu,lstart,tty,command)lsof -iTCP -sTCP:LISTEN)lsof -c node -c bun -c next -c python -c ruby -a -d cwd){
"my_pid": 12345,
"total_recoverable_mb": 4300,
"safe": [{"pid": 38585, "name": "Claude Code (resumed session, likely stale)", "memory_mb": 4300, "age_hours": 456, "score": 92, "port": null}],
"caution": [{"pid": 28755, "name": "Next.js dev -> agentcraft", "memory_mb": 156, "age_hours": 48, "score": 45, "port": "3000"}],
"protected": [{"pid": 76187, "name": "Claude Code -> prompts", "memory_mb": 553, "age_hours": 1, "score": 21, "port": null}],
"kill_command": "kill 38585 ..."
}
The score field is already computed (0-100, resources + staleness + replaceability). Use it directly for sorting.
The script applies these mappings automatically. This table is for your reference when the script output looks unexpected:
| Pattern in command | Friendly name |
|---|---|
| claude (bare or -c) | Claude Code -> {project} |
| claude --resume | Claude Code (resumed session, likely stale) |
| claude.*--claude-in-chrome | Claude Chrome bridge |
| opencode | OpenCode session |
| codex | Codex app |
| next dev or next-router-worker | Next.js dev -> {project} |
| bun dev | Bun dev -> {project} |
| vite | Vite dev -> {project} |
| convex dev | Convex dev -> {project} |
| portless | Portless proxy -> {project} |
| turso | Turso DB |
| postgres | PostgreSQL |
| redis-server | Redis |
| mongod | MongoDB |
| node.*webpack\|esbuild\|turbopack | Bundler watcher |
| tsc.*--watch | TypeScript watcher |
| Google Chrome Helper | Chrome (renderer) |
| Dia.*Helper | Dia browser (renderer) |
| Wispr Flow | Wispr Flow voice |
| iTerm2 | iTerm terminal |
| Electron\|Helper (Renderer) | Derive app name from path |
Present findings as a single report. Sort by waste score descending within each safety tier.
## Process Cleanup Report
**Total recoverable**: ~X.X GB across N processes
### SAFE TO KILL (X.X GB)
| Score | Process | Memory | Age | PID |
|-------|--------------------------------|---------|----------|-------|
| 92 | Claude Code (Feb 14, stale) | 4.3 GB | 19 days | 38585 |
| 78 | OpenCode (x15 sessions) | 1.3 GB | 25-31 d | ... |
### USE CAUTION (X.X GB)
| Score | Process | Memory | Age | PID |
|-------|--------------------------------|---------|----------|-------|
| 45 | Next.js dev → agentcraft | 156 MB | 2 days | 28755 |
### PROTECTED
- This Claude session — 553 MB — PID 76187
- Chrome (47 tabs) — 2.9 GB
- iTerm2 — 264 MB
Rules for the report:
End with kill commands:
# SAFE — reclaim ~X.X GB
kill PID1 PID2 PID3
# CAUTION — review first:
# kill PID4 # Next.js dev → agentcraft :3000 (156 MB)
Then state what you recommend and let the user decide.
tools
This skill should be used when a Claude Code session needs to keep working after Anthropic usage runs out, or when the user asks to run the Claude Code harness on GPT-5.6 Sol. Trigger phrases include "my Anthropic usage ran out", "I'm out of Claude usage", "usage limit reached, what now", "keep working on another model", "run Claude Code on GPT-5.6 Sol", "use GPT-5.6 Sol as the model", "set up claudex", "claudex isn't working", "route the harness through CLIProxyAPI", or "bill against my ChatGPT/Codex subscription". It stands up a local proxy so the Claude Code CLI runs on OpenAI's Codex backend as an escape hatch, and diagnoses that setup when it drifts. macOS + Homebrew.
testing
This skill should be used when the user asks to "open Visual Wayfinder", "answer a Wayfinder ticket visually", "turn this decision into a configurator", "show Wayfinder choices as a dashboard", "prototype the Wayfinder questionnaire", or wants interactive choice cards, tradeoff controls, rankings, ranges, toggles, and consequence previews for one active Wayfinder decision. It wraps the Wayfinder skill and JSON Render; it never replaces the tracker or resolves more than the active decision.
development
This skill should be used when the user asks to "make a visual proposal", "write this up so I can share it", "present these options visually", "diagram the trade-offs", "turn this plan into something reviewable", or requests a shareable design pitch, architecture proposal, RFC, options comparison, or visual roadmap for work that has not been built. It produces one self-contained, theme-aware HTML page led by grounded diagrams. Use visual-review instead for completed code changes; do not use this skill for internal task tracking.
tools
This skill should be used when the user asks to "add plugin settings", "make a plugin configurable", "store per-project plugin configuration", "use settings.local.json", "create a plugin state file", "expose skill settings in Agent Master", or "add a skill interface". Distinguishes official Claude Code settings from project-owned configuration and documents bOpen Agent Master skill interface discovery.