codex-mirrorlisted
Install: claude install-skill tonydzi/second-brain-starter-kit
# codex-mirror — the shared-canon mirror for Codex
The pain (found 2026-07-25): CLAUDE.md went through a v2 revision on 07-22, while `~/.codex/AGENTS.md` quietly stayed on its June version — **Codex worked off stale rules for a month**, and the drift checker of that era was blind to the very same revision. The cure: the mirror is **version-based** (we compare versions, not shape), a watchdog shouts at night, and this skill is the cheap "rebuild" button so that the shouting doesn't turn into evening manual labour.
Roles (AK-47): the **script** moves the bytes and checks everything; **I** only write the text of the new rules. Do not retype the file by hand and do not eyeball the byte count.
Engine: `python %USERPROFILE%\.claude\scripts\codex_mirror.py <check|backup|stamp|publish|selftest>`
## Step 0 — RECALL + the frame
- Memory: [[canon-versioning-and-drift-watchdog]] (the class "the watchdog died silently together with the thing it watched"), [[codex-cli-install]], [[any-llm-vault-actor]], [[claude-md-compression-contract]].
- The mirror = a **canon edit** → only the owner's machine in a live session; followers are receive-only ([[machine-governance-leader-follower]]).
- The 32 KiB cap is hard (DR 06-29: "lost in the middle" — a bloated file is WORSE than an empty one). The mirror = a distillation + pointers, NOT a copy of CLAUDE.md.
## Step 1 — What exactly is stale
```
python %USERPROFILE%\.claude\scripts\codex_mirror.py check
```
Prints both versions, the headroom lef