The first time I tried to share my agent setup across repos, I shared too much. I took the best AGENTS.md I had and used it everywhere. Within a day, an agent in a different repo was running a test command that only existed in the first one.
The setup wasn't wrong. It was mixed. Some lines were true everywhere, some only in that repo, and some were just my habits. Sharing only works when you separate them.
Three kinds of knowledge
Repo facts. The build command, the folder layout, the service this repo talks to, the one strange migration step. These are true in one repo and false in the next. They belong in that repo's own AGENTS.md, committed with the code.
Shared conventions. How your team writes commits, how you structure an API handler, what a good test looks like, which checks run before a pull request. These are true across many repos. They're what's worth sharing.
Personal habits. "Explain your plan before editing", "keep replies short", the way you like diffs summarized. These are yours, not the repo's or the team's. They belong at user level: ~/.claude/CLAUDE.md for Claude Code and ~/.codex/AGENTS.md for Codex.
A test for each line
When I sort a file, I ask two questions about each line.
Would this be true in a different repo? If no, it's a repo fact. Keep it local.
Would a teammate want this too? If no, it's a personal habit. Move it to your user-level file.
If both answers are yes, it's a shared convention. Those are the lines to put in one place.
Repos in a family
There's a fourth case: repos that are nearly the same, like one config repo per country. A rule like "the French config uses the EU endpoint" is a repo fact, but it follows a pattern shared by the whole family.
In Baudrier, that's what contexts are for. The harness holds the shared conventions, and a context holds the part specific to one project or market. A repo-family rule picks the right context from the repo's name, so api-service-config-fr gets the fr context without anyone editing a file in that repo.
Skills follow the same rules
The same sorting applies to skills. A skill that runs your team's standard release steps is shared. A skill that debugs one service's flaky test is a repo fact, and it should stay in that repo's skills folder.
When an agent proposes a new skill back to the shared harness, this is the first question I ask in review: is this true beyond the repo it came from?
What stays in the repo file
With Baudrier, a connected repo's AGENTS.md has a short Baudrier block that points the agent to the shared harness. Everything outside that block is yours: repo facts stay right there, committed and reviewed with the code. Baudrier never touches them.
So the repo file gets shorter and more specific, and the shared part lives in one place where you can review every change.
Try it
Baudrier is in closed Alpha, for Claude Code and Codex. Request an invite and tell me how much of your current AGENTS.md is really shared.