openclaw 网盘下载
OpenClaw

技能详情(站内镜像,无评论)

首页 > 技能库 > 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 …

开发与 DevOps

许可证:MIT-0

MIT-0 ·免费使用、修改和重新分发。无需归因。

版本:v1.0.1

统计:⭐ 0 · 1.9k · 0 current installs · 0 all-time installs

0

安装量(当前) 0

🛡 VirusTotal :可疑 · OpenClaw :良性

Package:ashirbadgudu/npkill

安全扫描(ClawHub)

  • VirusTotal :可疑
  • OpenClaw :良性

OpenClaw 评估

The skill's instructions and requirements are internally consistent: it documents use of the npkill CLI to find and delete node_modules/.next folders, asks the user to install npkill via npm, and does not request unrelated credentials or system access.

目的

The name/description (cleaning node_modules and .next) matches the instructions (run npkill, options for target, dry-run, directory, exclusion). Requiring the npkill CLI (via npm) is appropriate for this purpose. The SKILL.md does not ask for unrelated credentials or system services.

说明范围

Instructions are narrowly scoped to searching for and deleting build artifact folders and include safety recommendations (dry-run, interactive, exclusions, warnings). The only risk in the instructions is the documented automated delete option (--delete-all --yes), which is destructive by design; the skill advises using dry-run and interactive modes first.

安装机制

This is an instruction-only skill with no install spec, so it does not itself write code to disk. It instructs users to run `npm install -g npkill` to obtain the CLI. Installing a global npm package is a standard approach but does pull code from the npm registry — verify the package name, publisher, and version before installing (source/homepage in the skill metadata is unknown).

证书

No environment variables, credentials, or config paths are requested in the skill or SKILL.md, which is proportional for a local filesystem cleanup tool.

持久

The skill is not marked always:true and does not request persistent or cross-skill configuration. It does not ask to modify other skills or system-wide agent settings.

综合结论

This skill appears coherent and does what it says — it is a wrapper documenting use of the npkill CLI. Before installing or running anything: 1) verify the npm package (npkill) publisher and version on the npm registry to ensure you get the official tool; 2) run `npkill --dry-run` and use interactive mode before any automated deletion; 3) be careful with `--directory` and `--delete-all --yes` since they can delete large sets of folders; 4) ins…

安装(复制给龙虾 AI)

将下方整段复制到龙虾中文库对话中,由龙虾按 SKILL.md 完成安装。

请把本段交给龙虾中文库(龙虾 AI)执行:为本机安装 OpenClaw 技能「NPkill」。简介:Clean up node_modules and .next folders to free up disk space using npkill. Spe…。
请 fetch 以下地址读取 SKILL.md 并按文档完成安装:https://raw.githubusercontent.com/openclaw/skills/refs/heads/main/skills/ashirbadgudu/npkill/SKILL.md
(来源:yingzhi8.cn 技能库)

SKILL.md

打开原始 SKILL.md(GitHub raw)

---
name: npkill
description: 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.
---

# NPkill - Node.js and Next.js Build Artifact Cleaner

This skill leverages the npkill tool to clean up node_modules and .next folders that accumulate over time from JavaScript and Next.js development, freeing up significant disk space.

## Purpose

This skill addresses a common problem faced by JavaScript and Next.js developers: accumulation of large build artifact folders (node_modules, .next) that consume significant disk space over time. It provides a safe and efficient way to identify and remove these unnecessary folders.

## When to Use This Skill

Use this skill when:
- Your disk space is running low due to accumulated node_modules folders
- You want to clean up old Next.js build artifacts (.next folders)
- You need to maintain a clean development environment
- You want to identify which projects are consuming the most disk space
- You want to perform regular maintenance on your development workspace

## Core Commands

### Interactive Cleanup (Recommended)
```bash
npkill
```
Launches the interactive interface to browse and selectively delete node_modules folders. This is the safest method as it allows you to review each folder before deletion.

### Target .next Folders Specifically
```bash
npkill --target .next
```
Search specifically for .next folders (used by Next.js projects) instead of node_modules.

### Dry Run (Always Recommended First)
```bash
npkill --dry-run
```
Simulates the operation without actually deleting anything. Shows what would be deleted.

### Automated Cleanup (Use with Caution)
```bash
npkill --delete-all --yes
```
Automatically deletes all node_modules folders found. Use only after verifying with dry-run.

### View Sizes in Gigabytes
```bash
npkill --gb
```
Shows folder sizes in gigabytes instead of megabytes for easier reading.

### Scan from Specific Directory
```bash
npkill --directory /path/to/search/from
```
Starts searching from a specific directory instead of current directory.

## Safety Features

- **Warnings for Protected Directories**: npkill highlights system/app directories that shouldn't be deleted with a ⚠️ symbol
- **Interactive Confirmation**: Manual selection required in interactive mode
- **Dry-run Option**: Preview changes before executing any deletions
- **Exclusion Options**: Ability to exclude specific directories from scanning

## Common Use Cases for Next.js Developers

### Clean .next Folders Safely
```bash
# First, preview what would be deleted
npkill --target .next --dry-run

# Then, if satisfied with the preview, run interactively
npkill --target .next
```

### Regular Maintenance
```bash
# Run interactive cleanup to review and selectively delete
npkill
```

### Check Disk Usage
```bash
# View all node_modules folders sorted by size
npkill --sort=size
```

## Best Practices

1. **Always run with --dry-run first** to see what would be deleted
2. **Review warnings carefully** about protected directories marked with ⚠️
3. **Use interactive mode** for safer selective deletion
4. **Consider excluding important project directories** using --exclude if needed
5. **Schedule regular cleanup** to prevent massive accumulation

## Installation Requirements

This skill requires the npkill CLI tool to be installed globally:
```bash
npm install -g npkill
```

## Limitations

- Requires npkill to be installed separately
- May not detect all protected system directories in all environments
- Interactive mode requires terminal with arrow key support