astahmer/nixfiles/disk-space-cleanup
Claude Code and agent skill by astahmer/nixfiles
- community
Checking that the SKILL.md file is still in the repository.
Audit macOS disk usage and reclaim space safely across Docker and OrbStack, databases, package stores, caches, and workspaces. Use when the user asks to free disk space, investigate low storage, or remove stale development data.
Install
npx vskill@latest install astahmer/nixfiles/disk-space-cleanupSKILL.md
Disk Space Cleanup (macOS)
Audit first, then make the narrowest cleanup that fits the user's request. Read RECIPES.md for concrete commands before inspecting or removing candidates. Recipes cover pnpm/Bun/Nub cache commands, shared virtual store checks, and separately reviewed Docker volume removal.
Workflow
- Measure overall pressure and rank large paths. Include shared reference
clones and Codex session logs in the user-space scan; concrete commands are in RECIPES.md. Record the exact Docker context, workspace, database, volume, cache, or VM image involved.
- Check current processes, ownership, configured storage, service references,
and a usable backup where data could matter. A large size or old timestamp alone does not make something disposable.
- Explain the exact target, expected space reclaimed, and service or rollback
impact. A broad request to audit does not authorize cleanup; follow the user's stated scope for cleanup actions and clarify only when that scope is ambiguous.
- Use confirmation prompts where available and review proposed removals. Use
--force only when the user explicitly authorized the exact scope and daemon context. Do not combine unrelated targets or include volumes in a broad prune.
- Measure the same paths again and check service, container, and workspace
state. Report measured recovery separately from estimates.
Guardrails
- Protect databases, backup repositories, iCloud data, VM disks, JJ workspaces,
Codex sessions and memories, authenticated browser state, and active app data until their owner and recovery path are understood.
- PostgreSQL statistics only cover counters since reset, and activity views
show current connections. Neither proves a database is unused; file mtimes are not a reliable last-use signal.
- Confirm the Docker context before inspection or pruning.
system prunecan
remove stopped containers, unused networks, dangling images, and build cache. --all broadens image removal; --volumes can remove data volumes.
- OrbStack restarts interrupt local containers. State that impact and get
authorization before restarting it. Do not use a privileged helper container as a generic disk-inspection or trim command.
- Treat Nix generations as rollback points. Do not run garbage collection or
remove generations automatically as routine maintenance.
- Prefer an available Nix-backed one-shot tool for diagnostics; do not install
cleanup tools globally just to inspect a disk.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingassets/.agents/skills/disk-space-cleanup/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/astahmer/nixfiles/disk-space-cleanup)