disk-cleaner
Cross-platform disk space management toolkit with intelligent optimization. REQUIREMENTS: Python 3.7+. UNIVERSAL COMPATIBILITY: Works with ALL AI IDEs (Cursor, Windsurf, Continue, Aider, Claude Code, etc.). PLATFORM-INDEPENDENT: Works at any location - global, project, or user level. SELF-CONTAINED: No pip install needed, includes intelligent bootstrap. KEY FEATURES: (1) PROGRESSIVE SCANNING: Quick sample (1s) + Progressive mode for large disks, (2) INTELLIGENT BOOTSTRAP: Auto-detection of skill location and auto-import of modules, (3) CROSS-PLATFORM ENCODING: Safe emoji/Unicode handling on all platforms, (4) DIAGNOSTIC TOOLS: check_skill.py for quick verification, (5) OPTIMIZED SCANNING: 3-5x faster with os.scandir(), concurrent scanning, intelligent sampling. AGENT WORKFLOW: (1) Check Python, (2) Find skill package (20+ locations auto-detected), (3) Run diagnostics, (4) Use progressive scanning for large disks. The skill package includes all optimization modules - no features are lost!
What this skill does
# Disk Cleaner Skill - Complete Feature Guide for All Agents
## ๐จ IMPORTANT: Emoji Usage Policy
### For Script Output (Cross-Platform Safety)
- **NEVER use emoji in script output** - All scripts use ASCII-safe characters
- Scripts use: `[OK]`, `[X]`, `[!]`, `[*]`, `[i]`, `[DIR]`, `[FILE]`, `[PKG]`, `[x]`
- This ensures compatibility with Windows GBK and other non-UTF-8 consoles
- **DO NOT modify script output to add emoji** - This will break cross-platform compatibility
### For Agent-to-Human Communication (Recommended)
- **SHOULD use emoji when reporting results to humans** - Makes output more readable
- Use these emoji in your final reports to users:
- `โ
` (Success) - Completed operations, successful scans
- `โ` (Error) - Failed operations, critical errors
- `โ ๏ธ` (Warning) - Warnings, issues that need attention
- `๐` (Scanning) - Search/scan operations
- `๐` (Statistics) - Analysis results, statistics
- `๐` (Directory) - Directory-related information
- `๐ฆ` (Package) - Package/module information
- `๐` (Success) - Celebratory messages for successful completion
- `๐จ` (Critical) - Critical warnings
- `๐ก` (Tip) - Suggestions, recommendations
- `๐` (List) - Checklists, summaries
- `๐ง` (Tool) - Tools, utilities
- `๐` (Global) - Cross-platform, universal features
- `๐ก๏ธ` (Safety) - Safety-related information
- `โก` (Performance) - Performance improvements
- `๐` (Document) - Documentation
- `๐` (Learning) - Educational content
- `๐` (Support) - Help, support information
- `๐` (Growth) - Improvements, gains
- `๐ฏ` (Target) - Goals, objectives
- `๐` (Launch) - Quick start, fast operations
- `๐ ๏ธ` (Tools) - Tool-related features
**Example:**
```
Script output (ASCII): [OK] Scan completed: 50,000 files in 30 seconds
Your report to human: โ
Scan completed successfully! Found 50,000 files in 30 seconds
```
---
## ๐ฆ COMPLETE FEATURE LIST (READ THIS FIRST!)
### ๐จ CRITICAL: Progressive Scanning (MANDATORY for Large Disks)
- โ
**Quick Sample Mode**: 1-second estimation of disk size and scan time
- โ
**Progressive Scan Mode**: Get partial results in 30 seconds for large disks
- โ
**Smart Time Limits**: Prevent users from waiting hours
- โ
**Real-time Feedback**: Progress updates every 2 seconds
- โ
**Interruptible**: Ctrl+C to get partial results
### ๐ง Intelligent Bootstrap (Auto-Detection & Import)
- โ
**Auto Location Detection**: Searches 20+ common skill package locations
- โ
**Environment Variable Support**: DISK_CLEANER_SKILL_PATH override
- โ
**Auto Module Import**: Automatically imports diskcleaner modules
- โ
**Fallback Mechanisms**: Works even if some features unavailable
- โ
**Cross-Platform Python Detection**: Tries both 'python' and 'python3'
### ๐ Universal Compatibility
- โ
**All AI IDEs**: Cursor, Windsurf, Continue, Aider, Claude Code, etc.
- โ
**All Platforms**: Windows, macOS, Linux (including Windows GBK console)
- โ
**All Installation Levels**: Global, project, user level
- โ
**No Configuration Needed**: Works out of the box
- โ
**Cross-Platform Encoding**: All scripts use ASCII-safe output (v2.0+)
### ๐ก๏ธ Safety & Reliability
- โ
**Diagnostic Tool**: check_skill.py - verifies all functionality
- โ
**Safe Encoding**: All scripts use ASCII characters (no emoji in output)
- โ
**Safe Defaults**: --dry-run for cleaning, smart limits for scanning
- โ
**Protected Paths**: Never deletes system directories or executables
- โ
**Error Handling**: Graceful degradation on errors
- โ
**GBK/UTF-8 Compatible**: Works on Windows GBK, UTF-8, and all other encodings
### โก Performance Optimizations (ALL INCLUDED)
- โ
**QuickProfiler**: Fast sampling to estimate scan characteristics
- โ
**ConcurrentScanner**: Multi-threaded I/O for 3-5x speedup
- โ
**os.scandir() Optimization**: 3-5x faster than Path.glob
- โ
**IncrementalCache**: Cache scan results for faster repeat scans
- โ
**Memory Monitoring**: Auto-adapts based to available memory
- โ
**Early Stopping**: Configurable file/time limits
- โ
**Enhanced Cache Detection**: 26+ cache paths (was 8) - 225% improvement
### ๐ v2.2+ New Features
- โ
**Duplicate File Detection**: Find and remove duplicate files with adaptive strategies
- โ
**Growth Trend Analysis**: Track disk usage over time, predict when disk will be full
- โ
**Interactive Wizard**: Step-by-step guided cleanup with safety confirmations
- โ
**File Organization**: Intelligent file archival and organization (4 strategies)
- โ
**Enhanced Scan Limits**: 500K files (was 50K), 120s timeout (was 30s)
- โ
**Deep Scan Mode**: `--deep-scan` for unlimited scanning
- โ
**Windows Directory Support**: `--include-windows` for system directory scanning
### ๐ Available Scripts (13+ Total)
**Core Analysis:**
1. **analyze_disk.py** - Disk analysis with smart sampling (enhanced v2.2)
2. **analyze_progressive.py** - Progressive scanning for large disks
3. **find_duplicates.py** - Duplicate file detection (NEW v2.2)
4. **analyze_growth.py** - Growth trend analysis (NEW v2.2)
**Cleaning & Organization:**
5. **clean_disk.py** - Safe junk file cleaning (enhanced cache detection)
6. **interactive_wizard.py** - Interactive guided cleanup (NEW v2.2)
7. **organize_files.py** - File archival and organization (NEW v2.2)
**Monitoring & Diagnostics:**
8. **monitor_disk.py** - Disk usage monitoring
9. **check_skill.py** - Diagnostic tool
**Developer Tools:**
10. **skill_bootstrap.py** - Intelligent bootstrap module
11. **package_skill.py** - Package creation tool
12. **scheduler.py** - Automated scheduling
### ๐ Multi-Agent Acceleration (CRITICAL FOR PERFORMANCE)
**๐ฏ KEY INSIGHT: Use Sub-Agents for Parallel Processing**
This is one of the MOST POWERFUL features of disk-cleaner when used by AI Agents!
#### Why Use Multiple Agents?
Single-threaded scanning:
```
Agent scans โ [Dir1] โ [Dir2] โ [Dir3] โ ... (sequential, slow)
```
Multi-Agent parallel scanning:
```
Main Agent
โโ Sub-Agent-1 scans โ [Dir1, Dir2, Dir3] (parallel)
โโ Sub-Agent-2 scans โ [Dir4, Dir5, Dir6] (parallel)
โโ Sub-Agent-3 scans โ [Dir7, Dir8, Dir9] (parallel)
Result: 3-10x faster! โก
```
#### When to Use Multi-Agent Mode?
โ
**ALWAYS use when:**
- Scanning multiple top-level directories (e.g., C:\, D:\, E:\)
- Cleaning multiple user profiles
- Processing large file sets (>100K files)
- Time-critical operations
โ **Don't use when:**
- Single small directory (<10K files)
- Quick analysis (<30 seconds)
- Simple cleanup tasks
#### How to Implement Multi-Agent Scanning
**Option 1: Use Agent Tool (Recommended for Claude Code)**
```python
# Agent code that spawns sub-agents
from anthropic import Anthropic
def parallel_scan_directories(directories_list):
"""
Scan multiple directories in parallel using sub-agents
"""
# Split directories among sub-agents (3-5 agents optimal)
chunks = split_list(directories_list, n_chunks=3)
# Launch sub-agents in parallel
agents = []
for i, chunk in enumerate(chunks):
agent = Anthropic().agent.create(
name=f"scanner-{i}",
instructions=f"""
Scan these directories: {chunk}
Use disk-cleaner with: --file-limit 50000 --time-limit 60
Return results in JSON format
""",
model="claude-sonnet-4-20250514" # Fast model
)
agents.append(agent)
# Wait for all agents and collect results
results = [agent.wait() for agent in agents]
return merge_results(results)
```
**Option 2: Parallel Subprocess (Platform Independent)**
```python
import subprocess
from concurrent.futures import ThreadPoolExecutor, as_completed
def parallel_scan_subprocess(directories_list):
"""
Scan multiple directories using parallel subprocess calls
Works with ALL AI IDEs that support subprocess
"""
def scan_directory(directory):
"""Scan a single directory"""
cmd = [
'python',
'skills/disk-cleaner/scripts/analyze_disRelated in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts โ single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score โฅ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.