agentleFS
DucksssDucksss/agent-agnostic-template/.agents/AGENTS.md

agent-agnostic-template

AGENTS.md0 starsChanged 2 months agoMIT-0View on GitHub

Shared configuration for every coding agent, in the open Agent Skills and AGENTS.md formats. Make changes here. Files in .claude/, .cursor/, .codex/ and .mcp.json are either generated from this folder or belong to one agent only. Use the new-skill skill. In short: 1. Run .agents/skills/new-skill/scripts/create.sh <name> "<description>", adding --local for a private skill. 2. Write the steps in SKILL.md and fill in references/NOTES.md. 3. Commit the skill folder and its link in .claude/skills/. To install someone else's skills, run npx…

  • Reads credentials
  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.

    Of the AGENTS.md files we read, the 11,638 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

7 rules. About 0 are common, 0 are distinctive, and 7 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.

  • 7

    Very specific

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

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

    Use the new-skill skill. In short:

    line 25
  2. Very specific:

    Write the steps in SKILL.md and fill in references/NOTES.md.

    line 29
  3. Very specific:

    Commit the skill folder and its link in .claude/skills/.

    line 30
  4. Very specific:

    Secrets never go in the file: Write ${NAME} and each agent reads the environment variable NAME:

    line 68
  5. Very specific:

    Create skills in .agents/skills/, never as real folders in .claude/skills/.

    line 98
  6. Very specific:

    Keep single-agent files where that agent expects them: .claude/settings.json, .claude/agents/, .cursor/rules/*.mdc, and so on.

    line 100
  7. Very specific:

    Add a folder to TARGETS in link-skills.sh only for an agent that can't read .agents/skills/.

    line 104

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

Shared configuration for every coding agent, in the open Agent Skills and AGENTS.md formats. Make changes here. Files in .claude/, .cursor/, .codex/ and .mcp.json are either generated from this folder or belong to one agent only.

Layout

PathWhat it holds
skills/<name>/Shared skills (committed): SKILL.md plus references/NOTES.md
skills-local/<name>/Private skills (gitignored)
mcp/servers.jsonThe MCP servers every agent gets
mcp/servers.example.jsonOne example of each kind of server; nothing reads it
scripts/link-skills.shLinks skills into .claude/skills/
scripts/sync-mcp.shRenders servers.json into each agent's MCP config
scripts/package-skill.shZips a skill as dist/<name>-v<version>.zip
scripts/add-to-repo.shCopies this setup into another project without overwriting anything
tests/run.shSelf-tests for the scripts; run them after changing one
REFERENCE.mdWhat each agent reads, how to migrate a repo, and known traps

Skills

Use the new-skill skill. In short:

  1. Run .agents/skills/new-skill/scripts/create.sh <name> "<description>", adding --local for a private skill.
  2. Write the steps in SKILL.md and fill in references/NOTES.md.
  3. Commit the skill folder and its link in .claude/skills/.

To install someone else's skills, run npx skills add <owner/repo> --skill <name> -y. It puts the skill in .agents/skills/, links it for Claude Code, and records it in skills-lock.json; commit all three.

AgentWhere it finds skills
Claude Code.claude/skills/, through the links
Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Amp, Devin.agents/skills/ directly

MCP servers

Edit mcp/servers.json, run .agents/scripts/sync-mcp.sh, and commit .mcp.json, .cursor/mcp.json and .codex/config.toml with it.

{
  "docs": {
    "type": "http",
    "url": "https://example.com/mcp",
    "headers": { "Authorization": "Bearer ${DOCS_TOKEN}" }
  },
  "browser": {
    "type": "stdio",
    "command": "npx",
    "args": ["-y", "@playwright/mcp@latest"],
    "codex": { "startup_timeout_sec": 30 }
  }
}
  • type is stdio (fields command, args, env) or http (fields url, headers). Leave it out and it's worked out from command or url.
  • claude, cursor and codex hold extra fields for that agent only, copied as they are. Set one to false to leave the server out of that agent.

Secrets never go in the file. Write ${NAME} and each agent reads the environment variable NAME:

  • Claude Code expands ${NAME} itself, and Cursor gets ${env:NAME}.
  • Codex can't expand variables, so the script rewrites them. In env, "NAME": "${NAME}" becomes env_vars = ["NAME"] (the name can't change). In headers, "Authorization": "Bearer ${NAME}" becomes bearer_token_env_var, and "Header": "${NAME}" becomes env_http_headers. Any other use of a variable fails with a message saying why.
  • List every variable a stdio server needs under env. Codex starts servers with only basics such as PATH and HOME, plus what is listed.
  • In remote servers' headers, Claude Code blanks some credential variables, such as ANTHROPIC_API_KEY and NPM_TOKEN. Use a variable name of your own.
  • Apps started from the macOS Dock may not see variables set in your shell profile. Start the agent from a terminal if a server can't find its key.
AgentReadsNotes
Claude Code.mcp.jsonAsks before using a project's servers the first time
Cursor.cursor/mcp.jsonCloud Agents ignore it and use the settings at cursor.com/agents
Codex.codex/config.tomlTrusted projects only

Codex asks whether to trust a project the first time it opens there. Where you can't trust the project, sync-mcp.sh install-codex copies the servers into a marked block in ~/.codex/config.toml (or $CODEX_HOME), and uninstall-codex removes it. It refuses to add a server name that file already defines, because a duplicate stops Codex from starting.

Rules

  • Create skills in .agents/skills/, never as real folders in .claude/skills/.
  • Change MCP servers in servers.json, never in the generated files.
  • Keep single-agent files where that agent expects them: .claude/settings.json, .claude/agents/, .cursor/rules/*.mdc, and so on.
  • link-skills.sh check and sync-mcp.sh check run in pre-commit and CI, and both must pass.
  • Add a folder to TARGETS in link-skills.sh only for an agent that can't read .agents/skills/.

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.