chaff
Separate the live work from the dead weight on a developer machine: build daemons, caches, build output and stale git worktrees, with tiered safe cleanup. CLI, Claude Code plugin and MCP server.
Install / Use
claude mcp add gulsahsarsilmaz -- npx -y github:gulsahsarsilmaz/chaffIf the server publishes to npm under a different name, use that package instead โ check the repo README.
MCP Server
Model Context Protocol server
Quality Score
Category
Development & EngineeringSupported Platforms
Our assessment of chaff
chaff scores 83/100 on our quality scale, 3023rd of 4,592 Development & Engineering skills we index.
Its MCP Server is 30 KB long, well organised into 29 sections with 20 code examples: a thorough specification that gives an agent plenty to work with.
It has 3 GitHub stars, so there is little community track record yet; judge it on its content.
Maintenance, license and trust
- The repository was last updated 5 days ago, so chaff is actively maintained.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 92/100, with 1 caution from licensing, adoption, age or documentation. These come from repository metadata, not a code audit โ read the skill file before letting an agent act on it.
chaff compared with similar skills
All 4 of these similar skills score higher than chaff; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| chaff (this skill)by gulsahsarsilmaz | 83 | 3 | 5d ago | MCP Server |
| Agent-Reachby Panniantong | 100 | 100.6k | 1d ago | CLAUDE.md |
| taste-skillby Leonxlnx | 100 | 100.5k | 1d ago | CLAUDE.md |
| headroomby headroomlabs-ai | 100 | 77.2k | today | CLAUDE.md |
| ai-job-searchby ai-job-search-dev | 100 | 62.9k | today | CLAUDE.md |
Frequently asked questions
- How do I install chaff?
- Run
claude mcp add gulsahsarsilmaz -- npx -y github:gulsahsarsilmaz/chaff. The install tabs above show the steps for each supported agent. - Which AI agents does chaff work with?
- It is written for Claude Code and Claude Desktop, as a MCP Server file. Other agents that read the same format can often use it too.
- Is chaff safe to use?
- It is MIT-licensed and scores 92/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is chaff still maintained?
- The repository was last updated 5 days ago, so chaff is actively maintained.
Skill content
View source on GitHubWelcome. If your laptop fans are screaming, your disk is mysteriously full, and you have a dozen agent worktrees you're afraid to delete โ chaff is for you. It looks at everything your toolchains leave behind, works out what is still alive, and tells you exactly what each cleanup would cost before it touches anything.
Quick start
You need macOS, Linux or Windows and Node 20 or newer (platform notes). No config, no dependencies.
Just want a look? This runs it without installing anything, and changes nothing:
cd ~/code/your-project # run it from inside a project, not your home folder
npx @gulsahsarsilmaz/chaff plan
Keeping it:
npm install -g @gulsahsarsilmaz/chaff
chaff plan # see what's reclaimable, sorted by tier. Changes nothing.
chaff reap # reclaim tier 1 only: things whose owner no longer exists
Or with Homebrew (macOS and Linux):
brew install gulsahsarsilmaz/chaff/chaff
The npm package name includes the scope: npm install chaff finds nothing.
Run from inside a project, chaff scans that repo and its siblings. Run from your home folder,
it scans no projects at all. To cover your whole machine from anywhere, point it at your code
folders once with chaff config --set=roots=~/code (several: --set=roots=~/code,~/work).
If it doesn't work first time, see Troubleshooting.
Like what you see? Add it to Claude Code for a live statusline, or wire it into any MCP agent. Everything it deletes goes to a trash you can restore from.
How it works
chaff finds every build process, daemon, cache, build output, package store and git
worktree across your projects โ JS/TS, Rust, Go, .NET, JVM, Python, Unity, Unreal โ works out
which are still alive, and sorts the rest into three tiers by how much it would hurt to
reclaim.
Built for the case where you have a dozen agent worktrees in flight, half a dozen build daemons you didn't know were running, and no way to tell which is safe to kill.
Why
nx reset clears one workspace at a time. cargo clean clears one crate. ps | grep node
tells you a process exists but not which project owns it or whether anything still needs it. du -sh * takes five minutes
and doesn't know what's regenerable. Orphan-process reapers don't understand build tools,
and none of them can tell an idle daemon from one with a build in flight.
chaff attributes every process to a project by walking the process tree in both directions, sizes every regenerable artifact in one batched pass, ages every worktree by its last commit, and tells you what each cleanup would actually cost you.
The three tiers
| Tier | Meaning | What it costs | | --- | --- | --- | | 1 โ dead | The project, worktree, or parent process it belongs to no longer exists | Nothing. It is already garbage. | | 2 โ idle | Nothing running against it, nothing touched it recently | One cold rebuild, or a re-download. | | 3 โ live | Touches a running task, an active build, or uncommitted work | Potentially real work. Never automatic. |
Entries marked [locked], [in use], or [building] are shown but never executed, even
with --force.
What it found on the machine it was built for
One laptop, mid-afternoon, during ordinary parallel agent work:
load average 713 โ 7
nx daemons 6 (one at 646% CPU for 88 min, unnoticed)
node processes 68 โ 11
git worktrees 111 โ 50 (76 of them hidden in .claude/worktrees/)
disk free 36.5 GB โ 59 GB
And the things nothing was reporting at all:
76.5 GB Cargo target dirs โ 53.7 GB of it six copies of the same src-tauri/target
77.1 GB node_modules across 40 installs, with a 0.1 GB pnpm store (not hardlinked)
14.2 GB one iOS build directory
4.1 GB npm cache
What it tracks
Processes โ nx daemons and workers, turbo daemons, tsserver, watchman, metro, esbuild, swc, tsc, jest/vitest/playwright/cypress, next/vite/webpack/nodemon/storybook/wrangler, eslint/prettier/biome, plus JVM/Gradle daemons, dotnet/MSBuild/OmniSharp, Go, Cargo, Python, Unity and Unreal editors. Each is attributed to the project that owns it.
Build artifacts, by ecosystem
| | cache | output |
| --- | --- | --- |
| JS/TS | .nx .turbo .angular .parcel-cache .vite .rollup.cache .rspack-cache .webpack-cache .cache | .next .svelte-kit .astro .output .expo dist build coverage storybook-static |
| Rust / JVM | .gradle | target |
| .NET | | obj |
| Python | __pycache__ .pytest_cache .mypy_cache .ruff_cache .tox | |
| Unity | Library Temp | |
| Unreal | Intermediate DerivedDataCache | Binaries |
| Xcode / iOS | | build next to *.xcodeproj, *.xcworkspace or Podfile (labelled xcode) |
| Dart / Flutter | .dart_tool | build next to pubspec.yaml (labelled flutter) |
| Zig | .zig-cache zig-cache | zig-out |
target, obj, Library, Temp, Intermediate, Binaries, .dart_tool and the Zig
directories are gated on a project marker in the same directory โ Cargo.toml, *.csproj,
ProjectSettings + Assets, *.uproject, pubspec.yaml, build.zig. Without the marker they are never counted, never
mind deleted. bin/ is excluded outright: too many repos keep real scripts there.
Shared stores โ pnpm, npm, yarn, Go module + build cache, NuGet, pip (all safely
prunable); Cargo registry, Gradle, Maven, Playwright and Puppeteer browsers, Xcode
DerivedData, the Dart pub cache and Zig's global cache (surfaced, never auto-pruned, because re-downloading or rebuilding them is
expensive or offline-hostile; each is offered only at tier 3, with its real cost stated). Bazel output bases are listed
too but never offered at all: Bazel makes them read-only and tracks them per workspace, so
reclaim them with bazel clean --expunge inside each one. The bazel-out/bazel-bin
links in a workspace point into that output base; deleting them frees nothing, so chaff
ignores them.
Dependencies โ node_modules, counted once per install. Slow to measure, so it is
opt-in via --full, kept in its own 24-hour cache so an ordinary scan never destroys it,
and reported as not measured when absent rather than silently undercounting.
Worktrees โ every git worktree, aged by last commit, with merged / dirty / locked /
in-use state. Primary checkouts are never proposed for removal.
Projects are found by marker: nx.json, turbo.json, pnpm-workspace.yaml, lerna.json,
rush.json, Cargo.toml, go.mod, *.sln, *.csproj, build.gradle, pom.xml,
pyproject.toml, ProjectSettings, *.uproject, or plain .git.
What chaff doctor tells you
Not just what is big โ what is wrong, and the command that fixes it:
- nx below 22.7, where every worktree duplicates the whole cache
node_modulesfar larger than the pnpm store, meaning installs are not hardlinked- the same Cargo
target/compiled into N sibling checkouts, whenCARGO_TARGET_DIRwould share one - daemon count, worktree count, the largest regenerable artifact, oversized shared stores
Use it from any agent (MCP)
chaff speaks MCP over stdio, so anything that speaks the protocol โ Codex, Cursor, Zed, Windsurf, Claude Code โ gets the same tools. Install it once, point your client at it.
npm install -g @gulsahsarsilmaz/chaff
Codex โ ~/.codex/config.toml:
[mcp_servers.chaff]
command = "chaff"
args = ["mcp"]
Claude Code โ claude mcp add chaff -- chaff mcp, or the standard shape below in
.mcp.json.
Cursor (~/.cursor/mcp.json), Zed, Windsurf and anything else taking the
standard shape:
{
"mcpServers": {
"chaff": { "command": "chaff", "args": ["mcp"] }
}
}
From a checkout instead of a global install, use "command": "node" and
"args": ["/path/to/chaff/scripts/chaff.mjs", "mcp"].
| Tool | Does | Safe? |
| --- | --- | --- |
| chaff_status | Memory, disk, cache, output, stores, daemons, worktrees | read-only |
| chaff_plan | What it would clean, by tier, with sizes | read-only |
| chaff_doctor | What is misconfigured, and the fix for each | read-only |
| chaff_worktrees | Every worktree, staleness, uncommitted work | read-only |
| chaff_reap | Reclaim tier 1 only โ provably dead | safe |
| chaff_clean | Tier 1-2, to trash. Needs your OK โ see below | recoverable |
A skill to go with it. skills/chaff/SKILL.md tells an agent
when to reach for chaff โ a full disk, ENOSPC, a swapping machine โ and how to use it
safely. The Claude Code plugin loads it for you; for other agents that read skills, copy
the skills/chaff folder into their skills directory.
Tier 3 is not reachable over MCP. It touches running processes and uncommitted code,
and a model deciding that on its own โ possibly auto-approved โ is not a tradeoff worth
making. Tier 3 stays a person at a terminal: chaff clean --tier=3 --yes --force.
chaff_clean asks you, not the model. Its confirm: true argument is set by the model,
so chaff does not treat it as consent:
- If your client supports MCP elicitation, chaff asks you directly, naming what it will remove. Decline, cancel or don't answer, and nothing runs.
- Otherwise it needs the
planIdthatchaff_planprinted: proof the model fetched the plan it should have shown you. A planId lasts 10 minutes and works once. Without one,chaff_cleanonly dry-runs. - Either way, chaff applies exactly the plan that was agreed to. If anything has been added
or changed since, it refuses and asks for a fresh plan (
chaff apply --expectdoes the check).
Deleted build output and caches go to the chaff trash, recoverable with chaff restore
until the TTL expires; stopped processes, removed worktrees and pruned stores are not.
Install as a Claude Code plugin
/plugin marketplace add gulsahsarsilmaz/chaff
/plugin inst
Truncated for display โ read the full file on GitHub.
Related Skills
Agent-Reach
100.6kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu โ one CLI, zero API fees.
taste-skill
100.5kAgent skills that give coding agents taste: art direction, reference images and a browser check instead of generic AI pages
headroom
77.2kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
ai-job-search
62.9kThe job search that runs on your machine. AI job application framework built on Claude Code: evaluate postings, tailor CVs, write cover letters, prep interviews. Fork it and own it.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit โ see the Safety scan above for what the skill file itself contains.
