40 files demonstrating every major OpenClaw capability using Claude Code: - 3 agents (researcher, writer, reviewer) - 3 skills (daily-briefing, slack-message, web-research) - 2 security hooks (pre-tool-use blocker, post-tool-use logger) - 10 self-contained examples with copy-paste prompts - Complete feature map (20 capabilities, 11 full match, 7 different, 2 gap) - Security docs including NemoClaw comparison - Automation, messaging, browser, memory documentation Zero dependencies. Clone and run. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1.8 KiB
Example 05: Memory System
Capability: Claude Code maintains persistent memory across sessions through a hierarchy of markdown files. What is written in one session is available in the next.
OpenClaw equivalent: Daily markdown logs + MEMORY.md + vector search (SQLite-vec).
How the Hierarchy Works
Claude Code loads context in this order, from broadest to narrowest:
~/.claude/CLAUDE.md- global preferences, always loadedCLAUDE.mdin the project root - project-specific config, always loadedmemory/MEMORY.md- session state, loaded if referenced in CLAUDE.md.claude/managed memory - auto-updated by Claude when--memoryis active
The file loaded earlier provides the frame. Later files narrow it.
The Prompt
Read this project's CLAUDE.md and summarize what you learn about the project
in three bullet points.
Then create a file at memory/project-notes.md with:
- Today's date as a header
- The three-bullet summary
- A note that says "Memory system demonstrated successfully"
Finally, explain in one paragraph how this file will be available in the
next Claude Code session without re-reading CLAUDE.md.
What Happens
Claude Code will:
- Use Read to load
CLAUDE.mdfrom the project root - Synthesize the project context into three bullets
- Use Write to create
memory/project-notes.md - Explain how CLAUDE.md references cause files to be auto-loaded
Why This Matters
OpenClaw uses SQLite-vec for semantic memory search across sessions. Claude Code uses structured markdown with explicit file references. Both achieve persistence. The markdown approach is more inspectable: you can read, edit, and version control every piece of memory Claude has about your project.
The memory/MEMORY.md file in this repo shows the pattern at scale.