Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add instructions/prithvi-web/treemap-disk-visualizer/agents-mdgit clone --depth 1 https://github.com/Prithvi-Web/TreeMap-Disk-VisualizerWhat 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 | $0.05631 | $0.05631 |
| Opus 5 | $0.02815 | $0.02815 |
| Sonnet 5 | $0.01126 | $0.01126 |
| Haiku 4.5 | $0.00563 | $0.00563 |
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 3d 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 — 358 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).
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"complete"(or streamGET /api/scan/{scanId}/progress, Server-Sent Events). Agents can skip the polling:POST /api/scan?wait=true&waitMs=55000blocks until the scan settles and answers200with the stats inline (202 { status: "running" }if it outliveswaitMs). Scans live in memory for ~30 minutes after completion. For the whole picture in one call afterwards:GET /api/agent/summary?scanId=— top culprits, reclaimable-by-category, and the forecast, every number as raw bytes plus a formatted string, in deterministic order. - Inspect. With the
scanId:GET /api/large-files/GET /api/large-folders— the big things.GET /api/cleanup/suggestions— known-reclaimable space: regenerable build dirs (with the command that rebuilds each), 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. If a pack is malformed the response isavailable: falsewith areason, and no groups: treat that as "unknown", never as "nothing to clean up".GET /api/packages/orphans— package-manager artifacts split into orphaned (the owning project is gone — nothing will ever rebuild them), 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).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. Names and paths 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).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.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.
- 3d ago First seen · 358 lines · 5,631 tokens per session scan A 16c3fc3deb92
TreeMap-Disk-Visualizer AGENTS.md is an instructions file published in the GitHub repository Prithvi-Web/TreeMap-Disk-Visualizer (668 stars, last pushed 5d ago), licensed MIT. It adds 5,631 tokens to every session, about $0.0282 per session on Opus 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.
Other instructions, from other repositories
vizro CLAUDE.md
Claude Code instructions for mckinsey/vizro, covering vizro development guide for ai agents, development setup (across all packages), only dependency: hatch, working directory and common hatch commands across all packages.
vizro copilot-instructions.md
Copilot instructions for mckinsey/vizro, covering github copilot instructions for vizro, pull requests from bots and automated tooling and everything else.
vizro AGENTS.md
AGENTS.md instructions for mckinsey/vizro, a project described as: Vizro is a low-code toolkit for building high-quality data visualization apps.
vizwright CLAUDE.md
Instructions for blakefeiza/vizwright, covering vizwright — orchestrator, routing (automatic — no keywords needed), pipeline, artifact contracts and error handling.
marimo AGENTS.md
Instructions for marimo-team/marimo, covering marimo development guidelines, your primary responsibility is to the project and its users, quick setup, development commands and python.
streamlit copilot-instructions.md
Copilot instructions for streamlit/streamlit, covering streamlit repo overview, tech stack, folder structure, shell & build policy and make commands.