mcpField
D
disk-usage

disk-usage

github.com/ukgovernmentbeisCloud & DevOps3.1k84 installsUpdated today
Repository

About disk-usage

disk-usage is a skill for analyzing disk space and filesystem usage on Linux, for people diagnosing storage issues. It provides a command-based workflow from mount overviews to directory and large-file investigation.

Key features

  1. 01Inspect filesystem and inode usage
  2. 02Review mounts and block devices
  3. 03Analyze space by directory depth
  4. 04Find and sort large files

Use cases

  1. 01Investigate filesystems with high utilization
  2. 02Locate the largest space-consuming subdirectories
  3. 03Find files above a chosen size

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/ukgovernmentbeis/inspect_ai --skill disk-usage

After installing, type/disk-usagein Claude Code to confirm it loaded.

Bundled filesscripts/diskinfo.sh

Details

From the project README

Disk Usage Skill

Analyzes disk space and filesystem usage on Linux systems.

Suggested Workflow

  1. Run ./scripts/diskinfo.sh for a structured overview of mounts, block devices, and top directories.
  2. Check df -h output for any filesystem above 80% usage.
  3. Drill into high-usage mounts with du -h --max-depth=1 /mount to find large subdirectories.
  4. Locate specific large files with find /path -type f -size +100M.

Commands Reference

Filesystem Overview
  • df -h - Disk space usage for all mounted filesystems (human-readable)
  • df -i - Inode usage (number of files)
  • lsblk - Block device tree (disks, partitions)
  • mount - Currently mounted filesystems
Directory Size Analysis
  • du -sh /path - Total size of a directory
  • du -h --max-depth=1 /path - Size of immediate subdirectories
  • du -ah /path | sort -rh | head -20 - Largest files/directories
Finding Large Files
  • find /path -type f -size +100M - Files larger than 100MB
  • find /path -type f -size +1G - Files larger than 1GB
  • ls -lhS /path | head -20 - List files sorted by size (largest first)
Disk Information
  • cat /proc/partitions - Partition table
  • cat /proc/mounts - Mount information
  • stat -f /path - Filesystem statistics

Tips

  • Always use -h for human-readable sizes
  • The du command can be slow on large directories; use --max-depth=1 to limit recursion
  • Root filesystem (/) usage above 90% may cause issues

Comments

Markdown supported