# Codex Init

> Initialize a repo-local brainerd brain for Codex. Use when the user asks to set up brainerd in a repo, create the repo brain, or install the managed AGENTS.md block that tells Codex to read the brain entrypoints. Use when this capability is needed.

- Skill: `tomevault-io/codex-init` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add tomevault-io/codex-init`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tomevault-io/codex-init/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: tomevault-io (https://skillmd.com/u/tomevault-io)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/tomevault-io/codex-init

---


# Codex Init

Use this skill to initialize brainerd for Codex in the current repo.

On Windows, replace `../../scripts/brainerd-codex.sh` with
`..\..\scripts\brainerd-codex.cmd` in the commands below.

## Workflow

1. Run:

```bash
../../scripts/brainerd-codex.sh init
```

2. This creates any missing `brain/` managed files and installs or updates the
   managed `AGENTS.md` block.
3. Review the bootstrap preview.
4. Do not create the operations note unless the user explicitly asked for it or
   confirms after seeing the preview.
5. To apply the bootstrap note, run:

```bash
../../scripts/brainerd-codex.sh init --apply-bootstrap
```

## Rules

- Only this skill may edit `AGENTS.md`, and only through the managed
  `brainerd` block.
- Do not edit any repo files outside `brain/` and the managed `AGENTS.md`
  block.
- If `AGENTS.md` contains multiple `brainerd` managed blocks, stop and surface
  the error instead of editing the file.
- End with a short summary of what was created, what was preserved, and whether
  bootstrap was only previewed or actually applied.

---
> Source: [MylesMCook/brainerd](https://github.com/MylesMCook/brainerd) — distributed by [TomeVault](https://tomevault.io).
<!-- tomevault:4.0:skill_md:2026-05-23 -->

