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.
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
- Very specific: line 25
Use the new-skill skill. In short:
- Very specific: line 29
Write the steps in SKILL.md and fill in references/NOTES.md.
- Very specific: line 30
Commit the skill folder and its link in .claude/skills/.
- Very specific: line 68
Secrets never go in the file: Write ${NAME} and each agent reads the environment variable NAME:
- Very specific: line 98
Create skills in .agents/skills/, never as real folders in .claude/skills/.
- Very specific: line 100
Keep single-agent files where that agent expects them: .claude/settings.json, .claude/agents/, .cursor/rules/*.mdc, and so on.
- Very specific: line 104
Add a folder to TARGETS in link-skills.sh only for an agent that can't read .agents/skills/.
≈ “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.
Files
.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
| Path | What it holds |
skills/<name>/ | Shared skills (committed): SKILL.md plus references/NOTES.md |
skills-local/<name>/ | Private skills (gitignored) |
mcp/servers.json | The MCP servers every agent gets |
mcp/servers.example.json | One example of each kind of server; nothing reads it |
scripts/link-skills.sh | Links skills into .claude/skills/ |
scripts/sync-mcp.sh | Renders servers.json into each agent's MCP config |
scripts/package-skill.sh | Zips a skill as dist/<name>-v<version>.zip |
scripts/add-to-repo.sh | Copies this setup into another project without overwriting anything |
tests/run.sh | Self-tests for the scripts; run them after changing one |
REFERENCE.md | What each agent reads, how to migrate a repo, and known traps |
Skills
Use the new-skill skill. In short:
- Run
.agents/skills/new-skill/scripts/create.sh <name> "<description>", adding--localfor a private skill. - Write the steps in
SKILL.mdand fill inreferences/NOTES.md. - 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.
| Agent | Where 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 }
}
}typeisstdio(fieldscommand,args,env) orhttp(fieldsurl,headers). Leave it out and it's worked out fromcommandorurl.claude,cursorandcodexhold extra fields for that agent only, copied as they are. Set one tofalseto 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}"becomesenv_vars = ["NAME"](the name can't change). Inheaders,"Authorization": "Bearer ${NAME}"becomesbearer_token_env_var, and"Header": "${NAME}"becomesenv_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 asPATHandHOME, plus what is listed. - In remote servers' headers, Claude Code blanks some credential variables,
such as
ANTHROPIC_API_KEYandNPM_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.
| Agent | Reads | Notes |
| Claude Code | .mcp.json | Asks before using a project's servers the first time |
| Cursor | .cursor/mcp.json | Cloud Agents ignore it and use the settings at cursor.com/agents |
| Codex | .codex/config.toml | Trusted 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 checkandsync-mcp.sh checkrun in pre-commit and CI, and both must pass.- Add a folder to
TARGETSinlink-skills.shonly for an agent that can't read.agents/skills/.
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
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.

