Skip to content

katopz/katgpt-rs / .agents/skills/disk-clean

disk-clean

Verified

Audit and reclaim disk space across the multi-repo workspace, home caches, and SDXC1TB. Scans cargo target dirs, incremental caches, GGUF model dirs, Unity Library caches, rustup and cargo registries. Classifies findings into regenerable-safe, load-bearing, and irreplaceable — the regenerable-safe class is deleted autonomously (before/after measured and reported), the load-bearing and irreplaceable classes are presented as a list for user approval and deleted only per approved item. Use when disk is full or low, before large builds or GPU training runs, or when asked what can be deleted or cleaned.

FileKindSize
SKILL.mdskill md8.0 KB
tools/scan_exact.pyscript1.5 KB
tools/scan_leaves.pyscript1.3 KB
tools/scan_sum.pyscript1.3 KB

tools/scan_leaves.py

View on GitHub
import re, collections, sys

# Roll up an exact-attribution dump (as produced by scan_exact-style parsing, but
# attribute each per-directory File(s) line to the heading's full path) into
# per-COMPONENT-prefix sums for one target directory, printing the biggest leaves.
# usage: py scan_leaves.py <scan.txt> <root> [min_gb]

path, root = sys.argv[1], sys.argv[2]
min_gb = float(sys.argv[3]) if len(sys.argv) > 3 else 0.5

pat_dir = re.compile(r'^\s*Directory of (.*)\r?$')
pat_files = re.compile(r'^\s*\d+ File\(s\)\s+(\d+) bytes\r?$')

sizes = collections.Counter()
cur = None
for line in open(path, encoding='utf-8', errors='replace'):
    m = pat_dir.match(line)
    if m:
        cur = m.group(1).rstrip()
        continue
    m = pat_files.match(line)
    if m and cur:
        sizes[cur] += int(m.group(1))

root_prefix = root.rstrip('\\') + '\\'
leaf = collections.Counter()
n = len(root_prefix)
for p, v in sizes.items():
    if not p.startswith(root_prefix):
        continue
    rest = p[n:]
    parts = rest.split('\\')
    # credit each ancestor prefix AND the leaf itself
    for i in range(1, len(parts) + 1):
        leaf['\\'.join(parts[:i])] += v

rows = [(k, v) for k, v in leaf.items() if v >= min_gb * 1073741824 and k]
for k, v in sorted(rows, key=lambda kv: -kv[1])[:25]:
    print(f"{v/1073741824:8.2f} GB  {k}")
rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first.Stars: 194kUpdated Claude CodeCodexVerifiedInstall