memory-sync

Synchronize canonical project memory with generated AGENTS.md and CLAUDE.md files.

10|1|Updated Feb 21, 2026
One-click install
npx skills add https://github.com/dongzhuoyao/tao-research-skills --skill memory-sync-dongzhuoyao
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: memory-sync
Source: https://github.com/dongzhuoyao/tao-research-skills/tree/main/memory-sync
Command: npx skills add https://github.com/dongzhuoyao/tao-research-skills --skill memory-sync-dongzhuoyao

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Repositories that maintain separate memory files for Codex (AGENTS.md) and Claude Code (CLAUDE.md) can easily drift or require tedious dual edits; this Skill centralizes a canonical Markdown memory file and automates generation and validation of the host-facing outputs to prevent divergence.

Core Features & Use Cases

  • Canonical memory: Enforces a single source of truth at memory/project.md and optionally a Claude-only overlay at memory/claude.md.
  • Deterministic generation: Produces AGENTS.md and a thin CLAUDE.md wrapper that imports @AGENTS.md, with a clear generated-file banner.
  • CLI workflow: Provides init, sync, and check commands to initialize templates, regenerate outputs, and detect stale/generated drift.
  • Use case: Ideal for projects that share memory between Claude Code and Codex or for maintainers who need an automated drift check during CI or contributor workflows.

Quick Start

Initialize and synchronize the repository memory by running the memory-sync CLI's init, sync, or check commands against the target repository path.

Frequently Asked Questions about memory-sync

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I keep AGENTS.md and CLAUDE.md from drifting apart in my repository?

To prevent AGENTS.md and CLAUDE.md drift, you can centralize a canonical memory file and use a CLI to deterministically regenerate both outputs, ensuring they stay synchronized. This approach maintains a single source of truth for your project memory.

What is the best way to sync project memory files for Codex and Claude Code?

The best way to sync project memory files for Codex and Claude Code is to maintain a canonical Markdown source and automate generation of the host-facing outputs. A CLI can validate exact matches between the source and generated files to prevent divergence.

How do I initialize a single source of truth for repository memory?

You initialize a single source of truth for repository memory by running a CLI init command that sets up a canonical memory file, such as memory/project.md. From there, you can regenerate the required AGENTS.md and CLAUDE.md files automatically.

Can I run a drift check on generated agent memory files during CI?

Yes, you can run a drift check on generated agent memory files during CI by using a CLI check command. This command verifies exact matches between your canonical project memory and the generated AGENTS.md and CLAUDE.md files to detect stale outputs.

Do I need to manually edit both CLAUDE.md and AGENTS.md when adding project context?

No, you do not need to manually edit both CLAUDE.md and AGENTS.md. By centralizing your project context in a canonical memory file, you edit once and use a CLI to regenerate the host-facing outputs, avoiding tedious dual edits.

Why does my CLAUDE.md file just import AGENTS.md instead of containing full context?

Your CLAUDE.md file just imports AGENTS.md because the generation process creates a thin wrapper that references the fully generated AGENTS.md file. This deterministic approach ensures both Codex and Claude Code share identical memory without duplicating content.