npkill
Clean up node_modules and .next folders to free up disk space using npkill. Specifically designed to help JavaScript and Next.js developers remove accumulated build artifacts that consume significant storage. Provides both interactive and automated cleanup options with safety checks to protect important system directories.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/ashirbadgudu/npkillWhat This Skill Does
The npkill skill is a robust utility designed specifically for JavaScript and Next.js developers struggling with the "bloat" caused by massive node_modules directories and build artifacts. Over time, these folders can consume dozens or even hundreds of gigabytes of storage across your machine. This skill provides an intelligent, searchable interface to identify these heavy directories and remove them safely. By utilizing the underlying npkill tool, it offers a visual, interactive way to reclaim disk space, allowing you to selectively delete projects you no longer work on or simply clean up build outputs to free up your local environment.
Installation
To integrate this tool into your OpenClaw environment, execute the following command in your terminal:
clawhub install openclaw/skills/skills/ashirbadgudu/npkill
Ensure you have the necessary system permissions to execute commands in your development directories before running the skill for the first time.
Use Cases
- Space Reclamation: Quickly identify and purge node_modules from dormant projects to recover massive amounts of disk space.
- Next.js Maintenance: Target .next build folders specifically when you want to clear out cached build artifacts without touching your dependencies.
- Storage Auditing: View which of your project directories are the largest consumers of disk space by using sorting flags.
- Maintenance Workflows: Integrate regular cleanup sessions into your weekly developer routine to keep your workspace lean and performant.
Example Prompts
- "OpenClaw, run npkill and show me which of my projects are taking up the most space using gigabyte units."
- "I need to clean up my disk; please run npkill to scan my home directory, but only look for .next folders and use dry-run first."
- "OpenClaw, start the interactive npkill session so I can manually select which node_modules folders to delete."
Tips & Limitations
Always start your cleanup journey with the --dry-run flag. While the tool features built-in safety warnings for sensitive system directories, human error is always a factor when deleting files. If you are cleaning up a machine with many projects, running the tool with --sort=size is highly recommended to prioritize the largest deletions first. Note that deleting node_modules will require you to run npm install or yarn install again if you decide to return to that project later. Finally, use the --delete-all --yes command with extreme caution, as it provides no second chances for recovery.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-ashirbadgudu-npkill": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: file-read, file-write