Use when creating a new project folder, starter pack, app scaffold, or agent-ready workspace — AGENTS.md, README, TASKS, DECISIONS, PROMPTS, an idempotent bootstrap script, and starter-pack modes.
中文简介正在准备中。当前显示原文说明。
Safely clean regenerable clutter from a project folder by scanning for build artifacts and caches, backing up every removed path into a timestamped archive with a BACKUP.md manifest, zipping the backup to save space, and only deleting originals after explicit confirmation. Use when the user asks to clean a project directory, remove node_modules, clear build output, reclaim disk space, or tidy a repo before archiving.
中文简介正在准备中。当前显示原文说明。
查看安装方法安装前可以查看交给 AI 代理的指令内容。
Remove regenerable clutter from a project folder without losing data. Every targeted path is copied into a backup first, documented in BACKUP.md, compressed into a zip archive, and only then removed from the project when explicitly confirmed.
node_modules, build folders, caches, or logs from a projectDo not use it for general file organization across the whole computer — that's out of scope for this skill.
--dry-run until the plan is approved.zip, drop uncompressed folder by defaultBACKUP.md inside the backup explains what, why, and how to restoreRead Safety Rules before every run.
Confirm the project root path. Do not run from $HOME unless the user explicitly wants home-level cleanup.
node scripts/scan-cleanup-candidates.mjs /path/to/project --json
Or human-readable:
node scripts/scan-cleanup-candidates.mjs /path/to/project
Review output with the user. Compare against Default Cleanup Targets. Add or remove paths based on user preference.
git -C /path/to/project status --short
Warn if targeted paths overlap with uncommitted work the user may care about.
node scripts/cleanup-with-backup.mjs --project /path/to/project --dry-run
Optional custom manifest:
node scripts/cleanup-with-backup.mjs \
--project /path/to/project \
--targets /tmp/cleanup-targets.json \
--dry-run
cleanup-targets.json example:
{
"items": [
{ "path": "node_modules", "category": "JavaScript deps", "reason": "npm install" },
{ "path": ".next", "category": "Next.js build", "reason": "npm run build" }
]
}
Present the dry-run summary and wait for explicit approval.
Run without --dry-run. Omit --confirm on the first execution pass so originals stay in place until backup is verified:
node scripts/cleanup-with-backup.mjs --project /path/to/project
This creates:
/path/to/project/.project-cleanup-backups/
2026-05-25T12-30-00-000Z-my-app.zip # contains BACKUP.md + files/
2026-05-25T12-30-00-000Z-my-app-SUMMARY.md
Open the zip and confirm BACKUP.md lists every path correctly.
Only after the user verifies the archive:
node scripts/cleanup-with-backup.mjs --project /path/to/project --confirm
If backup already exists from step 5, pass the same --targets file if used.
.project-cleanup-backups/ to .gitignore if not already ignoredBACKUP.md in the archive)BACKUP.md from template (do not paste template into chat)Inside the zip:
2026-05-25T...-project-name/
├── BACKUP.md # What was removed, why, restore commands
└── files/ # Mirror of removed paths relative to project root
├── node_modules/
└── .next/
| Flag | Purpose |
|---|---|
--dry-run | Show plan only |
--confirm | Delete originals after successful backup + zip |
--targets <json> | Custom manifest instead of default scan |
--backup-root <path> | Store backups outside the project |
--keep-uncompressed | Keep folder after zipping |
.venv removed — add to manifest explicitly; warn about reinstall timeIf a cleanup run produces wrong targets, bad manifest text, or restore instructions that fail, update this skill (not just the one-off output) when the fix is general and durable.
还没有评价。欢迎分享你的使用感受。
无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。
还没有评论。来写第一条吧。
Use when creating a new project folder, starter pack, app scaffold, or agent-ready workspace — AGENTS.md, README, TASKS, DECISIONS, PROMPTS, an idempotent bootstrap script, and starter-pack modes.
中文简介正在准备中。当前显示原文说明。
Use when designing or implementing states for AI agent tasks, background jobs, local model runs, queues, and notifications — one shared set of states, only legal transitions, and a recovery path out of every failure.
中文简介正在准备中。当前显示原文说明。
Use when exposing app features to App Intents, Shortcuts, Siri, Spotlight, widgets, controls, or system actions — small safe AppIntents, AppShortcutsProvider, AppEnum/AppEntity, parameters, and open-vs-background behavior.
中文简介正在准备中。当前显示原文说明。
Use when designing, reviewing, or implementing a command-palette / ⌘K layer for an Apple-platform app — keyboard-first global search, ranked and grouped results, native floating panel, and protected destructive commands.
中文简介正在准备中。当前显示原文说明。
Use when designing or implementing empty, first-run, no-result, offline, error, or waiting states in Apple-platform apps — every empty state explains what is missing, why it matters, and what to do next.
中文简介正在准备中。当前显示原文说明。
Use when designing or implementing feedback, status, progress, alerts, errors, success states, and live activity indicators in Apple-platform apps — inline status, banners, alerts, notifications, and loading states.
中文简介正在准备中。当前显示原文说明。