Description
Clean temporary files, caches, and build artifacts in the project.
Trigger Conditions
- "Clean temporary files"
- "Clear cache"
- 「clean」
- Cleanup step at the end of the Workflow
Cleanup Targets
Python Project
# Byte-compiled files
__pycache__/
*.py[cod]
*$py.class
Distribution
dist/ build/ *.egg-info/
Virtual Environment.venv/ venv/
Cache.pytest_cache/ .mypy_cache/ .ruff_cache/
Coverage.coverage htmlcov/
### Node.js 專案
```bash
# Dependencies (可選)
node_modules/
# Build
dist/
build/
.next/
# Cache
.cache/
.npm/
.eslintcache
# Coverage
coverage/
General
# IDE
.idea/
.vscode/settings.json (保留基本設定)
# OS
.DS_Store
Thumbs.db
# Logs
*.log
logs/
# Temp
tmp/
temp/
*.tmp
Safety Mechanisms
Protected List (will not be deleted)
.git/node_modules/(must be explicitly specified).venv/(must be explicitly specified)memory-bank/- Any source code file
Confirmation Mechanism
⚠️ 即將刪除以下項目:
📁 __pycache__/ (15 個檔案, 234 KB)
📁 .pytest_cache/ (8 個檔案, 12 KB)
📄 *.pyc (23 個檔案, 156 KB)
總計:46 個項目, 402 KB
確認刪除?[y/N]
Output Format
🧹 清理報告
═══════════════════════════════════════
清理的項目:
✅ __pycache__/ - 15 個檔案
✅ .pytest_cache/ - 8 個檔案
✅ *.pyc - 23 個檔案
⏭️ node_modules/ - 已跳過(需明確指定)
═══════════════════════════════════════
📊 統計:
- 刪除檔案:46 個
- 釋放空間:402 KB
- 保留項目:3 個
✅ 清理完成!
Usage Example
「清理暫存檔」
「clean --all」 # 包含 node_modules
「清理 Python 快取」