outerlayer init sets them up.
A repository keeps one copy of each file. Nothing is generated, so there is nothing to compile.
The layout
AGENTS.md at the repository root. Codex reads skills from .agents/skills/. Claude Code reads skills from .claude/skills/, so the link gives both tools the same skills.
The .outerlayer directory describes each file in .outerlayer/.
Run Codex with the factory’s context
Runouterlayer codex in place of codex. It starts Codex with the instructions, skills, hooks and MCP server that your control plane or repository holds. See outerlayer codex for what the launch writes and where.
Codex cuts the AGENTS.md of a project at 32 KiB, so a longer file loses its end. The launch sets project_doc_max_bytes above the size of the delivered AGENTS.md. The whole file reaches Codex. In a plain codex, raise the limit with project_doc_max_bytes in ~/.codex/config.toml.
outerlayer sync uploads the Codex sessions that start for a work item. See What leaves your machine.
Set up
-
Run
outerlayer initin the repository. -
Commit the files it wrote.
initprints thegit add,git commitandgit pushcommands. - Merge the commit to your base branch. OuterLayer reads judges from the base branch, and a build reads the repository from your git host.
init writes each of these files only when it is missing. It changes nothing you wrote.
The
outerlayer MCP server needs outerlayer login on each machine that uses it. The outerlayer-docs server lets your agent look up how OuterLayer works. When OpenCode is installed on the machine, init also adds the two servers to opencode.json. When Codex is installed, init also adds them to .codex/config.toml.
In a repository that a control plane governs, init writes none of these files. See Instructions that come from another repository.
init also connects the repository and installs the hooks. outerlayer init lists every step and flag. The Quickstart shows the whole first run.
When init leaves a file alone
.claude/skills/already holds skills:initmakes no link. Move those skills into.agents/skills/, delete.claude/skills/, and runouterlayer initagain.- The repository has a
CLAUDE.mdand noAGENTS.md:initwrites noAGENTS.md. Add anAGENTS.mdfor the instructions that every tool reads.
Sessions without the link
outerlayer claude gives Claude Code the skills in the repository root’s .agents/skills/ without the link. A runner starts a build’s agent the same way. A plain claude needs the link.
To skip the link, run outerlayer init --no-skills-link.
On Windows, git commits a link only when
core.symlinks is true. Without it, git writes a text file in place of the link, and Claude Code finds no skills. Run git config core.symlinks true, or start sessions with outerlayer claude.Write the starter files with no login
Runouterlayer init --local --template default. It makes no network call. It writes the starter skills and declares "layout": 2 in .outerlayer/config.json. It writes no AGENTS.md, adds no MCP servers and makes no .claude/skills link.
Check the setup
Runouterlayer doctor. It names each file that needs a change and says how to fix it.
To see the instructions and skills that a build receives, run outerlayer context show.
Protect these files
A change to these files changes what agents are told and what the judges accept. OuterLayer marks a pull request that edits.outerlayer/. It does not mark a change to AGENTS.md, .agents/, .claude/ or .mcp.json.
To require a person’s review of all of them, name them in .github/CODEOWNERS. See Require a person’s review of rules changes.
Compile slash commands
A file in.outerlayer/commands/ is a slash command. outerlayer context emit compiles each one into .claude/commands/. In this layout it writes nothing else.
emit needs "targets": ["claude-code"] in .outerlayer/config.json. In CI, run outerlayer context emit --check. It writes nothing. It exits 1 when an output is missing, differs from its source, or has no source. See outerlayer context emit.
Move a repository to this layout
A repository in the earlier layout keeps its instructions and skills in.outerlayer/ and commits compiled copies.
- Run
outerlayer init --update --dry-runto see the plan. - Run
outerlayer init --update. - Fix each file the command lists, and run the command again.
- Review the diff and commit it. The command commits nothing.
Command sources in
.outerlayer/commands/ stay where they are.
The command never moves or deletes a file you edited. It lists each one. Fix the file as follows:
- A source whose new place already holds a file of yours: keep one of the two.
- A source whose new place git ignores: add an exception to
.gitignore, such as!/.agents/. - A file in
.claude/skills/that is not generated: move or delete it, so the command can make the link. - A file you edited that still names
.outerlayer/skills/: change the path.
--no-skills-link. Update the files init wrote lists every flag, including --control-plane.