Install
$ agentstack add skill-jerry0022-dotclaude-mcp-reap ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
MCP Reap
Reclaims orphaned Claude Desktop MCP server child processes — leftovers from previously-closed sessions that were never reliably terminated and linger, accumulating RAM. Driven by two hooks so it runs both once per session and periodically thereafter, without requiring a restart:
hooks/session-start/ss.mcp.reap.js— fires once, everySessionStart.hooks/stop/stop.mcp.reap.js— fires onStop(end of a response
turn), gated by a ~20-minute per-worktree cooldown so it doesn't scan every turn. The cooldown marker uses the same atomic write-temp-then- rename pattern as self-calibration, keyed to an md5 hash of process.cwd() in os.tmpdir().
Both hooks spawn scripts/mcp-reap.js --apply --json detached, fire-and-forget, windowless ({ detached: true, stdio: 'ignore', windowsHide: true } + .unref()) and exit immediately — reaping never delays a session start or a response turn.
Safety model
The scan-and-kill logic lives in hooks/lib/mcp-reaper.js (fully unit tested, 46/46 in mcp-reaper.test.js) and is Windows-only — the dead-parent-PID orphan signal only means anything on Windows, so the module is a documented no-op on macOS/Linux. A process is only ever a reap candidate when it matches an MCP-server launcher signature, its parent PID is confirmed dead, AND it falls outside the live-Claude census (every currently-live claude/claude.exe process plus its full descendant subtree) and the caller's own process subtree — an empty/unbuildable census means "protection unknown" and refuses to produce any candidates at all. Every candidate is re-validated against a fresh process snapshot immediately before both the SIGTERM and any SIGKILL escalation (TOCTOU-safe), so a pid reused for something else between scan and kill is skipped, never touched. The reap() module itself defaults to dry-run — nothing is ever terminated unless a caller explicitly passes --apply; both hooks opt into it deliberately, on the reasoning that a leaked orphan is safe to reclaim automatically once the safety net above holds. Any enumeration or kill failure fails safe (skip, never throw).
Run manually
node scripts/mcp-reap.js # dry-run, human summary
node scripts/mcp-reap.js --json # dry-run, JSON output
node scripts/mcp-reap.js --apply # reclaim now — sofort ohne Neustart
node scripts/mcp-reap.js --apply --json
Every run — including the detached ones spawned by the hooks — persists its result to dotclaude-mcp-reap-status.json in os.tmpdir(), so "what did it reap (or not)?" is inspectable after the fact even though the hooks discard stdout (stdio: 'ignore').
Constraints
- Silent unless it reaps — no console noise on a clean scan, no window ever
(windowless spawn on both the hook side and inside the reaper's own powershell.exe/wmic process-enumeration calls).
- Never blocks session start or a response turn — both hooks are wrapped in
try/catch and always exit 0, even if spawning the detached CLI fails.
- Non-Windows platforms: both hooks Windows-gate cheaply before spawning
anything (the reaper is a no-op there anyway).
- Cooldown degrades safely: if
os.tmpdir()is unwritable, the Stop hook's
marker write fails silently and the hook simply fires every turn instead of crashing.
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: Jerry0022
- Source: Jerry0022/dotclaude
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.