maintain-filemap

maintain-filemap is a skill for Claude Code, Codex from lossless-group/lossless-agent-skills. It costs 150 tokens per session (1,780 once invoked), scanned A, original, MIT.

A process for keeping FILEMAP.md accurate—a file that explains a repository's main folders and shows its directory tree.

In plain words
What is it for?
Regenerating repository maps after directory changes, submodule changes, renames, weekly checks, or before releases.
Why use it?
It gives newcomers both the meaning and the current structure of a codebase, even when folders or nested repositories change.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions CLAUDE.md.

Good fit Regenerating repository maps after directory changes, submodule changes, renames, weekly checks, or before releases.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/lossless-group/lossless-agent-skills/maintain-filemap
Install

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.

Any agent
npx skills add lossless-group/lossless-agent-skills --skill maintain-filemap
Clone the repo
git clone --depth 1 https://github.com/lossless-group/lossless-agent-skills

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for maintain-filemap

README.md
[![agentmods](https://agentmods.dev/badge/skills/lossless-group/lossless-agent-skills/maintain-filemap/github.svg)](https://agentmods.dev/skills/lossless-group/lossless-agent-skills/maintain-filemap)
Your own site
<a href="https://agentmods.dev/skills/lossless-group/lossless-agent-skills/maintain-filemap"><img src="https://agentmods.dev/badge/skills/lossless-group/lossless-agent-skills/maintain-filemap/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.

agentmods 80×15 button for maintain-filemap

Your own site · 80×15
<a href="https://agentmods.dev/skills/lossless-group/lossless-agent-skills/maintain-filemap"><img src="https://agentmods.dev/badge/skills/lossless-group/lossless-agent-skills/maintain-filemap.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 150 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,780 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00150 $0.01780
Opus 5.5 $0.00060 $0.00712
Sonnet 5.5 $0.00030 $0.00356
Haiku 4.5 $0.00015 $0.00178

Measured 1mo ago against content hash 2b7cf6c8a749, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

maintain-filemap 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 1mo ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/regen-filemap.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

maintain-filemap/SKILL.md · 121 lines

How it starts

The opening of the file, as written. The whole thing — 121 lines — stays where its author put it; the contents beside it link to each section on GitHub.

maintain-filemap · Loop

When the directory shape changes, regenerate the map. The committed FILEMAP.md at each repo root is the artifact a new collaborator opens first.

What this loop does

Keeps a FILEMAP.md at the root of each Lossless repo current with the actual on-disk tree. Each FILEMAP.md has two parts:

  1. A curator preface — hand-authored prose explaining what each top-level directory IS (purpose, ownership, conventions). Edited rarely (only when the meaning of a directory changes, not when its contents do).
  2. A generated tree — produced by tree -L 3 with a curated ignore set, spliced between <!-- TREE-START --> and <!-- TREE-END --> sentinels in a fenced code block. Regenerated by the loop's script every time the discipline fires.

Why both: a raw tree dump is useful but doesn't tell a newcomer what they're looking at. The curator preface is what makes the file legible; the generated tree is what makes it accurate.

When this loop fires

Three triggers:

Trigger Cadence How it fires
Directory-shape change as-it-happens Pre-commit hook, OR manually as part of the commit that changes shape
Weekly cadence every Monday Manual or cron; produces a no-op commit if nothing changed
Pre-release before each main/master ship Manual; bundled into the release commit

The hook is optional but recommended. Without it, the discipline lives in the agent's working memory: "Did I just add corpus/? → regen FILEMAP."

What changes is a "directory-shape change"

Triggers the loop:

  • A new top-level directory was added (mkdir context-v/loops/)
  • A submodule was mounted or unmounted (.gitmodules changed)
  • A major subsystem was renamed (apps/dididecks-shell/ → apps/deck-shell/)
  • A top-level file like CLAUDE.md or pnpm-workspace.yaml was added
  • A new client-site landed under client-sites/

Does NOT trigger the loop:

  • A new file under an existing directory (e.g., adding context-v/plans/Some-Plan.md)
  • A small refactor that doesn't change directory names
  • A typo fix, dependency bump, or doc edit
  • Adding a new variant under an existing client-site's src/pages/scroll/{deck}/

Read the full file on GitHub · 121 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

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.

  1. 1mo ago First seen · 121 lines · 150 tokens per session scan A 2b7cf6c8a749

Subscribe to this mod's changes

maintain-filemap is a skill published in the GitHub repository lossless-group/lossless-agent-skills (4 stars, last pushed today), licensed MIT. It adds 150 tokens to every session and 1,780 once invoked, about $0.0006 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-31.