Clean up temporary files and repository clutter.
Install
mkdir -p .claude/skills/clean-votruongdanh && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/10220" && unzip -o skill.zip -d .claude/skills/clean-votruongdanh && rm skill.zipInstalls to .claude/skills/clean-votruongdanh
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Clean up junk files, temporary files, AI-generated artifacts, and caches. Use when the user wants to remove unused files, reduce repo clutter, or update .gitignore. Triggers: clean, remove junk, dọn dẹp, xoá file rác, cache.Key capabilities
- →Identify junk files
- →Remove temporary artifacts
- →Update .gitignore
- →Report space recovered
How it works
Scans for junk patterns, presents a list for confirmation, and updates memory files after deletion.
Inputs & outputs
When to use clean
- →Remove build artifacts
- →Clean up temporary cache files
- →Identify and remove unused AI-generated logs
- →Update .gitignore with new patterns
About this skill
Memory Protocol
START: Read .ai-memory.md from project root. Check for known junk patterns, previous cleanup history, and project-specific ignore rules.
END: Update .ai-memory.md using Memory Compaction Rules with: what was cleaned, space recovered, ignore rules added, and recurring patterns.
Goal
Identify and remove unnecessary files generated by AI, build processes, or development tools without affecting the working codebase.
Agent Routing
- If cleanup involves build artifacts/CI → read
.kiro/skills/agents/agents/devops-engineer.mdand apply its knowledge - If cleanup involves security-sensitive files → read
.kiro/skills/agents/agents/security-auditor.mdand apply its knowledge
Socratic Gate
Before cleaning, verify:
- Is the project under version control? (safety check)
- Are there uncommitted changes that could be lost?
- Any specific directories/patterns to preserve? If uncertain, ASK before proceeding.
Workflow
- Read Memory — Load
.ai-memory.mdfor project context and past cleanup history. - Scan the project for common junk file patterns.
- Identify AI-generated files that may be redundant or outdated.
- Present a clear list of files to be removed with sizes and reasons.
- Ask for confirmation before deletion.
- Remove approved files and report space saved.
- Suggest .gitignore updates if needed.
- Update Memory — Save cleanup results and new patterns to
.ai-memory.md.
Common Junk Patterns
- Temporary files:
*.tmp,*.temp,*.bak,*.swp,*~ - Log files:
*.log,*.log.*,debug.log,error.log - Cache directories:
.cache/,__pycache__/,.pytest_cache/,.mypy_cache/ - Build artifacts:
dist/,build/,*.pyc,*.pyo,*.class,*.o - Node modules:
node_modules/(if not needed) - IDE files:
.vscode/,.idea/(if not in .gitignore) - OS files:
.DS_Store,Thumbs.db,desktop.ini - AI artifacts: Duplicate markdown files, unused generated code, test outputs
Safety Rules
- Never delete files in version control (check git status first).
- Never delete configuration files (.env, config.json, etc.) unless explicitly requested.
- Never delete source code without explicit confirmation.
- Always show what will be deleted before proceeding.
- Preserve .gitignore and other dot files unless they're clearly junk.
- Ask before removing entire directories.
- NEVER delete
.ai-memory.md— it is a persistent project memory file.
Output Format
Files to clean:
1. [Category] path/to/file (size) - Reason
2. [Category] path/to/file (size) - Reason
...
Total space to recover: XX MB
Proceed with deletion? (y/n)
Checklist
-
Git status checked for uncommitted changes
-
Junk patterns scanned
-
File list presented with reasons
-
User confirmation received
-
Files removed safely
-
.gitignore updated if needed
-
Memory file updated
-
Clean code chuẩn (Standard clean code applied)
-
Cập nhật đầy đủ tất cả các file liên quan (All related files fully updated)
Quality Gate
After completing, read .kiro/skills/_scripts/checklist.md for cross-cutting quality checks.
Follow-up Actions
- Update .gitignore to prevent future junk accumulation
- Suggest cleanup scripts for recurring patterns
- Recommend build tool configurations to reduce artifacts
Related Skills
/status→ read.kiro/skills/status/SKILL.md— Check project health after cleanup/enhance→ read.kiro/skills/enhance/SKILL.md— Improve remaining code quality
Related Skills
/status— Check project state after cleanup/enhance— Improve project structure
When not to use it
- →Deleting source code without confirmation
Prerequisites
Limitations
- →Requires user confirmation for deletion
- →Cannot delete files in version control
How it compares
Uses a memory protocol to track cleanup history and prevent recurring clutter.
Compared to similar skills
clean side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| clean (this skill) | 0 | 3mo | Review | Beginner |
| setup | 12 | 1mo | No flags | Beginner |
| tmux | 20 | 2mo | Review | Intermediate |
| macos-cleaner | 16 | 2mo | Review | Beginner |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
setup
barefootford
Sets up a Mac for ButterCut. Installs all required dependencies (Homebrew, Ruby, Python, FFmpeg, WhisperX). Use when user says "install buttercut", "set up my mac", "get started", "first time setup", "install dependencies" or "check my installation".
tmux
openclaw
Remote-control tmux sessions for interactive CLIs by sending keystrokes and scraping pane output.
macos-cleaner
daymade
Analyze and reclaim macOS disk space through intelligent cleanup recommendations. This skill should be used when users report disk space issues, need to clean up their Mac, or want to understand what's consuming storage. Focus on safe, interactive analysis with user confirmation before any deletions.
ms365-tenant-manager
alirezarezvani
Microsoft 365 tenant administration for Global Administrators. Automate M365 tenant setup, Office 365 admin tasks, Azure AD user management, Exchange Online configuration, Teams administration, and security policies. Generate PowerShell scripts for bulk operations, Conditional Access policies, license management, and compliance reporting. Use for M365 tenant manager, Office 365 admin, Azure AD users, Global Administrator, tenant configuration, or Microsoft 365 automation.
agent-workflow-automation
ruvnet
Agent skill for workflow-automation - invoke with $agent-workflow-automation
tmux-terminal
mikeyobrien
Interactive terminal control via tmux for TUI apps, prompts, and long-running CLI workflows.