run-cleanup
รัน cleanup tasks เพื่อลบ build artifacts และ cache
SKILL.mdrun-cleanup/SKILL.md
GitHubGoal
Run cleanup
Scope
Use run-cleanup for tasks and workflows within its coverage (cleanup)
Execute
Pre-Run: Always check for locked files first —
run-*requires review/assessment before the main action, never skip; if findings are blockers, fix or report them before running (cleanup)
1. Identify Cleanup Targets
Goal: Identify the artifacts and cache to delete
- Read
.gitignoreto find ignored paths that are build artifacts - Identify targets per language/stack:
- Node.js:
node_modules/,dist/,.nuxt/,.next/,.turbo/ - Rust:
target/ - Python:
__pycache__/,.pytest_cache/,*.pyc - Go:
vendor/,bin/ - General:
.cache/,coverage/,*.log
- Node.js:
- If there are stale branches or worktrees → run
/cleanup-git-branchor/cleanup-worktree
2. Run Cleanup
Goal: Delete artifacts safely
- Delete build artifacts with the appropriate commands (
rm -rf,cargo clean,bun pm cache rm, etc.) - If system-wide cleanup is needed → run
/cleanup-files-in-computer - If project cleanup is needed → run
/cleanup-files-in-project - If files are locked → close the locking processes, then retry deletion
3. Verify
Goal: Confirm cleanup succeeded
- Verify the targets have been deleted
- Run
/run-checkto confirm the project still works - Run
/run-verifyif full verification is needed - Run
/reportto show the deleted artifacts and reclaimed space
Rules
- Delete only artifacts listed in
.gitignoreor that are build output - Never delete source files, config, or user data
- If files are locked → resolve the locks before deleting
- Use
/cleanup-files-in-computerfor system cleanup - Use
/cleanup-files-in-projectfor project cleanup - Use
/cleanup-git-branchfor branch cleanup - Use
/suggest-next-actionafter finishing to recommend the next step - Use /run-clean if needed
Expected Outcome
- Build artifacts and cache deleted
- Disk space reclaimed
- Project still works after cleanup
- Report of deleted artifacts and reclaimed space