agentleFS
selamy-labsselamy-labs/agent-skills/skills/full-disk-forensics/SKILL.md

full-disk-forensics

Skill0 starsChanged 4 days agoMITView on GitHub

Use when a filesystem is full or nearly full, especially when df and du disagree. Checks deleted-open files, privilege blind spots, journald, temp worktrees, caches, and safe cleanup evidence.

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 4 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use this skill when df reports a full filesystem, when du totals do not explain used space, or when agents/builds fail from disk pressure.

    line 8
  2. Very specific:

    If df says space is used but du cannot find it, check:

    line 26
  3. Distinctive:

    Check the usual growth points before deleting anything unusual:

    line 38
  4. Distinctive:

    Test artifacts, coverage reports, core dumps, and crash logs.

    line 43
  5. Distinctive:

    Prefer service-native cleanup commands over manual deletion.

    line 49
  6. Distinctive:

    Do not remove active worktrees, persistent volumes, databases, or unknown root-owned paths just because they are large.

    line 53

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Full Disk Forensics

Use this skill when df reports a full filesystem, when du totals do not explain used space, or when agents/builds fail from disk pressure.

First Snapshot

Capture the facts before cleaning:

df -h
df -ih
mount | sort

Then identify the affected mountpoint and keep every later command scoped to that filesystem unless you intentionally broaden the search.

Explain df Versus du

If df says space is used but du cannot find it, check:

  • Deleted but still-open files: sudo lsof +L1.
  • Permission blind spots: rerun targeted du with enough privilege to see root-owned directories.
  • Mount boundaries: use du -x when staying on one filesystem matters.
  • Reserved blocks and filesystem metadata when the gap is small.

The df/du gap is a diagnostic signal, not an inconsistency to ignore.

Common Large Sources

Check the usual growth points before deleting anything unusual:

  • Journald: journalctl --disk-usage.
  • Container images, writable layers, and build caches.
  • Package-manager caches.
  • Test artifacts, coverage reports, core dumps, and crash logs.
  • Temporary clones, worktrees, virtualenvs, and dependency caches.
  • Old release artifacts or local database snapshots.

Cleanup Rules

  • Prefer service-native cleanup commands over manual deletion.
  • Bound cache cleanup to paths and tools whose ownership is understood.
  • For deleted-open files, restart or signal the owning process only when that is operationally safe.
  • Do not remove active worktrees, persistent volumes, databases, or unknown root-owned paths just because they are large.

Done Criteria

Report:

  • The full mountpoint before and after.
  • The largest confirmed source or the unexplained gap that remains.
  • The cleanup command or declared follow-up.
  • Any process restart needed to release deleted-open files.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.