agentleFS
ychampionychampion/ystack/skills/repo-map/SKILL.md

repo-map

Skill4 starsChanged 2 days agoMITView on GitHub

Map an unfamiliar codebase onto one page: what it is, how to install, run and test it (each command actually run), the entry points, the main data flow traced through real files, where things live, and the traps. Use for "explain this repo", "onboard me", "how is this codebase organized", "where do I start", "map this project", or before your first change in a repo you haven't worked in.

  • Reads credentials

14 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

2 rules. 0 are common, 2 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 13 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Keep it to one screen. Save it where the user asks, or in the session's scratch space.

    line 69
  2. Distinctive:

    Every command on the map was run, or is marked "not run".

    line 73

“Common” is measured: kept by at least 6 in 10 of the 13 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Repo map

A newcomer, human or agent, needs four answers before changing anything: what this is, how to run it, where a request goes, and what will bite. This skill answers them on one page, and every command on it has been run.

When it applies

  • First work in a repo you don't know.
  • Someone asks how a project is put together.
  • A handoff where the next agent starts cold.

Procedure

1. Skim the surface (5 minutes, no deep reading)

README, the manifest files (package.json, pyproject.toml, Cargo.toml, go.mod, ...), the top-level folders, CI config, Dockerfiles, .env.example, any AGENTS.md / CLAUDE.md / CONTRIBUTING.md. git log --oneline -20 and the most-changed files (git log --name-only --since=6.months --format= | sort | uniq -c | sort -rn | head -20) show where the live work is.

2. Run it

Find and run install, build, test and start. Record the exact commands that worked, how long they took, and anything you had to fix or set (env vars, services, versions). A command you didn't run goes on the map marked "not run".

3. Find the entry points

Where execution starts: main functions, server route tables, CLI command definitions, job and queue handlers, exported library API, scheduled tasks. List them with file paths.

4. Trace one real flow end to end

Pick the most important user action (a request, a command, a job). Follow it from entry point to storage and back, naming each file and function it passes through. One traced flow teaches more than a list of every folder. For a large repo, trace a second flow in parallel with a subagent if your host has them.

5. Note the traps

Generated code not to edit by hand, surprising conventions, slow or flaky tests, required services, environment differences, things that look dead but are loaded by name.

6. Write the page

# <project>: map   (as of <commit>, <date>)
What it is: <two sentences>
Run:  install <cmd> | build <cmd> | test <cmd> (<time>) | start <cmd>
Needs: <services, env vars, versions>
Entry points: <path - what starts here>
Flow: <action>: <file:function> -> <file:function> -> ... -> <storage>
Layout: <folder - what lives there>, only folders that matter
Traps: <one line each>
Live areas: <most-changed files lately>

Keep it to one screen. Save it where the user asks, or in the session's scratch space.

Rules

  • Every command on the map was run, or is marked "not run".
  • Paths and function names, not descriptions like "the auth layer".
  • Date the map with the commit; it goes stale.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.