{"id":"451d1ba4-14d1-4503-be48-63b26bb73c3a","shortId":"U8UcKS","kind":"skill","title":"process-cleanup","tagline":"This skill should be used when the user asks to \"find zombies\", \"kill zombie processes\", \"clean up zombies\", \"check for zombie processes\", \"reap zombies\", or mentions zombie process detection, cleanup, or process state monitoring.","description":"# Process Cleanup\n\nDetect and reap zombie processes using `/bin/ps`.\n\n## Background\n\nA zombie (state `Z`) is a process that has exited but whose parent hasn't called `wait()` to collect its exit status. Zombies consume no CPU or memory, but they hold a PID slot and can accumulate. You can't `kill` a zombie — it's already dead. The only remedies are:\n\n1. **Signal the parent** with `SIGCHLD` so it reaps the child\n2. **Kill the parent** so `init`/`launchd` adopts and reaps the orphan\n\n## Important: use `ps` for process state queries\n\nAlways use `ps` (BSD) for process state queries. If `ps` is aliased, use `/bin/ps` to bypass it.\n\n```bash\n# List zombies\n/bin/ps ax -o pid,state,ppid,user,command | awk '$2 ~ /Z/'\n\n# List all processes with state\n/bin/ps ax -o pid,state,ppid,etime,args\n```\n\n## Usage\n\nRun the helper script to scan for zombies:\n\n```bash\n# Detect only (default) — list zombie processes\nbash scripts/kill-zombies.sh\n\n# Reap zombies — send SIGCHLD to parent processes\nbash scripts/kill-zombies.sh --kill\n```\n\n## Safety\n\n- Default mode is **detect-only** — no processes are signaled\n- With `--kill`, the script sends `SIGCHLD` to parent processes (non-destructive nudge to reap)\n- If a parent ignores `SIGCHLD`, the script reports the parent PID — **confirm with the user** before killing it\n- Never kill PID 1 (`init`/`launchd`)","tags":["process","cleanup","agent","skills","paulrberg","agent-skills","ai-agents"],"capabilities":["skill","source-paulrberg","skill-process-cleanup","topic-agent-skills","topic-ai-agents"],"categories":["agent-skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/PaulRBerg/agent-skills/process-cleanup","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add PaulRBerg/agent-skills","source_repo":"https://github.com/PaulRBerg/agent-skills","install_from":"skills.sh"}},"qualityScore":"0.475","qualityRationale":"deterministic score 0.47 from registry signals: · indexed on github topic:agent-skills · 50 github stars · SKILL.md body (1,345 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-04-22T00:56:18.838Z","embedding":null,"createdAt":"2026-04-18T22:17:47.962Z","updatedAt":"2026-04-22T00:56:18.838Z","lastSeenAt":"2026-04-22T00:56:18.838Z","tsv":"'/bin/ps':46,142,149,165 '/z':159 '1':99,248 '2':110,158 'accumul':84 'adopt':117 'alias':140 'alreadi':93 'alway':129 'arg':172 'ask':12 'awk':157 'ax':150,166 'background':47 'bash':146,182,189,198 'bsd':132 'bypass':144 'call':63 'check':22 'child':109 'clean':19 'cleanup':3,33,39 'collect':66 'command':156 'confirm':238 'consum':71 'cpu':73 'dead':94 'default':185,202 'destruct':223 'detect':32,40,183,206 'detect-on':205 'etim':171 'exit':57,68 'find':14 'hasn':61 'helper':176 'hold':78 'ignor':230 'import':122 'init':115,249 'kill':16,88,111,200,213,243,246 'launchd':116,250 'list':147,160,186 'memori':75 'mention':29 'mode':203 'monitor':37 'never':245 'non':222 'non-destruct':221 'nudg':224 'o':151,167 'orphan':121 'parent':60,102,113,196,219,229,236 'pid':80,152,168,237,247 'ppid':154,170 'process':2,18,25,31,35,38,44,54,126,134,162,188,197,209,220 'process-cleanup':1 'ps':124,131,138 'queri':128,136 'reap':26,42,107,119,191,226 'remedi':97 'report':234 'run':174 'safeti':201 'scan':179 'script':177,215,233 'scripts/kill-zombies.sh':190,199 'send':193,216 'sigchld':104,194,217,231 'signal':100,211 'skill':5 'skill-process-cleanup' 'slot':81 'source-paulrberg' 'state':36,50,127,135,153,164,169 'status':69 'topic-agent-skills' 'topic-ai-agents' 'usag':173 'use':8,45,123,130,141 'user':11,155,241 'wait':64 'whose':59 'z':51 'zombi':15,17,21,24,27,30,43,49,70,90,148,181,187,192","prices":[{"id":"eadba2ca-56b2-4f39-8507-7d85a6174924","listingId":"451d1ba4-14d1-4503-be48-63b26bb73c3a","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"PaulRBerg","category":"agent-skills","install_from":"skills.sh"},"createdAt":"2026-04-18T22:17:47.962Z"}],"sources":[{"listingId":"451d1ba4-14d1-4503-be48-63b26bb73c3a","source":"github","sourceId":"PaulRBerg/agent-skills/process-cleanup","sourceUrl":"https://github.com/PaulRBerg/agent-skills/tree/main/skills/process-cleanup","isPrimary":false,"firstSeenAt":"2026-04-18T22:17:47.962Z","lastSeenAt":"2026-04-22T00:56:18.838Z"}],"details":{"listingId":"451d1ba4-14d1-4503-be48-63b26bb73c3a","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"PaulRBerg","slug":"process-cleanup","github":{"repo":"PaulRBerg/agent-skills","stars":50,"topics":["agent-skills","ai-agents"],"license":"mit","html_url":"https://github.com/PaulRBerg/agent-skills","pushed_at":"2026-04-20T16:22:56Z","description":"PRB's collection of agent skills","skill_md_sha":"15fd64f32a28a86af7bf65039ff09aff89c61b23","skill_md_path":"skills/process-cleanup/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/PaulRBerg/agent-skills/tree/main/skills/process-cleanup"},"layout":"multi","source":"github","category":"agent-skills","frontmatter":{"name":"process-cleanup","description":"This skill should be used when the user asks to \"find zombies\", \"kill zombie processes\", \"clean up zombies\", \"check for zombie processes\", \"reap zombies\", or mentions zombie process detection, cleanup, or process state monitoring."},"skills_sh_url":"https://skills.sh/PaulRBerg/agent-skills/process-cleanup"},"updatedAt":"2026-04-22T00:56:18.838Z"}}