persistent-memory
Skill1 starsChanged 6 months agoMITView on GitHub
Shen-Hua project memory manager. Use whenever Codex needs to initialize, read, repair, update, or summarize the project's `.agent/` working memory files, including PROJECT_BRIEF.md, PLAN.md, TASKS.md, LOG.md, DECISIONS.md, HANDOFF.md, and REVIEW_CHECKLIST.md for long-running tasks.
6 other projects use a version of this.
Adopted by
Most recently taken up by
- mthines/agent-skillstheir own version, first seen Sep 25, 2026
- songjiun10-collab/Senior-thinking-skillstheir own version, first seen Sep 25, 2026
- aws-solutions/konductortheir own version, first seen Sep 23, 2026
- dbozic/claude-skillstheir own version, first seen Sep 18, 2026
- yantrikos/yantrikdb-mcptheir own version, first seen Aug 19, 2026
- whaojie797-design/Novera-AI-skillstheir own version, first seen Jul 25, 2026
Other versions6 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 6
- songjiun10-collab/Senior-thinking-skills★ 82same name
- yantrikos/yantrikdb-mcp★ 24same name
- mthines/agent-skills★ 13same name
- aws-solutions/konductor★ 9same name
- whaojie797-design/Novera-AI-skills★ 2same name
- dbozic/claude-skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository9 other files it gives its agents.
- templates/AGENTS.mdAGENTS.md
- deep-plannerSkill
- handoff-writerSkill
- project-commanderSkill
- runtime-operatorSkill
- self-reviewerSkill
- shen-huaSkill
- subagent-orchestratorSkill
- verification-loopSkill
The file
We split this skill into the rules it gives an agent
11 rules. 0 are common, 7 are distinctive, and 4 are very specific to this project.
0
Common
Most of the 6 edited versions we read keep these.
7
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
Use this skill when:
- Distinctive: line 19
Do not use this skill when:
- Very specific: line 35
When Shen-Hua V2 runtime is enabled, also maintain:
- Distinctive: line 45
Read existing memory before changing it.
- Distinctive: line 47
Use timestamps for log entries.
- Distinctive: line 48
Prefer concise append/update blocks over wholesale rewrites.
- Very specific: line 50
Keep .agent/HANDOFF.md current enough that another agent can resume immediately.
- Distinctive: line 54
When invoked, update at least one relevant memory file.
- Very specific: line 65
Use $runtime-operator when the task needs queue operations, memory indexing/search, resume prompt generation, automation prompts, sync …
- Very specific: line 69
Do not launch subagents for routine memory updates.
- Distinctive: line 73
No build/test command is required for memory-only edits.
“Common” is measured: kept by at least 6 in 10 of the 6 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Persistent Memory
Persistent Memory keeps long-running project context in .agent/ so future Codex sessions can resume with less drift.
Trigger Conditions
Use this skill when:
.agent/files are missing, stale, inconsistent, or need initialization.- Starting, continuing, pausing, or handing off long-running work.
- A plan, decision, task status, verification result, or blocker must persist across turns.
Do Not Trigger
Do not use this skill when:
- The user explicitly forbids writing project memory.
- The task is truly one-shot and no project state changes.
- A different project memory system is mandated by the user and conflicts with
.agent/.
Memory Files
Maintain these files:
.agent/PROJECT_BRIEF.md: stable project goal, constraints, source priority, commands, conventions..agent/PLAN.md: current plan, phases, milestones, verification gates..agent/TASKS.md: task list with status, owner/role, and next action..agent/LOG.md: append-only chronological work log..agent/DECISIONS.md: durable decisions with rationale and alternatives..agent/HANDOFF.md: resume instructions for the next agent/session..agent/REVIEW_CHECKLIST.md: self-review and quality checklist.
When Shen-Hua V2 runtime is enabled, also maintain:
.agent/state/tasks.jsonl: machine-readable task queue..agent/state/events.jsonl: append-only runtime event log..agent/state/memory-index.json: local memory retrieval index..agent/state/sync-outbox.jsonl: external sync outbox..agent/resume-prompt.md: future-session resume prompt..agent/automation-prompt.md: Codex automation prompt.
Update Rules
- Read existing memory before changing it.
- Preserve useful prior context; do not rewrite history into fiction.
- Use timestamps for log entries.
- Prefer concise append/update blocks over wholesale rewrites.
- Mark uncertainty explicitly.
- Keep
.agent/HANDOFF.mdcurrent enough that another agent can resume immediately.
Required .agent/ Updates
When invoked, update at least one relevant memory file. For ordinary long-task rounds, update:
.agent/LOG.md.agent/TASKS.md.agent/HANDOFF.md
For first-time setup, create all seven files with usable starter content.
Other Skills
Persistent Memory supports all Shen-Hua skills. It does not need to call other skills unless memory repair reveals that planning, verification, review, or handoff is missing.
Use $runtime-operator when the task needs queue operations, memory indexing/search, resume prompt generation, automation prompts, sync export, or the runtime gate.
Subagents
Do not launch subagents for routine memory updates. If multiple subagents are already running, record their assignments and statuses in .agent/TASKS.md and .agent/HANDOFF.md.
Verification Commands
No build/test command is required for memory-only edits. Validate by confirming the files exist and contain no placeholder-only sections.
Output Format
MEMORY UPDATE
Files read:
Files updated:
New facts:
Open uncertainties:
Next resume point:Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

