Borrowing it
Nothing to install: this file belongs to theQuert/cc-reaper. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/theQuert/cc-reaper/main/CLAUDE.mdgit clone --depth 1 https://github.com/theQuert/cc-reaperWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/instructions/thequert/cc-reaper/claude-md)<a href="https://agentmods.dev/instructions/thequert/cc-reaper/claude-md"><img src="https://agentmods.dev/badge/instructions/thequert/cc-reaper/claude-md/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/instructions/thequert/cc-reaper/claude-md"><img src="https://agentmods.dev/badge/instructions/thequert/cc-reaper/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.05582 | $0.05582 |
| Opus 5.5 | $0.02233 | $0.02233 |
| Sonnet 5.5 | $0.01116 | $0.01116 |
| Haiku 4.5 | $0.00558 | $0.00558 |
Grade A, and why
cc-reaper CLAUDE.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 174 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Project Overview
cc-reaper is a shell-based utility that cleans up orphan Claude Code/Codex processes and settled git worktrees that leak memory or disk after sessions end. It uses hooks for low-latency triggers, background agents for guarantees, and manual commands for diagnosis/on-demand cleanup.
Repository Structure
install.sh— Automated 4-stage installer (shell functions → stop hook → proc-janitor → daemon startup)hooks/stop-cleanup-orphans.sh— Claude Code Stop hook; kills orphans using orphan-parent filtering (only truly orphaned processes — reparented to PID 1, or on Linux to the user'ssystemd --usermanager)shell/claude-cleanup.sh— Shell functions:claude-cleanup(kill orphans),claude-ram(RAM report),claude-fd(FD usage report),claude-sessions(session list),claude-guard(auto-reaper with RSS/FD threshold + idle detection)shell/cc-monitor.sh— Read-only heat attribution monitor (cc-monitor,cc-monitor --apply)shell/worktree-janitor.sh— Shared Claude/Codex worktree inventory and gated removal (clean, unheld, no live/recent harness claim, landed, idle);--claimsfor read-only claim/lease evidence,--sessionfor either harness, and--scheduledfor the guarantee layer. The method is indocs/worktree-reclamation.mdconfig/worktree-janitor.conf— Cross-device 48-hour/session/schedule policy deployed under~/.cc-reapershell/reclaim-byproducts.sh— Session scratchpads, anonymous Docker volumes, go build cache, reclaim archives; its own LaunchAgent via--install-launchd(adopted from the skills repository 2026-10-07). The transcript lookup behind the scratchpad liveness rule is one pass, cached under~/.cc-reaper/stateon a corpus fingerprint and bounded byCC_RB_MENTION_BUDGET_SECONDS(default 600); a lookup that does not finish, or whose find or grep errors (status 2 or more, a missing binary, a signal), keeps every directory, writes no cache and no stampshell/resource-watch.sh— also the disk guard:ALERT:disk-lowunder 60 GB free; under 40 GB the reclaim (worktree-janitor.sh --scheduled, thenreclaim-byproducts.sh) started detached asresource-watch.sh --actwith a 30-minute cooldown, a single-instance lock (~/.cc-reaper/state/disk-act.lock) and a 90-minute cap after which the next round ends its process tree by pid; under 20 GBALERT:disk-emergencyand the flag~/.cc-reaper/state/disk-emergency; a GB/h write rate fromdisk-free-samples.tsv(ALERT:disk-rateover 10, flagdisk-rate-highover 20); andreclaim-byproducts.sh --go-cache-capevery run, bounded to 120 s.ALERT:reclaim-stalled(once per stall, alert only) when reclaim-byproducts' last-finished stamp is older than twice its LaunchAgent's StartInterval (CC_RW_RECLAIM_STALL_SECS); with no stamp at all the age is the plist's mtime (else the script's): inside the line one INFO line, over it the same once-only alert; test T19. A round never waits on the act. Each snapshot line carriesswap=<gb>GB rate=<gbh>GB/h. Tests:tests/resource-watch.sh(T12-T21),tests/disk-guard.shshell/resource-watch-judge.py— the one judge of resource-watch's log, for a spot-check to import: thresholds are the script's defaults overridden by the installed LaunchAgent'sEnvironmentVariables; each judged ALERT marker (load, disk, disk-low, disk-emergency, mem, swap, disk-rate) against the line's own numbers. Read-only. Tests:tests/resource-watch-judge.py(its defaults are pinned to the script's)shell/disk-janitor.sh—--checkdisk guard. BelowCC_DJ_ACT_FREE_GB(default 30) it acts; the go build cache age trim (go-build-age) runs on free space underCC_DJ_ACT_LOW_FREE_GB(20), underCC_DJ_GO_BUILD_FREE_GB(35), or a cache overCC_DJ_GO_BUILD_CAP_GB(8), also from--checkoutside the act. Because the act itself runs only below 30 GB, the effective free-space trigger inside the act is 30 GB, not 20 GB (the 35 GB soft floor is above it, so every act runs the step). It deletes only inCC_DJ_NEW_STEPS_MODE=auto(default spotcheck: logsdecision=would-remove), after one bounded (CC_DJ_HOLDER_TIMEOUT_SECONDS,lsof -b) system-wide lsof; a timeout or non-zero lsof deletes nothing. Tests:tests/disk-janitor.shshell/gce-disk-watch.py— reads each GCE CI host's/from the Mac mini (one IAPdf -P / ; df -Pi /, the only remote command; per-host 90 s, per-run 240 s) and tellsdisk-high(used >= 90%, < 2 GiB free, inodes >= 90%) orunreadable(never for aGDW_KNOWN_UNREADABLEhost, loggedknown-unreadable) once per state change, re-alert every 120 min, one recovery line. Shadow (GDW_APPLY=0) logswould alertlines only; apply writes aGCE-DISK ALERT|STILL|RECOVEREDlog line and a notification, retrying a failed channel alone; nothing goes to an inbox or an event log. Policyconfig/gce-disk-watch.conf; agentcom.cc-reaper.gce-disk-watch(600 s, never started by install). Tests:tests/gce-disk-watch.pyshell/orbstack-memory-trim.sh— Drops the OrbStack guest's clean caches when its VM process holds over a quarter of RAM;com.cc-reaper.orbstack-memory-trimevery 15 min (adopted from stima-api 2026-10-07)hooks/worktree-session-end.sh— Thin shared Claude/Codex SessionEnd triggerproc-janitor/config.toml— Daemon config with target patterns, whitelist, and grace period settingslaunchd/— macOS LaunchAgent scripts for zero-dependency background monitoringtests/— Lightweight bash validation scripts (mocked ps/kill for isolated testing)
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 7d ago Changed · -132 tokens per session 4b530f54ea8f
- 12d ago Changed · +6 lines · +709 tokens per session 2eaa192a84dc
- 13d ago Changed · +1 lines · +395 tokens per session 831cbba2da8a
- 17d ago Changed · +3 lines · +214 tokens per session ae05058e0395
- 27d ago Changed · +2 lines · +119 tokens per session 95795b457fad
- 1mo ago Changed · +2 lines · +115 tokens per session e564d167ba56
- 1mo ago Changed · +10 lines · +897 tokens per session e2868e9f11ac
- 1mo ago Changed · +3 lines · +106 tokens per session 959fb7471024
- 1mo ago Changed · +16 lines · +175 tokens per session 3f1e35303993
- 1mo ago First seen · 131 lines · 2,984 tokens per session scan A 7adb95c134ec
cc-reaper CLAUDE.md is an instructions file published in the GitHub repository theQuert/cc-reaper (19 stars, last pushed yesterday), licensed Apache-2.0. It adds 5,582 tokens to every session, about $0.0223 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
cc-reaper CLAUDE.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| cc-reaper CLAUDE.mdtheQuert/cc-reaper | Instructions file | 19 | yesterday | Apache-2.0 | A | 5,582 | Claude Code |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 9,719 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | today | MIT | A | 7,461 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 5,685 | GitHub Copilot |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 149k | today | MIT | A | 4,680 | Codex, OpenCode |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 3,093 | GitHub Copilot |
| vscode model-prompts.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 2,022 | GitHub Copilot |