agentleFS
eugeniughelbureugeniughelbur/agents-md/AGENTS.md

agents-md

AGENTS.md13 starsChanged 5 days agoMITView on GitHub

Guidance for AI coding agents working on this repo (agents-md, the AGENTS.md generator). Read this first. Verify live state (read the code) before changing anything. Meta-note: this file is also a live example of what the tool produces.

  • Reads credentials
  • 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 31,439 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.

  • In this repository3 other files it gives its agents.

The file

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

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Run the CLI locally: node bin/agents-md.js (in any target repo)

    line 17
  2. Very specific:

    Test: npm test (runs node test/run.js, zero dependencies).

    line 20
  3. Very specific:

    Zero runtime dependencies: Use only Node built-ins (fs, path, child_process).

    line 40
  4. Very specific:

    Keep the CLI (deterministic) and the SKILL.md (LLM) in sync on the marker contract and the section list.

    line 43
  5. Very specific:

    Default branch master. Public repo eugeniughelbur/agents-md.

    line 49

≈ “Common” is an estimate: at least 1 in 5 of the 40,246 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

Guidance for AI coding agents working on this repo (agents-md, the AGENTS.md generator). Read this first. Verify live state (read the code) before changing anything. Meta-note: this file is also a live example of what the tool produces.

<!-- agents-md:begin id=overview -->

Overview

agents-md generates and safely maintains an AGENTS.md (the cross-tool standard for AI coding agents) for any repository. It ships two ways from one repo: a zero-dependency Node CLI (bin/agents-md.js, run via npx) and a Claude Code skill (SKILL.md). Both write the same AGENTS.md and obey the same safe-marker contract. No runtime dependencies; Node >= 16.

<!-- agents-md:end id=overview --><!-- agents-md:begin id=commands -->

Commands

  • Run the CLI locally: node bin/agents-md.js (in any target repo)
  • Try it end to end: npx github:eugeniughelbur/agents-md
  • Help / dry run: node bin/agents-md.js --help · --dry-run
  • Test: npm test (runs node test/run.js, zero dependencies). No build, no install.
<!-- agents-md:end id=commands --><!-- agents-md:begin id=testing -->

Testing

node test/run.js builds throwaway fixture repos and checks stack detection and re-run safety (an edited section is kept, an untouched one is refreshed). Add a fixture test for every bug fixed. Still check the three write modes (create, marker-update, no-clobber sidecar) by hand before a release.

<!-- agents-md:end id=testing --><!-- agents-md:begin id=structure -->

Project structure

  • bin/agents-md.js — the CLI (detect facts → build sections → safe write → symlink CLAUDE.md)
  • SKILL.md — the Claude Code skill (LLM-powered variant; same contract)
  • templates/AGENTS.template.md — the section skeleton with markers
  • README.md, llms.txt, docs/ — docs + discoverability surface
<!-- agents-md:end id=structure --><!-- agents-md:begin id=conventions -->

Code style & conventions

  • Zero runtime dependencies. Use only Node built-ins (fs, path, child_process). This is a trust + portability promise; do not add npm deps to the CLI.
  • CommonJS, Node >= 16. Keep the CLI a single readable file.
  • Keep the CLI (deterministic) and the SKILL.md (LLM) in sync on the marker contract and the section list.
<!-- agents-md:end id=conventions --><!-- agents-md:begin id=git -->

Git & PR workflow

Default branch master. Public repo eugeniughelbur/agents-md. GitHub Pages serves /docs. Conventional, descriptive commits.

<!-- agents-md:end id=git --><!-- agents-md:begin id=gotchas -->

Gotchas & hard-won lessons

  • The marker regex must escape the HTML-comment markers; a bad regex would corrupt user files.
  • Never widen the write logic to overwrite a markerless AGENTS.md — the no-clobber sidecar is the product's core promise. Breaking it breaks trust.
  • CLAUDE.md symlink is intentional: Claude Code does not read AGENTS.md natively (as of 2026).
<!-- agents-md:end id=gotchas --><!-- agents-md:begin id=security -->

Security & secrets

The tool reads repo metadata only and .env.example (never real .env values), and never writes secrets into the generated file. No network calls, no telemetry. Keep it that way.

<!-- agents-md:end id=security --><!-- agents-md:begin id=boundaries -->

Boundaries

  • ✅ Always: keep the CLI zero-dependency; keep CLI and skill in sync; test the three write modes before pushing.
  • ⚠️ Ask first: changing the marker syntax (it is a compatibility contract with already-generated files); changing the default section set.
  • 🚫 Never: overwrite a handwritten (markerless) AGENTS.md; add runtime npm dependencies; make network calls or add telemetry; commit secrets.
<!-- agents-md:end id=boundaries -->

Notes

<!-- Human-owned. Never touched by re-runs of agents-md. -->
  • This repo is both the tool and its own first user. Dogfood changes here before shipping.

<!-- Generated/maintained by agents-md (https://github.com/eugeniughelbur/agents-md). Content INSIDE agents-md:begin/end markers is regenerated on re-run; everything outside is preserved. -->

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.