agentleFS
nduc99911nduc99911/repo-context-mcp/AGENTS.md

repo-context-mcp

AGENTS.md105 starsChanged 4 months agoMITView on GitHub

MCP + CLI tool that helps coding agents understand repositories via:

  • Installs packages
  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.

    Of the AGENTS.md files we read, the 35,196 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

The file

We split this AGENTS.md into the rules it gives an agent

4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Do not write diagnostics to stdout in MCP mode (stdio protocol)

    line 35
  2. Distinctive:

    Prefer pure functions + unit tests over integration-only coverage

    line 36
  3. Very specific:

    All file reads must go through safeResolve / readTextFile

    line 41
  4. Distinctive:

    Never follow paths outside the configured root

    line 42

≈ “Common” is an estimate: at least 1 in 5 of the 45,344 AGENTS.md files we read have a rule of the same kind, not the same words. “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
AGENTS.md

AGENTS.md — repo-context-mcp

Project

MCP + CLI tool that helps coding agents understand repositories via:

  • repo_map — tree + entrypoints
  • search_code — substring search
  • pack_context — token-aware markdown pack

Layout

  • src/server.ts — MCP stdio server
  • src/cli.ts — dual CLI entry (map / search / pack / serve)
  • src/walk.ts / gitignore.ts / repo-map.ts / search.ts / pack.ts — pure core
  • tests/ — Vitest
  • examples/sample-repo/ — demo tree
  • skills/repo-context/ — agent skill doc

Commands

npm install
npm test
npm run lint
npm run build
node dist/cli.js map examples/sample-repo
node dist/cli.js search login examples/sample-repo
node dist/cli.js pack examples/sample-repo --focus auth

Conventions

  • TypeScript strict, ESM (NodeNext)
  • Do not write diagnostics to stdout in MCP mode (stdio protocol)
  • Prefer pure functions + unit tests over integration-only coverage
  • Keep dependencies minimal

Security

  • All file reads must go through safeResolve / readTextFile
  • Never follow paths outside the configured root

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.