How to share AI agent configuration across projects and tools
Rules, skills, subagents and MCP servers stay the same across projects when each has one source and every project receives it through something that can be updated. Your user-level configuration does that when the projects are all yours. A plugin or a shared repository does it when other people need the same files. A common file format or a tool that writes each format does it when you work in more than one AI coding tool. A copied folder is the one option with no update path, because a fix made in one copy never reaches the others.
A developer has three repositories, a web shop, an admin console and a mobile API, and works in Claude Code and Cursor. What should travel between them is a set of commit rules, a review skill, a reviewer subagent and the MCP server for the issue tracker.
What agent configuration consists of
| Kind | What it is | Where Claude Code reads it in a project |
|---|---|---|
| Rules | Instructions the agent loads in every session | CLAUDE.md or AGENTS.md |
| Skill | A reusable set of instructions that the tool loads when it is relevant, often run as a slash command | .claude/skills/<name>/SKILL.md |
| Subagent | A specialist the tool can hand work to, with its own instructions | .claude/agents/<name>.md |
| MCP server | A connection to an external tool or data source | .mcp.json |
The four depend on each other. The review skill hands work to the reviewer subagent, and the subagent expects the issue tracker's MCP server. Whichever option you choose has to carry the parts that refer to each other, or the skill fails at its second step in the project that received only the skill.
What to take out before anything is shared
Facts about one project, such as "the payments module must not import from the legacy cart", belong to that project's own rules. What a single change needs belongs in neither place. It goes into a spec for that change, as how to write a spec for an AI coding agent explains, and both kinds of document have their place in the guide to spec-driven development. Secrets belong nowhere in shared configuration, so every token in an MCP server definition becomes a reference to an environment variable before the file leaves the repository.
Sharing between your own projects on one machine
User-level configuration
Each tool has a place for configuration that applies to every project you open. Claude Code reads ~/.claude/CLAUDE.md, the rules under ~/.claude/rules/ and the skills under ~/.claude/skills/. Codex reads ~/.codex/AGENTS.md before any project file. Cursor has user rules next to its project rules.
For the commit rules and the review skill this is the shortest route, because you move them once and all three repositories have them. The limit is that the files are on your machine and not in the repository. A teammate who clones the web shop gets none of it.
Symlinks to one directory
Keep the shared files in one directory and link them into each repository. Claude Code's documentation describes this for rules: the .claude/rules/ directory "supports symlinks, so you can maintain a shared set of rules and link them into multiple projects". Claude Code asks you once per project to approve rules linked from outside the working directory.
A symlink keeps the files visible inside the project, which user-level configuration doesn't. It still points at a path on one machine, so it serves one person.
Sharing with other people
A shared repository as a git submodule
Put the shared configuration in a repository of its own and add it to each project:
git submodule add https://github.com/your-org/agent-config .agent-configEach project pins a commit of the shared repository, and a project takes a newer state by running git submodule update --remote and committing the result. That gives you versions and a review step with no extra tooling. The cost is the submodule itself: every clone needs --recurse-submodules, and the files land in .agent-config, so each tool's own directory has to link to them or import them.
A template repository
A template gives a new project the whole configuration on its first commit. Nothing connects the project to the template afterwards. Use it together with another option, because the first edit in either project is the start of two different configurations.
Plugins and marketplaces
A plugin is the tools' own answer to this problem. In Claude Code a plugin is "a directory of skills, agents, hooks, MCP servers, or other components that Claude Code installs and loads as one unit", which is the whole example in one package. A marketplace is a repository with a file that lists plugins. A marketplace repository can be private, and a teammate registers it with one command:
claude plugin marketplace add your-org/agent-pluginsInstalled at project scope, a plugin is enabled for everyone who works in the repository through the committed .claude/settings.json, and each person still installs it on their own machine. Skills from a plugin carry its name as a prefix, so the skill runs as /team-tools:review.
Cursor takes the same route. Its documentation says that rules "aren't imported on their own" and are shared by packaging them in a plugin. On Cursor's Team and Enterprise plans, team rules set in the dashboard apply to every member.
The limit of a plugin is that it belongs to one tool. The Claude Code plugin does nothing for the same developer's Cursor sessions.
The skills CLI
The skills CLI installs skills from a repository into the directories of whichever tools you use:
npx skills add your-org/agent-skillsIt installs into the project by default and into your home directory with --global, it can link every tool to one copy of a skill, and npx skills update brings in newer versions. Whole methods are distributed this way. The BMAD Method, which has a comparison with Athenode on this site, is installed with npx skills add bmad-code-org/BMAD-METHOD. The CLI carries skills only, so the commit rules, the subagent and the MCP server need another route.
Sharing across AI coding tools
AGENTS.md as the common rules file
AGENTS.md is an open format for agent instructions, described by its maintainers as "a README for agents" and, by their count in October 2026, used by over 60,000 open-source projects. Codex and Cursor read it from the project root and from subdirectories. Claude Code reads it when the project has no CLAUDE.md, and a CLAUDE.md can import it with @AGENTS.md when you want both.
For the example, the commit rules go into one AGENTS.md and both tools follow them. A rule that keeps an agent inside its task belongs there too, and how to keep track of what your AI agent finds gives its wording. AGENTS.md covers rules and nothing else.
One format for skills, separate formats for the rest
Skills have a common format too. Agent Skills defines a skill as a folder containing a SKILL.md file, and the format is an open standard that many tools read. The folder still has to sit where each tool looks for it, .claude/skills/ for one and .cursor/skills/ for the other, which is the job the skills CLI does.
Subagents and MCP servers have no shared format. Claude Code defines a subagent in a Markdown file and Codex in a TOML file. MCP servers are listed in .mcp.json for Claude Code, .cursor/mcp.json for Cursor and .codex/config.toml for Codex. Sharing these across tools means writing each file by hand or using something that writes them from one source.
Which option fits which situation
| Your situation | Option | What it carries | How an update arrives |
|---|---|---|---|
| Your own projects, one tool | User-level configuration | Rules and skills | You edit one file |
| Your own projects, files visible in the repository | Symlinks | Rules, and skills through the skills CLI | You edit one file |
| A team, any tool | Shared repository as a submodule | Any files | Each project updates its pinned commit |
| A new project that should start complete | Template repository | Any files | It doesn't |
| A team on one tool | Plugin from a marketplace | Skills, subagents, hooks and MCP servers | A new version of the plugin |
| Skills across several tools | The skills CLI | Skills | npx skills update |
| Rules across several tools | AGENTS.md |
Rules | A commit to the file |
No row carries all four kinds across both tools and both people. The developer in the example ends up with two options side by side: AGENTS.md for the commit rules, and a Claude Code plugin for the skill, the subagent and the MCP server, with the Cursor side written by hand.
The alternative to combining options is a tool that holds all four kinds once and writes each AI tool's files from that source. My own product, Athenode, is a local console for AI coding agents that does this with plugins of its own. An Athenode plugin is a named bundle of what your AI coding tools work with: skills, agents (subagents in most AI tools), rules, MCP servers and plugin files. A plugin belongs to a project in Athenode, and one command installs it into your repository in the format each tool reads, as a plugin package for the tools that load one and as files for the others, for the 30 supported AI tools. The plugin library is the shared catalogue of plugins that projects have published, and you can add a whole plugin from it or merge only the parts you need. Plugins explains the model, and the quickstart installs your first one.
Sources
- Anthropic, How Claude remembers your project, Claude Code documentation
- Anthropic, Plugins overview and Create a marketplace, Claude Code documentation
- OpenAI, AGENTS.md, Codex documentation
- Cursor, Rules
- AGENTS.md
- Agent Skills
- Vercel Labs, skills