Memory Skill — Codex

Retrieve and update Markdown knowledge vault entries with link and index rules.

2|Updated Apr 21, 2026
One-click install
npx skills add https://github.com/Long-as-Python/Agent-memory-system --skill memory-skill-codex
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Memory Skill — Codex
Source: https://github.com/Long-as-Python/Agent-memory-system/tree/main/skills/codex
Command: npx skills add https://github.com/Long-as-Python/Agent-memory-system --skill memory-skill-codex

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It helps Codex interact with your long-term memory vault by performing targeted retrieval before work and applying a safe write protocol after the task finishes, so the agent updates knowledge without corrupting canonical documents.

Core Features & Use Cases

  • Retrieval pipeline before action: Reads the vault index, finds relevant starting nodes, traverses links to depth 2, and builds a task-ready context (constraints, active decisions, open questions, in-progress tasks).
  • Write gate with conservative updates: Finds 1–3 canonical candidates, decides whether to update an existing canonical document or create a new one from templates, and updates timestamps accordingly.
  • Correct linking and index maintenance: Forces links into written/updated docs, updates memory/indexes/mem-index-vault.md using the approved rules, and checks for consolidation opportunities.

Quick Start

Run the Codex workflow for your next task by first building context via the retrieval pipeline in the specified vault index and then applying the post-task write gate for memory updates.

Frequently Asked Questions about Memory Skill — Codex

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

FAQPage Schema
How do I retrieve relevant context from a markdown knowledge vault before an agent task?

To retrieve context from a markdown knowledge vault, the agent reads the vault index, finds relevant starting nodes, and traverses links to depth 2 to build a task-ready context with active decisions and constraints.

What is the safest way to write updates back to a canonical knowledge vault without corruption?

Safely writing to a canonical knowledge vault requires a write gate protocol that finds 1-3 canonical candidates, decides whether to update or create documents from templates, and updates timestamps accordingly to prevent corruption.

How do I maintain index links when adding new entity or task nodes to a memory vault?

Maintaining index links when adding nodes to a memory vault requires forcing links into written docs and updating mem-index-vault.md according to approved vault-index-rules to ensure graph consistency.

Does this memory vault retrieval pipeline limit traversal depth for operational context assembly?

Yes, the retrieval pipeline limits link traversal to strict depth 2 and enforces document-count limits while assembling operational context from entity, task, decision, and note nodes.

When should I consolidate canonical documents versus creating a new note in a knowledge graph?

You should consolidate canonical documents versus creating new notes in a knowledge graph after the write gate evaluates 1-3 canonical candidates and checks for consolidation opportunities according to the vault-index-rules.