Logo Free My Disk

Free My Disk

Cộng đồng
wquguru
free-my-disk

Safely audit and reclaim disk space on macOS and Ubuntu/Linux hosts, including remote servers over SSH. Use when the user says their Mac, Linux box, VPS, or server disk is full, asks what can be safely deleted, wants to clean caches, developer artifacts, Docker storage, apt/Homebrew/npm/pnpm/yarn/pip/uv caches, journal/log files, Xcode data, editor extensions, node_modules, Trash, crontab/systemd timer disk checks, or asks for a repeatable free-space cleanup workflow.

Add to TypingMind

Tổng quan

Nhà phát hànhwquguru
Kho mãskills
Tên kỹ năngfree-my-disk
Sao
94
Bản fork
7
Tệp đi kèm
3
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 3 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được wquguru công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Free My Disk trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/wquguru/skills/tree/main/skills/free-my-disk
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/wquguru/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/skills/free-my-disk .claude/skills/free-my-disk
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Free My Disk trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Free My Disk ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Free My Disk với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

Free My Disk

Core Rule

Prefer a read-only audit before deleting anything. Classify findings into safety tiers, explain likely impact, and only delete after the user clearly asks to clean. Never delete personal documents, project archives, photos, mail, source repositories, Docker volumes, databases, app containers, or production data unless the user explicitly names them.

Quick Audit

Detect the platform first:

bash
uname -a
df -h /

For macOS, run the bundled read-only script first when possible:

bash
bash scripts/audit_macos_disk.sh

Use PROJECT_SCAN=1 bash scripts/audit_macos_disk.sh to include common project roots such as ~/projects, ~/code, ~/src, and ~/work. Use FULL_SCAN=1 bash scripts/audit_macos_disk.sh only when the user wants a deeper scan and the disk has enough free space for a slower traversal.

For Ubuntu/Linux, run the bundled read-only script first when possible:

bash
bash scripts/audit_linux_disk.sh

Use PROJECT_SCAN=1 bash scripts/audit_linux_disk.sh to include common user and project roots such as ~/projects, ~/code, ~/src, ~/work, and /opt. Use FULL_SCAN=1 bash scripts/audit_linux_disk.sh only when the user wants a deeper scan.

For a remote host, replace my-server with the actual hostname or SSH config alias, then copy or stream the script over SSH:

bash
ssh my-server 'bash -s' < scripts/audit_linux_disk.sh
ssh my-server 'PROJECT_SCAN=1 bash -s' < scripts/audit_linux_disk.sh

If the script is not suitable, gather the same facts manually:

bash
df -h /
du -sh ~/Library/Caches ~/.npm ~/.pnpm-store ~/.yarn ~/.cache ~/Library/Logs ~/.Trash 2>/dev/null
du -sh ~/Library/Containers/com.docker.docker ~/Library/Developer ~/Downloads 2>/dev/null
find ~ -xdev -type f -size +1G -print 2>/dev/null | head -100

On Linux, prefer these manual checks:

bash
df -h /
df -ih /
sudo du -xhd 1 / 2>/dev/null | sort -h | tail -30
du -sh ~/.cache ~/.npm ~/.pnpm-store ~/.yarn ~/.cache/pip ~/.local/share/uv ~/.local/share/Trash 2>/dev/null
sudo journalctl --disk-usage 2>/dev/null || true
docker system df 2>/dev/null || true
find "$HOME" -xdev -type f -size +1G -print 2>/dev/null | head -100

Use du -xhd 1 <dir> | sort -h | tail for large directories. Prefer targeted scans over full-home scans when the disk is very full. On remote Linux servers, include inode pressure with df -ih /; many tiny logs or cache files can fill inodes before bytes.

Safety Tiers

Treat these as usually safe to clean on macOS:

  • Homebrew old versions and cache: brew cleanup, then optionally remove ~/Library/Caches/Homebrew/*.
  • Package manager caches: npm cache clean --force, pnpm store prune, yarn cache clean.
  • Reinstallable dependencies the user names: node_modules, .venv, build outputs, .next, dist, target.
  • User logs: files under ~/Library/Logs.
  • Trash: ~/.Trash, only after confirming nothing important is there.

Treat these as usually safe to clean on Ubuntu/Linux:

  • Apt package cache: sudo apt-get clean and sudo apt-get autoclean.
  • Unused distro packages: sudo apt-get autoremove --purge, after reviewing the package list.
  • Package manager caches: npm cache clean --force, pnpm store prune, yarn cache clean, pip cache purge, uv cache clean.
  • Systemd journal vacuuming by size or time, for example sudo journalctl --vacuum-time=14d or sudo journalctl --vacuum-size=500M.
  • Reinstallable dependencies the user names: node_modules, .venv, build outputs, .next, dist, target.
  • User trash and caches: ~/.local/share/Trash and ~/.cache, after checking they are not application state.

Treat these as safe but with workflow impact:

  • VS Code/Cursor extensions under ~/.vscode/extensions and ~/.cursor/extensions; deleting them uninstalls extensions.
  • Xcode DerivedData and simulator caches; deleting them slows the next build or simulator boot.
  • Python/uv/pip caches and tool environments; deleting them may require reinstalling tools.
  • Agent or editor histories such as .claude/projects, .codex/sessions, .cursor/projects; deleting them may remove local history.
  • Large rotated logs under /var/log; truncate or rotate named logs rather than deleting active log files.
  • Snap, Flatpak, conda, and language runtime caches; deleting them may require redownloading packages or rebuilding environments.

Treat these as high impact:

  • Docker Desktop Docker.raw: never delete directly. Use Docker prune commands and Docker Desktop compaction/reset behavior.
  • Docker volumes: do not run docker volume prune unless the user explicitly accepts losing persistent container data. On servers, assume volumes may contain databases, Grafana/InfluxDB state, uploads, or other service data.
  • ~/Downloads, project archives, media, iCloud Drive, Mail, Photos libraries, and app containers: report size and ask.
  • APFS local snapshots: report them, but avoid deleting snapshots unless the user explicitly asks and understands the backup/update implications.
  • Linux service data under /var/lib, /srv, /opt, /home/*, database directories, backups, and container bind mounts: report size and ask before changing.
  • Kernel or boot cleanup under /boot: prefer package-manager removal of old kernels; do not manually delete kernel files unless recovering from a blocked package manager and the user accepts the risk.

Remote Linux Example

Treat remote servers as production-like Ubuntu/Linux hosts unless the user says otherwise. In examples, replace my-server with the actual hostname or SSH config alias.

  1. Start read-only and capture host pressure:
bash
ssh my-server 'df -h /; df -ih /; uname -a; sudo journalctl --disk-usage 2>/dev/null || true; docker system df 2>/dev/null || true'
  1. Run the Linux audit script:
bash
ssh my-server 'PROJECT_SCAN=1 bash -s' < scripts/audit_linux_disk.sh
  1. For a large root filesystem, inspect one level at a time:
bash
ssh my-server 'sudo du -xhd 1 / 2>/dev/null | sort -h | tail -30'
ssh my-server 'sudo du -xhd 1 /var 2>/dev/null | sort -h | tail -30'
  1. Clean low-risk server candidates first when asked:
bash
ssh my-server 'sudo apt-get clean && sudo apt-get autoclean'
ssh my-server 'sudo journalctl --vacuum-time=14d'
ssh my-server 'docker system prune -af && docker builder prune -af && docker system df'

Skip docker volume prune, /var/lib/docker/volumes, database directories, and application data unless the user explicitly accepts losing or rebuilding that data.

Scheduled Monitoring

Do not create or edit crontab, launchd jobs, systemd timers, or Codex automations unless the user asks for scheduled monitoring or cleanup. Default scheduled jobs to read-only audit/reporting. Do not schedule destructive cleanup commands such as rm -rf, docker system prune, docker volume prune, apt-get autoremove, or journal vacuuming unless the user explicitly accepts the exact command, cadence, and impact.

Before adding a schedule, ask concise questions. If an interactive user-input tool such as AskUserQuestion or request_user_input is available, use it; otherwise ask in chat:

  • Target: local macOS, local Linux, or remote SSH host?
  • Mode: read-only audit/report only, or user-approved low-risk cleanup?
  • Cadence and output: daily/weekly/monthly, preferred time, log path, and alert threshold?

For Linux servers, prefer a report-only crontab entry with absolute paths and a dedicated log directory:

bash
mkdir -p "$HOME/.local/state/free-my-disk"
crontab -l > /tmp/free-my-disk.cron 2>/dev/null || true
grep -v 'free-my-disk audit' /tmp/free-my-disk.cron > /tmp/free-my-disk.new
printf '0 8 * * * PROJECT_SCAN=1 /absolute/path/to/audit_linux_disk.sh >> "$HOME/.local/state/free-my-disk/audit.log" 2>&1 # free-my-disk audit\n' >> /tmp/free-my-disk.new
crontab /tmp/free-my-disk.new
rm /tmp/free-my-disk.cron /tmp/free-my-disk.new

For macOS, prefer scheduled audit logs with launchd only if the user wants persistent local scheduling; otherwise run the audit on demand. For remote hosts, install the schedule on the remote host only after confirming the SSH target and where logs should live.

Cleanup Workflow

  1. State current free space from df -h /.
  2. Report candidates by tier with sizes and impact.
  3. Clean low-risk macOS caches first when asked:
bash
brew cleanup
npm cache clean --force
pnpm store prune
yarn cache clean
  1. Remove user-named reinstallable directories with rm -rf only after repeating the exact paths.
  2. For Docker, start Docker Desktop if needed, then run:
bash
docker system prune -af
docker builder prune -af
docker system df

Skip docker volume prune -f unless the user explicitly requests volume deletion.

  1. On Ubuntu/Linux, clean low-risk system caches first when asked:
bash
sudo apt-get clean
sudo apt-get autoclean
sudo apt-get autoremove --purge
sudo journalctl --vacuum-time=14d
npm cache clean --force
pnpm store prune
yarn cache clean
pip cache purge
uv cache clean

Review apt-get autoremove output before accepting removal if the host is production-like.

  1. Recheck:
bash
df -h /
df -ih /
docker system df 2>/dev/null || true

Summarize what was cleaned, what was intentionally skipped, the new free-space number, and any follow-up impact such as reinstalling editor extensions or dependencies.

Tệp đi kèm

Khi kỹ năng đã được tải, mô hình có thể đọc các tệp này nếu cần. Các tệp này chỉ dùng để đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Free My Disk làm được gì?

Safely audit and reclaim disk space on macOS and Ubuntu/Linux hosts, including remote servers over SSH. Use when the user says their Mac, Linux box, VPS, or server disk is full, asks what can be safely deleted, wants to clean caches, developer artifacts, Docker storage, apt/Homebrew/npm/pnpm/yarn/pip/uv caches, journal/log files, Xcode data, editor extensions, node_modules, Trash, crontab/systemd timer disk checks, or asks for a repeatable free-space cleanup workflow.

Vì sao nên dùng Free My Disk trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Free My Disk là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Free My Disk trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/wquguru/skills/tree/main/skills/free-my-disk. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm rồi cài đặt cả gói dưới dạng một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Free My Disk?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Free My Disk với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Free My Disk với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Free My Disk có miễn phí không?

Kỹ năng này được wquguru phát hành trên GitHub. Hãy xem điều khoản giấy phép trong kho mã. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇