Map a repository (a local folder or a GitHub/GitLab URL) into one self-contained page someone can read on a phone to understand an unfamiliar codebase fast. The page covers what the repo is, how to run and ship it, an architecture of module boxes joined by real import arrows, key flows with a file:line for every step, hotspots, and the ten files to read first. Use it when asked to map, explain, onboard onto, tour or give an overview of a repository or codebase.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Repo Map?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/daoleno-repo-map)
---
name: repo-map
description: Map a repository (a local folder or a GitHub/GitLab URL) into one self-contained page someone can read on a phone to understand an unfamiliar codebase fast. The page covers what the repo is, how to run and ship it, an architecture of module boxes joined by real import arrows, key flows with a file:line for every step, hotspots, and the ten files to read first. Use it when asked to map, explain, onboard onto, tour or give an overview of a repository or codebase.
---
# Repo map
A repo map is one HTML page. Exact facts come from a scanner: files, code lines, modules, the import arrows between them and git history. You add the judgment that only reading the code can give: layers, names, key flows, explanations and where to start. Every place you name is a citation that the renderer checks against the code.
The tool is `__MEWLA__ repo-map` (Mewla's command line). Never write inside the repository you map; everything goes in its map folder.
## 1. Scan
```sh
__MEWLA__ repo-map scan <folder or URL>
```
Give it the URL as it is; do not clone the repository yourself. The scan makes a clone with enough history for the change section.
This prints the **map folder**. It writes `facts.json` and `digest.md` there (a URL is cloned into the map folder). Read `digest.md` from start to end. It has the modules (their IDs are fixed), the observed arrows, the most imported files, the manifests and scripts, the entrypoints, the deploy files, the hotspots and the recent commits.
- If it says **Unchanged since the last map** and `map.json` exists, go straight to step 4.
- If it lists **Parts that cite changed files or changed modules**, this is a refresh. Re-read only the code those parts cite, update only those parts and any module listed as having no note, then render.
Never edit `facts.json` or `digest.md`. They are what was observed. If the module cut looks wrong for this repository, say so in your reply rather than changing it.
## 2. Read the code
Read selectively. Do not read every file:
- the README, the docs and the manifests the digest lists;
- each entrypoint;
- the largest files of the biggest modules;
- the most imported files.
Follow the real call chain for each flow: open the callee and confirm each hop. Do not guess from names. Use grep to find where a function is defined and where it is called.
## 3. Write `map.json` in the map folder
Write it with these exact keys; the renderer refuses unknown ones. Every citation is `"file"` (a repository path as it appears in the digest), `"line"` (1-based) and `"symbol"`. The symbol is a short exact text on that line, such as a function, type, script or key name. The renderer looks for the symbol within 3 lines of `line`. A symbol found elsewhere in the file is corrected and reported. A file that does not exist, or a symbol that is not in the file, is reported as broken.
```json
{
"summary": {
"what": "One or two sentences: what this is and what it does for whom.",
"who": "Who uses it and how (one sentence).",
"stack": ["Go daemon", "TypeScript app", "SQLite", "…5–8 items"],
"run": [{"text": "bun run dev", "file": "package.json", "line": 12, "symbol": "\"dev\""}],
"deploy": [{"text": "Docker image built and pushed on tag by CI", "file": ".github/workflows/release.yml", "line": 30, "symbol": "docker/build-push-action"}]
},
"layers": [
{"name": "Entry & UI", "note": "what the person touches", "modules": ["<module id>", "…"]},
{"name": "Core", "note": "…", "modules": ["…"]},
{"name": "Foundation", "note": "storage, platform, shared helpers", "modules": ["…"]}
],
"modules": {
"<module id>": {
"title": "2–4 plain words",
"purpose": "One sentence: what this module owns or decides (not how).",
"key": [{"why": "where requests enter", "file": "…", "line": 40, "symbol": "func Serve"}]
}
},
"flows": [
{
"name": "Send a message",
"summary": "One sentence: what goes in and what comes out.",
"steps": [
{"module": "<module id>", "text": "The composer posts the text over the socket.", "file": "…", "line": 88, "symbol": "send("}
]
}
],
"start": [{"why": "What reading this file teaches.", "file": "…", "line": 1, "symbol": "…"}],
"glossary": [{"term": "Worker", "meaning": "…", "file": "…", "line": 10, "symbol": "type Worker"}]
}
```
What good looks like:
- **Layers**: use 3–6 layers, ordered from what a person touches (entry, UI, CLI, API) down to the foundation (storage, platform, shared code). Put every module ID from the digest in exactly one layer.
- **Modules**: give every module a title, a one-sentence purpose and 1–3 key files with why each matters. A `(other)` module folds small folders; say what they have in common. A `(files)` module is the files directly in a folder.
- **Flows**: write the 2–4 journeys that matter most for this product, the main thing a user does end to end first. Each flow has 4–10 steps. Each step is one present-tense sentence, the module ID that does it, and the function that does it.
- **Start**: list exactly 10 files in reading order. Each `why` says what the reader learns.
- **Glossary**: define 6–15 domain words a newcomer would not know, each cited where it is defined.
- Write plainly for someone new to the repo. The page already shows sizes, arrows and history, so do not repeat numbers in prose. Do not claim what you did not read.
## 4. Render and fix
```sh
__MEWLA__ repo-map render <map folder>
```
This writes `index.html` (self-contained, light and dark, phone and desktop) and lists what to fix. Fix every `FIX` line in `map.json`, along with the `warn` lines that name a module in no layer or a citation without a symbol. Render again until it exits cleanly.
## 5. Reply
Give the full path of `index.html`, for example `/home/me/.mewla/repo-maps/name-1a2b3c4d/index.html`. In Mewla a file path in a reply opens the page with one tap, on the phone too. Add two or three lines on what the repository is, and give the citation counts the render printed.