run-clean
Clean build artifacts และ cache เพื่อเริ่มต้นใหม่
SKILL.mdrun-clean/SKILL.md
GitHubGoal
Clean build artifacts and cache to start fresh
Scope
Use run-clean for tasks and workflows within its coverage (clean)
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 (clean)
1. Clean Build Artifacts
Goal: Clean Build Artifacts
- Delete the
dist,build,outfolders - Delete
.next,.nuxt,.outputper framework - Delete all compiled files
2. Clean Cache
Goal: Clean Cache
- Delete
node_modules/.cache - Delete
.turbo,.cache - Delete framework-specific cache
- Delete TypeScript cache
3. Clean Dependencies
Goal: Clean Dependencies
- Delete
node_modulesif needed - Delete lock files if needed
- Delete package manager cache
4. Clean Temporary Files
Goal: Clean Temporary Files
- Delete
.DS_Store,Thumbs.db - Delete log files
- Delete temporary directories
- Delete old coverage reports
5. Clean Git
Goal: Clean Git
- Run
git clean -fdxto delete untracked files - Run
git gcto optimize the repository - Delete stale branches if needed
6. Reinstall Dependencies
Goal: Reinstall Dependencies
- Run
bun installor the package manager in use - Verify the dependencies install successfully
- Run build to test
Rules
1. Clean Scope
- Clean only what is necessary
- Back up important data before cleaning
- Never delete source code or config files
2. Dependency Reinstall
- Reinstall dependencies only when necessary
- Use lock files for consistency
- Check package manager compatibility
3. Git Safety
Check git status before cleaning
Commit or stash important changes
Use
--dry-runbeforegit cleanUse /follow-best-practice if needed
Use /suggest-next-action if needed
Use /resolve-errors if needed
Use /run-check if needed
Use /run-verify if needed
Use /run-cleanup if needed
Expected Outcome
- All build artifacts deleted
- All cache deleted
- Temporary files deleted
- Git repository optimized
- Dependencies reinstalled correctly
- Build works after cleaning