share-memory
Installation
SKILL.md
ShareMemory Skill
Sets up and maintains a file-based shared memory (AI_MEMORY/) that Claude Code and Codex both read/write in the same project, so each agent sees the other's decisions and changes.
This skill is installable on both platforms (same folder, same SKILL.md):
- Claude Code:
~/.claude/skills/share-memory/(personal) or<project>/.claude/skills/share-memory/(project) - Codex:
~/.agents/skills/share-memory/
AGENT_NAME: use Claude when running as Claude Code, Codex when running as Codex.
After init, the rules live in the project's MEMORY_PROTOCOL.md — that file (not this skill) is the source of truth for day-to-day behavior.
Memory model:
SYNC_LOG.md+archive/are daily handoff history, with at most one block per date.PROJECT.md,DECISIONS.md,TASKS.md, andLEARNINGS.mdare current views.- Boot layer:
AGENTS.mdcarries the shared agent-neutral rules;CLAUDE.mdimports it via@AGENTS.mdand adds Claude-only notes. All skill-managed boot content lives inside<!-- SHAREMEMORY:START -->/<!-- SHAREMEMORY:END -->marker blocks. - Before ANY write inside
AI_MEMORY/(incl. creating or archiving files), acquireAI_MEMORY/.write.lockper the protocol.
Determine the operation from the user's intent: init, update, status, consolidate, repair, or migrate.