maintain-filemap

Regenerate depth-3 tree sections in root FILEMAP.md files.

4|Updated May 4, 2026
One-click install
npx skills add https://github.com/lossless-group/lossless-agent-skills --skill maintain-filemap
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: maintain-filemap
Source: https://github.com/lossless-group/lossless-agent-skills/tree/main/maintain-filemap
Command: npx skills add https://github.com/lossless-group/lossless-agent-skills --skill maintain-filemap

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires tree, git, and includes scripts (resource) components.

What problem does it solve?

When a repository's directory structure changes — such as adding new top-level directories, mounting or unmounting submodules, or renaming major subsystems — the root FILEMAP.md quickly becomes stale. This leaves new collaborators without a clear, at-a-glance overview of the repo's layout, forcing them to clone the repo just to understand its structure.

Core Features & Use Cases

  • Automated tree regeneration: Updates the depth-3 directory tree section of FILEMAP.md with a curated ignore list that filters out noise like node_modules, dist, and lock files, so the map stays readable.
  • Preserves hand-written context: Keeps the curator-written preface that explains the purpose of each top-level directory, so the FILEMAP is useful for newcomers rather than just a raw tree dump.
  • Flexible trigger options: Fires on directory shape changes, on a weekly cadence, or before releases, so teams can adopt the discipline that fits their workflow.
  • Use case: When a team adds a new client-sites submodule to their pseudomonorepo, running this skill updates the parent FILEMAP.md to show the new submodule mount point (without listing its internal contents, which are documented in the submodule's own FILEMAP.md) so new contributors immediately understand the repo's top-level structure.

Quick Start

Use the maintain-filemap skill to regenerate the FILEMAP.md at your repo root after adding a new top-level directory or submodule.

Frequently Asked Questions about maintain-filemap

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Why does my repository FILEMAP.md become stale after directory structure changes?

Directory structure changes like adding top-level folders or mounting submodules leave static FILEMAP.md trees outdated. Automated regeneration updates the depth-3 directory tree section to reflect current repository layouts for new collaborators.

How do I automatically update the directory tree in my repository documentation?

Automate directory tree documentation by triggering regeneration on directory shape changes, weekly cadence, or pre-release. This updates the depth-3 tree section in root-level FILEMAP.md files while filtering noise directories like node_modules and dist.

Does updating the directory tree overwrite my hand-written documentation preface?

Updating the directory tree preserves the hand-written curator preface. Only the depth-3 tree section is regenerated, keeping the contextual explanations of top-level directories intact for newcomers rather than replacing them with a raw tree dump.

Can I use this to document git submodules in a pseudomonorepo layout?

Pseudomonorepos and child repos are supported by showing submodule mount points in the parent FILEMAP.md without listing internal contents. The submodule's own FILEMAP.md documents its internal structure, maintaining an accurate top-level overview.

What is the best way to filter noise directories from a repository directory tree?

Filter noise directories from repository directory trees using a curated ignore pattern list. This excludes node_modules, dist, and lock files during automated tree regeneration to keep the FILEMAP.md readable and focused on the actual project structure.

How does git drift detection flag uncommitted filemap updates?

Git drift detection flags uncommitted filemap updates by comparing the regenerated depth-3 tree section against the committed FILEMAP.md. This identifies stale repository layout documentation when directory structures change.