agentleFS
Arcanea-LabsArcanea-Labs/Starlight-Intelligence-System/skills/machine/storage/SKILL.md

storage

Skill10 starsChanged 2 months agoMITView on GitHub

Disk audit and dedup-hint skill. Reports repo sizes, oversized files, worktree bloat, and surfaces candidates for archival/cleanup. Cross-cutting machine-layer skill, sibling to /pp and /heart.

5 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

3 rules. 0 are common, 2 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 4 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    After a heavy build or worktree-heavy week

    line 16
  2. Very specific:

    When pp flags storage as a constraint

    line 17
  3. Distinctive:

    Before a git clone of a large repo

    line 18

“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “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

/storage — Disk Audit & Dedup Hints

Cross-cutting machine-layer skill. Where /pp watches RAM/CPU and /heart watches daemons, /storage watches where the disk is going.

When to invoke

  • Disk space warning (under 50 GB free)
  • After a heavy build or worktree-heavy week
  • When pp flags storage as a constraint
  • Before a git clone of a large repo
  • Periodically (weekly or per weekly-recap)

What to check

SignalWhy it matters
Top 10 repos by sizeIdentifies the heaviest costs
Repos > 5 GBOften hide nested worktrees / vendored deps / build artifacts
Files > 100 MB tracked in gitShould be LFS or .gitignored
Worktrees (git worktree list)Each worktree is a full working copy
node_modules / .venv on diskCumulative drain across repos
Memory Bus mempalace sizeVector DB can grow large unchecked
Audit log accumulationmemory/_audit/*.jsonl files past 30 days

Quick implementation

# Resolve the latest portfolio audit JSON (daily cron writes a new one)
$auditDir = 'C:\Users\frank\Starlight-Intelligence-System\memory\_audit'
$auditPath = Get-ChildItem -Path $auditDir -Filter 'repo-portfolio-*.json' -File -ErrorAction SilentlyContinue |
    Sort-Object Name -Descending | Select-Object -First 1 | ForEach-Object FullName
if (-not $auditPath) {
    Write-Host 'No repo-portfolio audit found — run tools/audit-repo-portfolio.ps1 first' -ForegroundColor Yellow
    return
}
$audit = Get-Content $auditPath -Raw | ConvertFrom-Json
$auditAge = (Get-Date) - [DateTime]::Parse($audit.generated_at)
"Audit age: $([int]$auditAge.TotalDays) days"

# Top 10 repos by size
"`n=== Top 10 repos by size ==="
$audit.repos | Sort-Object size_mb -Descending | Select-Object -First 10 |
    Format-Table @{N='Repo';E={$_.name}}, @{N='Size GB';E={[math]::Round($_.size_mb/1024, 1)}}, class, days_since -AutoSize

# Free disk space on C:
"`n=== Free space ==="
$drive = Get-CimInstance Win32_LogicalDisk -Filter "DeviceID='C:'"
"C:\ Free: $([math]::Round($drive.FreeSpace/1GB, 1)) GB / $([math]::Round($drive.Size/1GB, 1)) GB"

# Oversized non-git files (>100MB) in top repo
"`n=== Files >100MB in top repo ==="
$top = ($audit.repos | Sort-Object size_mb -Descending | Select-Object -First 1).path
if (Test-Path $top) {
    Get-ChildItem $top -Recurse -File -ErrorAction SilentlyContinue |
        Where-Object { $_.Length -gt 100MB -and $_.FullName -notmatch '\.git\\' } |
        Sort-Object Length -Descending |
        Select-Object -First 5 |
        Format-Table @{N='Size MB';E={[math]::Round($_.Length/1MB,0)}}, FullName -AutoSize
}

# Audit log accumulation
"`n=== Audit log files >30 days old ==="
$auditDir = 'C:\Users\frank\Starlight-Intelligence-System\memory\_audit'
Get-ChildItem $auditDir -Filter '*.jsonl' -ErrorAction SilentlyContinue |
    Where-Object { (Get-Date) - $_.LastWriteTime -gt (New-TimeSpan -Days 30) } |
    Select-Object Name, @{N='Age days';E={[int]((Get-Date) - $_.LastWriteTime).TotalDays}}, @{N='Size KB';E={[math]::Round($_.Length/1KB,1)}} |
    Format-Table -AutoSize

Refresh the audit

The audit JSON is canonical for repo metadata. If it's >7 days old, refresh:

pwsh tools/audit-repo-portfolio.ps1

Output format

/storage — Disk audit

  Audit age: 6 days (stale > 7d would auto-refresh)
  C:\ Free: 187.4 GB / 953.9 GB

  Top repos:
    1. FrankX        19.2 GB  active   (suspect: worktrees + nested sibling)
    2. Arcanea       9.7 GB   active   (suspect: path-duplicate cluster)
    3. frankx-prod-* ~9.0 GB  active   (4 sibling repos, candidates for dedup)
    4. ...

  Recommended actions:
    - Run /storage --deep on FrankX (memory has known worktree bloat)
    - Archive frankx-prod-* siblings older than 30 days
    - 3 audit log files >30 days old (47 KB) — consider archive

Cross-cutting with /heart and /pp

  • /pp = capacity (am I going to run out)
  • /heart = process health (is the substrate alive)
  • /storage = disk distribution (where did all my disk go)

Invoke as a trio at start of a sprint: /pp && /heart && /storage.

Built on SIP — operational-tier · machine substrate skill

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.