LeoYeAI/agent-master-skills / skills/agent-memory-system-guide
Agent Memory System Guide
VerifiedAn agent memory workflow guide for OpenClaw and Codex with MEMORY.md, daily notes, SESSION-STATE, working-buffer, Obsidian archiving, and optional OpenViking support.
tests/test_memory_recovery_contract.py
View on GitHubfrom pathlib import Path
def test_skill_mentions_recovery_templates():
repo_root = Path(__file__).resolve().parents[1]
skill_text = (repo_root / 'SKILL.md').read_text(encoding='utf-8')
assert 'SESSION-STATE.md' in skill_text
assert 'working-buffer.md' in skill_text
assert 'templates/OBSIDIAN-NOTE.md' in skill_text
assert 'frontmatter' in skill_text
assert 'Dataview' in skill_text
assert '启动时' in skill_text
assert '结束时' in skill_text
assert '恢复' in skill_text
def test_session_state_template_uses_compact_recovery_format():
repo_root = Path(__file__).resolve().parents[1]
template_text = (repo_root / 'templates' / 'SESSION-STATE.md').read_text(encoding='utf-8')
for section in ['## 当前任务', '## 已完成', '## 卡点', '## 下一步', '## 恢复信息']:
assert section in template_text
for forbidden in ['## Task', '## Status', '## Owner', '## Last Updated', '## Cleanup Rule']:
assert forbidden not in template_text
def test_skill_declares_session_state_as_single_compact_contract():
repo_root = Path(__file__).resolve().parents[1]
skill_text = (repo_root / 'SKILL.md').read_text(encoding='utf-8')
assert '`SESSION-STATE.md` 只使用仓库模板提供的简洁结构' in skill_text
assert '不要写入 `Task`、`Status`、`Owner`、`Last Updated`、`Cleanup Rule`' in skill_text
assert '`Current Task` 合并到 `当前任务`' in skill_text
assert '`Status` 合并到 `已完成`、`卡点` 或 `下一步`' in skill_text
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |