yichen-agent-memory

Install and maintain a shared Markdown-based Agent Memory Vault for Claude Code and Codex.

2.0k|274|Updated Feb 11, 2026
One-click install
npx skills add https://github.com/mcncarl/yichen-skills --skill yichen-agent-memory
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: yichen-agent-memory
Source: https://github.com/mcncarl/yichen-skills/tree/main/yichen-agent-memory
Command: npx skills add https://github.com/mcncarl/yichen-skills --skill yichen-agent-memory

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

AI coding assistants like Claude Code and Codex forget context between sessions and cannot share a single source of long-term knowledge. This Skill installs and operates a Markdown/Obsidian-first Agent Memory Vault so both hosts read and write one consistent fact store with search, audit, and session-safe closeout.

Core Features & Use Cases

  • Shared Vault Setup: Bootstrap a private memory vault from the public agent-memory-vault repository, with thin rule and hook adapters for both Claude Code and Codex.
  • Search & Reconcile: Run unified SQLite/FTS plus optional Zvec semantic search, and use prewrite reconcile actions (ADD, UPDATE, NOOP, MARK_OUTDATED, MERGE_REQUIRED, ASK_USER) before writing memories.
  • Session-Safe Closeout & Audit: Claim changed memory files per session, commit them through a locked closeout pipeline, and run audits plus a read-only doctor for health checks.
  • Use Case: After finishing a multi-day refactoring task, ask the Agent to search the vault for prior decisions, write a new formal memory, claim it for the current session, and run closeout so the knowledge persists for both Claude Code and Codex.

Quick Start

Use the yichen-agent-memory skill to install a shared Agent Memory Vault on this machine and connect both Claude Code and Codex to it.

Frequently Asked Questions about yichen-agent-memory

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

FAQPage Schema
How do I set up a shared memory vault for Claude Code and Codex?

Clone the agent-memory-vault repository, run bootstrap.py to create a private vault, then install the canonical runtime scripts with a private TOML config. Both hosts connect through thin rule and hook adapters while Markdown remains the single fact source.

How does semantic search work in an agent memory vault?

The unified search runs SQLite/FTS and an optional Zvec vector index in parallel, merges results, and applies filters after merging. You must install the locked vector requirements and build the Zvec index with the provided scan and prune scripts.

Can Claude Code and Codex write to the same memory vault safely?

Yes, through a session-claim ledger stored in SQLite. Each host claims changed memory files per session, and closeout only commits files claimed by that actor, preventing cross-session commits and silent sweeps of unclaimed changes.

Why does memory closeout fail or skip commits?

Closeout blocks when prewrite reconcile returns MERGE_REQUIRED or ASK_USER, when files are deleted, or when checks fail. Read the warnings, resolve unclaimed dirty memory, and verify AGENT_MEMORY_ROOT and AGENT_MEMORY_GIT_ROOT are set correctly.

What should I do when the memory doctor reports issues?

Doctor is read-only and reports findings like stale session claims, Zvec hash mismatches, or missing remote backups. Follow the specific remediation per finding, such as rebuilding indexes or expiring stale claims, and never let it rewrite Markdown facts.