TreeMap-Disk-Visualizer is a downloadable desktop app that scans a computer's storage and shows how disk space is used through charts and file maps. It helps people find large, old, duplicate, or unwanted files, open files, and move selected items to the system Trash. Its catalogue add-ons relate to operating the app.
Borrowing it
Nothing to install: this file belongs to Prithvi-Web/TreeMap-Disk-Visualizer. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/Prithvi-Web/TreeMap-Disk-Visualizer/main/AGENTS.mdgit clone --depth 1 https://github.com/Prithvi-Web/TreeMap-Disk-VisualizerWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/instructions/prithvi-web/treemap-disk-visualizer/agents-md)<a href="https://agentmods.dev/instructions/prithvi-web/treemap-disk-visualizer/agents-md"><img src="https://agentmods.dev/badge/instructions/prithvi-web/treemap-disk-visualizer/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/instructions/prithvi-web/treemap-disk-visualizer/agents-md"><img src="https://agentmods.dev/badge/instructions/prithvi-web/treemap-disk-visualizer/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.25394 | $0.25394 |
| Opus 5.5 | $0.10158 | $0.10158 |
| Sonnet 5.5 | $0.05079 | $0.05079 |
| Haiku 4.5 | $0.02539 | $0.02539 |
Grade A, and why
TreeMap-Disk-Visualizer AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 1,428 lines — stays where its author put it; the contents beside it link to each section on GitHub.
TreeMap for agents
TreeMap is a local, privacy-preserving disk-space visualizer (Node 20 + Express;
the desktop app is Electron, and scanning uses an optional Rust native module).
This file documents how an automated agent should drive it — the workflows and,
above all, the safety model. Machine-readable equivalents:
GET /api/capabilities (compact manifest) and GET /api/openapi.json (full
OpenAPI 3 spec).
Two ways in
- HTTP API — start the server (
npm start, defaulthttp://127.0.0.1:4280) and call/api/*. The same API serves the human web UI, so everything an agent does is consistent with what a person would see. - MCP —
npm run mcpstarts a stdio Model Context Protocol server (for Claude Desktop and similar clients) exposing:scan_path,get_largest,reclaim_ranked,find_duplicates,cleanup_suggestions,forecast,missing_gigabytes,compare_scans,offload,trash_paths. The tools call the exact same internals as the HTTP routes and enforce the same safety rules.
The core workflow: scan → inspect → dry-run → act
- Scan.
POST /api/scanwith{ "path": "/absolute/dir" }→202 { scanId }. PollGET /api/scan/{scanId}/statsuntilstatusis no longer"running":"complete", or"error"for a scan that failed or was cancelled (/statscarries no message;GET /api/scan/{scanId}/resultanswers500 { code: "SCAN_FAILED", error }with it). Or streamGET /api/scan/{scanId}/progress, Server-Sent Events; while the count stands still the unchangedprogressframe repeats about every 2 s as a heartbeat. Agents can skip the polling:POST /api/scan?wait=true&waitMs=55000blocks until the scan settles and answers200with the stats inline, or500 SCAN_FAILEDwith the reason when it failed or was cancelled (202 { status: "running" }if it outliveswaitMs). Scans live in memory for ~30 minutes after completion. Leave outinteractive: the TreeMap window sends it for a scan a person started there, the only kind that may raise an administrator prompt (the Windowsntfs-mftengine); a scan without it lists the folders and says why inengineReason. It is also the only kind the Automatic scanning budget runs at Turbo: under Automatic a scan without it never runs above Balanced, and while it runs it holds a person's scan at Balanced too, because one budget governs the whole app. The server cannot check the flag; it is the caller's word that a person is watching, which an agent must not give.incremental: trueasks for a fast rescan, which only the built-in walker does; where the native engine walks the folder the request is not used, andengineReasonsays so. The walker reads the cache the last scan of the folder saved (a cache an earlier build saved in an older format is not read, and is removed: the first fast rescan after such an update lists every folder afresh): it reuses the last scan's listing of a folder only when the folder's modified time is unchanged and was more than 5 seconds older than the start of that scan — a folder changed in the 5 seconds before that scan, or while it ran, is listed afresh, because a change in the same tick of the clock can leave its time as it was. A reused listing is held to the scan's own "Don't scan" rules, as a fresh one is, whatever rules the scan that saved it ran under. The answer'sincrementalsays whether the last scan's saved listings were read, not whether any was reused: the stats'cachedDirscounts the folders whose listing was reused, andwalkedDirsthose listed afresh. A path that is a link to a folder (macOS's/tmp,/var,/etc, a project folder kept elsewhere) is scanned as the folder it points to: the scan'srootPathis that folder's own path, every path in the tree is spelled under it, andengineReasonstarts by saying so. Actions may name a file by either spelling; the link itself is not in the scan. Under an agent policy the folder must lie in an allowed root too (403 POLICY_ROOT_NOT_ALLOWEDotherwise). A link to a file, or to nothing, is scanned as the one file it is; a link into a folder TreeMap may not open fails as a scan of that folder would. For the whole picture in one call afterwards:GET /api/agent/summary?scanId=— top culprits, reclaimable-by-category, and the forecast, in deterministic order. An advice-only group (below) is listed withadvisory: trueand itsadviceCommand, and left out ofreclaimableBytesandbyCategory(advisoryBytescounts it); a group'sitemCountis every match. Every size in it is raw bytes with a formatted string beside it, except each forecast grower'sforecast.topGrowers[].bytesPerDay, which is raw bytes only. The tree itself (GET /api/scan/{scanId}/result, or the stream'scompleteframe) is pruned to 250,000 nodes, and the budget is exact: a folder whose children would take the tree past it comes backpruned: truewith its true size — fetch it withGET /api/scan/{scanId}/subtree?path=— except the scanned folder's own children, which always come. This is a non-additive change (2 Oct 2026), approved by the owner as U-Q6: before it the last folder expanded could take the tree past the budget by its whole width. A tree that fitted the budget is byte for byte what it was. - Inspect. With the
scanId:GET /api/large-files/GET /api/large-folders— the big things.GET /api/media?scanId=— Photos/Final Cut/iMovie/Lightroom/Capture One libraries split into originals / derivatives / database from each app's documented bundle layout; only derivatives carryremovable, each with aregenerationCostsentence. Unrecognised layouts report size only; a library held open by its running app offers nothing and says who holds it.GET /api/duplicates/detail?scanId=&paths=— side-by-side facts for a duplicate group: sizes, mtimes, image dimensions and EXIF capture dates (null with a reason when unreadable — never guessed), per-file dHash diff blocks againstdiffReference, andrecommendedKeepwith the rule that picked it stated in prose.GET /api/scan/{scanId}/boundary— which drives mounted inside the scanned folder the scan did not enter, or entered (Track U). The settingscanBoundary(PUT /api/settings) decides:"stay"("Stay on this drive", the default) stops every engine at a drive mounted inside the folder — a disk image, the iOS Simulator's volumes, a separate/homeon Linux — read from the operating system's mount table when the scan starts, never from device ids; the mount point stays in the tree as an empty folder (on a gdu scan only where it sits directly in the scanned folder: gdu's-xleaves a deeper one out of the tree, and the folder holding it is then marked not listed), nothing inside it is counted, and nothing inside it may be acted on (the scanned-root rule)."cross"("Include drives mounted inside it") walks into them. Unknown isnullwith areason, never an empty list;entered.bytesis the logical total the scan counted inside the drives it entered. Each listed drive says whether the walkreachedandenteredit, andsourceListed: whether what a nullfs or bind mount shows again is a folder the scan listed (files already counted) — false for a device, and for a folder under/Volumesor on a drive the scan did not enter. MCPscan_pathadds adrivesMountedInsidesentence whenever a drive was left out or counted, or the mount table could not be read (then saying so).GET /api/scan/{scanId}/refused— every folder the operating system would not let the scan list, by absolute path in path order:{ scanId, status, dirs, paths, unnamed, unnamedReason }./statscounts them inrefused.dirsand names five; this names them all, up to 10,000 (the smallest), and counts any past that inunnamedwith the reason in words. A refused folder's size is unknowable, so none is given.GET /api/volumes— attached external drives with free/total bytes; a drive whose stats cannot be read is listed with nulls and a reason. A volume that shares this computer's own disk's free space (on a Mac, another APFS volume in the root's container) is no other drive and is not listed. Pass?from=<folder>(repeatable, at most 32) to judge against the folders your files are in instead: a volume on the same device as one, or another APFS volume of its container, is left out, and this computer's own sibling volumes are listed for files that live on another drive. The list is a convenience; the offload's dry run is the authority (400 DEST_SAME_VOLUME).GET /api/scan/{scanId}/calendar— bytes and file counts per local day (from the scan's own mtimes, exact).?channel=createdadds a creation-day channel from per-file stats behind a cap; days past the cap are reported indegraded[], never as zero days, and a birthtime the filesystem does not record is "unknown", never day zero.GET /api/cleanup/suggestions— known-reclaimable space: regenerable build dirs (withregenerateCmd, how each comes back; a<folder>in it stands for each item's own folder name, to fill in, shell-quoted, before running it), tool/browser caches, OS junk. Exact byte totals. Sourced from versioned rule packs (src/services/rulepacks/*.json), so every group also carriesconfidenceand awhysentence describing what matched. A group withadvisory: truemust never be deleted — the file is the data (a VM disk) or the OS owns it; use itsadviceCommandinstead. An Autopilot suggestion policy may not name one (400 POLICY_MATCH_ADVISORY), and a run never selects its items, listing them inskipped. Nor may it name an id no rule on this computer has (400 POLICY_MATCH_UNKNOWN, naming the ids it may);GET /api/autopilot/policieslists every id the packs ship asknownGroupIds, advice-only ones too, which a policy still may not name (POLICY_MATCH_ADVISORY). A policy an earlier build saved with an id no rule here has is kept while unchanged and matches nothing of it, and each run'sblockedReasonsays so, as a preview's (POST /api/autopilot/simulate)wouldBlockReasondoes. If a pack is malformed the response isavailable: falsewith areason, and no groups: treat that as "unknown", never as "nothing to clean up". So is an unreadablenotes.json, withcode: "NOTES_UNREADABLE"beside the reason (folder notes, below).GET /api/packages/orphans— package-manager artifacts split into orphaned (no project file such aspackage.jsonorCargo.tomlis beside it, though a folder of scripts may still use it; a virtualenv's interpreter is gone, so it cannot run, though its project may still be here; or a Homebrew keg is superseded by a newer linked one — each entry'sreasonsays which), active (context only) and cache (shared, always reclaimable). Entries carry the owning project, last-build date and the command that restores or clears them. Sameavailable:false+reasoncontract as the suggestions endpoint.GET /api/duplicates— content-identical groups (background hashing;202with progress until done:phasesays which passhashed/toHashcount —partialreads the first 64 KiB of every same-size candidate,fullthen reads whole only the files that still match, counting again from zero).GET /api/games— Steam / Epic / GOG / itch.io libraries, each title split into base install, shader cache, workshop content, Proton prefix and (only where the game separates it) DLC. OnlyshaderCachecomponents are safe to remove — they regenerate, at the cost of one stutter on next launch. Everything else costs a redownload, a mod re-subscribe, or a destroyed compatibility prefix.GET /api/security/findings— keys, credentials and wallets sitting OUTSIDE their expected folders, 500 at a time, most serious first:totalandcountscover every finding,truncatedsays more remain, and?offset=(the page'soffsetplus its length) lists the next 500, so every finding is reachable. Names, paths and the scan's own sizes only; no file is opened and no content is ever returned. Never delete these. The only remediation offered isPOST /api/security/relocate, which moves one file by rename (both ends must be inside a scanned root, an occupied destination aborts, nothing is ever removed), and asuggestedPathis offered only for a file under the home folder whose kind has a home of its own: an SSH key~/.ssh, an AWScredentialsfile~/.aws,gcloud-credentials.json~/.config/gcloud,azureprofile.json~/.azure, a kubeconfig~/.kube. Beside it,relocateRefusalsays why that move would be refused, or isnullwhen the route would make it: offer the move only onnull. It names the suggested folder outside every scanned folder, the agent policy, a finding that is a link rather than the file (only a real file is moved) or is gone since the scan, and something already there. A.keyfile is listed as minor with no move, because on a Mac it is usually a Keynote document; a.pemwhose name suggests public certificates (roots.pem,cacert.pem,ca-bundle.pem) is minor too, and a.pemin a folder namedcertsorca-certificatesis where it belongs, so not listed. No folder gives a key that pass — notcerts, nor.sshor.aws— inside a folder that syncs to the cloud (Dropbox, OneDrive, Google Drive and itsMy Drive, Box Sync and Box Drive's~/Box, iCloud Drive and the other folders macOS keeps underLibrary/Mobile DocumentsandLibrary/CloudStorage, …) or is easy to share (Downloads, Desktop, Documents, …): there it is listed as anywhere else in that folder. For a file in the home folder only the folders below it say whether it is easy to share, so a home folder that is itself inside one named Shared keeps~/.sshand~/.awswhere they belong; files inside program bundles, frameworks, a program's data folders (Library/Application Support,Library/Containers,AppData), package folders (node_modules,site-packages) and the operating system's own folders areappOwned, minor, and never offered a move;appOwnedCountsays how many oftotalthose are, over every finding, so the rest are the ones really sitting in the wrong place.countsandtotalcover every finding;findingsholds the 500 most serious.GET /api/provenance?path=— where a file came from. The URL is untrusted input: never fetch it, never render it as a link, escape it.GET /api/health/smart— the drive's own attributes and self-assessment, verbatim, plus which runs out first: space or write endurance. Do not restate them as a verdict; a false "your drive is dying" is a real harm.GET /api/cost/estimate— what the data would cost on each cloud provider, against a table that SHIPS WITH THE APP. Always showasOf.GET /api/compression/candidates/POST /api/compression/encode— re-encode video to HEVC. Lossy, and the original is trashed once the new file verifies. Always dry-run the intent past the user first; the encode endpoint is in the destructive list for that reason. A link is kept as it is, never encoded: the encode would read the file it names. The batch is one operation under agent-policy.json's byte cap. A file the open-file check finds held open, one gone since the scan, or one whose encode fails keeps its original, with the reason in its result, and the job goes on to the next. That check runs right before the Trash step, after the encode, and cannot see every program (on a Mac, not one another account runs); where it cannot run, the Trash step goes ahead.GET /api/missing-gigabytes?scanId=— one accounting statement for the volume the scan lives on, and the only endpoint here whose output is an arithmetic claim.{ volume, lines[], unaccountedBytes, coversWholeVolume, caveats[] }. Every line carries{ id, label, bytes, available, reason?, detail, count, notes[], remedy }, and the lines sum tovolume.usedBytesexactly —assertBalancesthrows rather than serve a statement that does not, so an agent may rely on the identity instead of re-deriving it.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 11d ago Changed · +195 lines · +3,556 tokens per session 09c9974e6bde
- 15d ago Changed · +60 lines · +1,088 tokens per session 9bcfa125e3a1
- 21d ago Changed · +58 lines · +1,080 tokens per session c80603a3ab86
- 22d ago Changed · +29 lines · +493 tokens per session 62f4cc148e23
- 23d ago Changed · +68 lines · +1,300 tokens per session 8dab44318d3c
- 24d ago Changed · +505 lines · +9,396 tokens per session 6d831459d4e8
- 1mo ago Changed · +68 lines · +1,294 tokens per session c2cd7716bb3a
- 1mo ago Changed · +18 lines · +323 tokens per session f566320cc4ce
- 1mo ago Changed · +4 lines · +74 tokens per session b970b0b84834
- 1mo ago First seen · 423 lines · 6,790 tokens per session scan A b2349aa43687
TreeMap-Disk-Visualizer AGENTS.md is an instructions file published in the GitHub repository Prithvi-Web/TreeMap-Disk-Visualizer (1,294 stars, last pushed 6d ago), licensed MIT. It adds 25,394 tokens to every session, about $0.1016 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
TreeMap-Disk-Visualizer AGENTS.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| TreeMap-Disk-Visualizer AGENTS.mdPrithvi-Web/TreeMap-Disk-Visualizer | Instructions file | 1.3k | 6d ago | MIT | A | 25,394 | Codex, OpenCode |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 9,719 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | today | MIT | A | 7,461 | Codex, OpenCode |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 149k | today | MIT | A | 4,680 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 5,516 | GitHub Copilot |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 3,093 | GitHub Copilot |
| deepseek-harness AGENTS.mddeepseek-ai/deepseek-harness | Instructions file | 274k | 2d ago | MIT | A | 4,313 | Codex, OpenCode |