LaunchKit · 2026
Back to Skills

Clean up node_modules and .next folders to free up disk space using npkill.

0
1.8k downloads
by @ashirbadgudu

Setup & Installation

openclaw skills install @ashirbadgudu/npkill

Or with the ClawHub CLI, for registry-managed skill folders outside a full OpenClaw workspace:

npx clawhub install npkill

Version History

v1.0.1Jan 27, 2026 - Version note by skill developer:

Initial release: JavaScript/Next.js build artifact cleanup tool. Safely removes node_modules and .next folders using npkill with interactive selection, safety warnings, and dry-run functionality.

What This Skill Does

npkill scans your filesystem for node_modules and .next folders, displays their sizes, and lets you delete them interactively or automatically. It targets build artifacts that accumulate across JavaScript and Next.js projects over time.

Manually hunting down node_modules with find commands shows no size info and misses nested folders; npkill lists everything with sizes and supports selective deletion in one pass.

When to use it

  • Freeing disk space before a large system update
  • Clearing out old side projects no longer in active development
  • Removing stale .next build caches after upgrading Next.js
  • Finding which projects have the largest node_modules folders
  • Running a weekly cleanup of the local development workspace

Example Workflow

Here's how your AI assistant might use this skill in practice.

INPUT

User asks: Clean up old node_modules folders taking up space on my machine

AGENT
  1. 1Run npkill --dry-run to preview all node_modules folders and their sizes without deleting anything
  2. 2Review the list and identify which projects are safe to clean
  3. 3Run npkill in interactive mode to browse folders and mark selections for deletion
  4. 4Confirm deletions using the interactive interface
OUTPUT

Selected node_modules folders removed, with disk space freed reported per deletion

Requirements

Accounts, API keys, or tools you or your AI assistant may need to set up while using this skill.

npkill CLI installed globally (npm install -g npkill)