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.zip

Installs 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.
224 chars✓ has a “when” trigger
Beginner

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

You give it
Project directory
You get back
Cleaned directory and report

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.md and apply its knowledge
  • If cleanup involves security-sensitive files → read .kiro/skills/agents/agents/security-auditor.md and apply its knowledge

Socratic Gate

Before cleaning, verify:

  1. Is the project under version control? (safety check)
  2. Are there uncommitted changes that could be lost?
  3. Any specific directories/patterns to preserve? If uncertain, ASK before proceeding.

Workflow

  1. Read Memory — Load .ai-memory.md for project context and past cleanup history.
  2. Scan the project for common junk file patterns.
  3. Identify AI-generated files that may be redundant or outdated.
  4. Present a clear list of files to be removed with sizes and reasons.
  5. Ask for confirmation before deletion.
  6. Remove approved files and report space saved.
  7. Suggest .gitignore updates if needed.
  8. 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

.ai-memory.md

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.

SkillInstallsUpdatedSafetyDifficulty
clean (this skill)03moReviewBeginner
setup121moNo flagsBeginner
tmux202moReviewIntermediate
macos-cleaner162moReviewBeginner

Try saying

Example prompts that trigger this skill in your AI assistant.

Search skills

Search the agent skills registry