# chaff

> Find and safely reclaim disk space and memory wasted by stale build artifacts, caches, and orphaned processes.

chaff is a free AI agent skill on Agensi by Gulsah Sarsilmaz, in Workflow Automation. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [Gulsah Sarsilmaz](https://www.agensi.io/creators/gulsah-sarsilmaz)
- Category: [Workflow Automation](https://www.agensi.io/skills/workflow-automation)
- Uses: 3
- Version: 1.0
- Last updated: 2026-10-16
- Security: scan passed (2026-10-16); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/chaff
- Tags: automation, ai-agents, prompt-engineering, cli, git, node-js

## About this skill

Developer machines accumulate gigabytes of dead weight that slow down builds and trigger disk space errors. This skill identifies and safely reclaims memory and disk space by targeting stray build daemons, stale caches, and abandoned worktrees without risking active work.

### What it does
- **Resource auditing** identifies memory pressure and disk usage across local development environments.
- **Tiered reclamation** categorizes targets into dead assets (Tier 1), idle caches (Tier 2), and active work (Tier 3) to prevent accidental data loss.
- **Build daemon management** locates and terminates orphaned processes from Gradle, NX, or Node.js.
- **Safe worktree pruning** detects uncommitted changes in abandoned git worktrees before suggesting removal.
- **Undoable operations** moves files to a managed trash instead of immediate deletion, allowing for restoration.

### How it works
1. **Assessment** via `chaff_status` to determine current system pressure and identify specific bottlenecks.
2. **Planning** using `chaff_plan` to generate a list of targets and their associated tiers/sizes for user review.
3. **Safety check** with `chaff_worktrees` to ensure no uncommitted code is lost in stale directories.
4. **Execution** of `chaff_reap` for dead assets or `chaff_clean` for idle caches after explicit user confirmation.
5. **Verification** by re-running status checks to report total reclaimed space and memory.

### Frameworks & tools
Works with Node.js, Gradle, NX, git worktrees, and standard build daemons. Integrates via MCP, Claude Code plugins, or the `@gulsahsarsilmaz/chaff` CLI.

### Why this beats prompting it yourself
Writing manual `rm -rf` commands or shell scripts risks deleting uncommitted work or active build artifacts. This skill uses a tiered safety system and built-in trash/restore functionality that basic file system prompts cannot replicate.

### Use cases
- Fix ENOSPC "no space left on device" errors during large npm installs.
- Clean up orphaned tsserver or gradle processes causing system lag.
- Identify and remove forgotten git worktrees that duplicate heavy project caches.
- Recover disk space by clearing stale build outputs from inactive projects.

### Known limitations
Tier 3 (live work) removal is disabled over MCP and requires manual CLI execution. Requires the chaff MCP server or CLI package to be available in the environment.

## Requires

- @gulsahsarsilmaz/chaff
- Node.js
- Git

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the chaff skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### How does Chaff differ from a standard 'disk cleanup' tool?

Chaff identifies and reclaims system resources by targeting orphaned build daemons, stale caches, and abandoned git worktrees that regular cleanup scripts often miss. It solves the common developer issue of "disk full" errors and system lag caused by lingering background processes from Node.js, Gradle, and NX.

### Is there a risk of Chaff deleting my active project files or uncommitted code?

Chaff uses a unique tiered safety system that categorizes files by risk level and moves items to a managed trash rather than performing immediate, permanent deletion. It also includes specific checks for uncommitted git changes to ensure you never lose active work during a cleanup.

### Which AI agents and environments are compatible with this skill?

Chaff is highly compatible with modern developer workflows, integrating seamlessly via the Model Context Protocol (MCP), Claude Code plugins, or as a standalone CLI tool via the @gulsahsarsilmaz/chaff package.

### What exactly is included with the purchase of the Chaff skill?

The purchase includes the full Chaff skill set, featuring tools for auditing, planning, and execution, along with access to the MCP server configuration and CLI integration guides. You will also receive documentation on managing the tiered reclamation system for safe resource recovery.

### Does Chaff support cleanup for specific frameworks like Gradle or NX?

Yes, Chaff is specifically designed to handle complex build environments including Node.js (npm/yarn), Gradle, and NX, as well as managing memory-heavy orphaned processes like tsserver. It can detect and terminate these background daemons that often persist even after a project is closed.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
