[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M77DKJR45WP01H1YVNF35RZW":3,"skill-same:01M77DKJR45WP01H1YVNF35RZW":84},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":61,"commitSha":62,"skillDirectory":63,"forksCount":64,"repositoryHtmlUrl":65,"repositoryHomepageUrl":66,"ownerHtmlUrl":67,"ownerBlogUrl":6,"ownerDescription":68,"updatedAt":69,"install":70,"resources":83},"01M77DKJR45WP01H1YVNF35RZW","elite-longterm-memory",null,"Ultimate AI agent memory system for Cursor, Claude, ChatGPT & Copilot. WAL protocol + vector search + git-notes + cloud backup. Never lose context again. Vibe-coding ready.","Lord1Egypt\u002Fawesome-skill-forge","Lord1Egypt","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F99746359?v=4","01M7592YDNT0XK9WJ0T2MQVPDN","Mohamed Mounir Ali AL Keshita","01M75GRFNHC8VZNWEB8DKDE433",3,"MIT","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fcommunity\u002Fclawhub\u002Fe\u002Felite-longterm-memory\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: elite-longterm-memory\nversion: 1.2.3\ndescription: \"Ultimate AI agent memory system for Cursor, Claude, ChatGPT & Copilot. WAL protocol + vector search + git-notes + cloud backup. Never lose context again. Vibe-coding ready.\"\nauthor: NextFrontierBuilds\nkeywords: [memory, ai-agent, ai-coding, long-term-memory, vector-search, lancedb, git-notes, wal, persistent-context, claude, claude-code, gpt, chatgpt, cursor, copilot, github-copilot, openclaw, moltbot, vibe-coding, agentic, ai-tools, developer-tools, devtools, typescript, llm, automation]\nmetadata:\n  openclaw:\n    emoji: \"🧠\"\n    requires:\n      env:\n        - OPENAI_API_KEY\n      plugins:\n        - memory-lancedb\n---\n\n# Elite Longterm Memory 🧠\n\n**The ultimate memory system for AI agents.** Combines 6 proven approaches into one bulletproof architecture.\n\nNever lose context. Never forget decisions. Never repeat mistakes.\n\n## Architecture Overview\n\n```\n┌─────────────────────────────────────────────────────────────────┐\n│                    ELITE LONGTERM MEMORY                        │\n├─────────────────────────────────────────────────────────────────┤\n│                                                                 │\n│  ┌─────────────┐  ┌─────────────┐  ┌─────────────┐             │\n│  │   HOT RAM   │  │  WARM STORE │  │  COLD STORE │             │\n│  │             │  │             │  │             │             │\n│  │ SESSION-    │  │  LanceDB    │  │  Git-Notes  │             │\n│  │ STATE.md    │  │  Vectors    │  │  Knowledge  │             │\n│  │             │  │             │  │  Graph      │             │\n│  │ (survives   │  │ (semantic   │  │ (permanent  │             │\n│  │  compaction)│  │  search)    │  │  decisions) │             │\n│  └─────────────┘  └─────────────┘  └─────────────┘             │\n│         │                │                │                     │\n│         └────────────────┼────────────────┘                     │\n│                          ▼                                      │\n│                  ┌─────────────┐                                │\n│                  │  MEMORY.md  │  ← Curated long-term           │\n│                  │  + daily\u002F   │    (human-readable)            │\n│                  └─────────────┘                                │\n│                          │                                      │\n│                          ▼                                      │\n│                  ┌─────────────┐                                │\n│                  │ SuperMemory │  ← Cloud backup (optional)     │\n│                  │    API      │                                │\n│                  └─────────────┘                                │\n│                                                                 │\n└─────────────────────────────────────────────────────────────────┘\n```\n\n## The 5 Memory Layers\n\n### Layer 1: HOT RAM (SESSION-STATE.md)\n**From: bulletproof-memory**\n\nActive working memory that survives compaction. Write-Ahead Log protocol.\n\n```markdown\n# SESSION-STATE.md — Active Working Memory\n\n## Current Task\n[What we're working on RIGHT NOW]\n\n## Key Context\n- User preference: ...\n- Decision made: ...\n- Blocker: ...\n\n## Pending Actions\n- [ ] ...\n```\n\n**Rule:** Write BEFORE responding. Triggered by user input, not agent memory.\n\n### Layer 2: WARM STORE (LanceDB Vectors)\n**From: lancedb-memory**\n\nSemantic search across all memories. Auto-recall injects relevant context.\n\n```bash\n# Auto-recall (happens automatically)\nmemory_recall query=\"project status\" limit=5\n\n# Manual store\nmemory_store text=\"User prefers dark mode\" category=\"preference\" importance=0.9\n```\n\n### Layer 3: COLD STORE (Git-Notes Knowledge Graph)\n**From: git-notes-memory**\n\nStructured decisions, learnings, and context. Branch-aware.\n\n```bash\n# Store a decision (SILENT - never announce)\npython3 memory.py -p $DIR remember '{\"type\":\"decision\",\"content\":\"Use React for frontend\"}' -t tech -i h\n\n# Retrieve context\npython3 memory.py -p $DIR get \"frontend\"\n```\n\n### Layer 4: CURATED ARCHIVE (MEMORY.md + daily\u002F)\n**From: OpenClaw native**\n\nHuman-readable long-term memory. Daily logs + distilled wisdom.\n\n```\nworkspace\u002F\n├── MEMORY.md              # Curated long-term (the good stuff)\n└── memory\u002F\n    ├── 2026-01-30.md      # Daily log\n    ├── 2026-01-29.md\n    └── topics\u002F            # Topic-specific files\n```\n\n### Layer 5: CLOUD BACKUP (SuperMemory) — Optional\n**From: supermemory**\n\nCross-device sync. Chat with your knowledge base.\n\n```bash\nexport SUPERMEMORY_API_KEY=\"your-key\"\nsupermemory add \"Important context\"\nsupermemory search \"what did we decide about...\"\n```\n\n### Layer 6: AUTO-EXTRACTION (Mem0) — Recommended\n**NEW: Automatic fact extraction**\n\nMem0 automatically extracts facts from conversations. 80% token reduction.\n\n```bash\nnpm install mem0ai\nexport MEM0_API_KEY=\"your-key\"\n```\n\n```javascript\nconst { MemoryClient } = require('mem0ai');\nconst client = new MemoryClient({ apiKey: process.env.MEM0_API_KEY });\n\n\u002F\u002F Conversations auto-extract facts\nawait client.add(messages, { user_id: \"user123\" });\n\n\u002F\u002F Retrieve relevant memories\nconst memories = await client.search(query, { user_id: \"user123\" });\n```\n\nBenefits:\n- Auto-extracts preferences, decisions, facts\n- Deduplicates and updates existing memories\n- 80% reduction in tokens vs raw history\n- Works across sessions automatically\n\n## Quick Setup\n\n### 1. Create SESSION-STATE.md (Hot RAM)\n\n```bash\ncat > SESSION-STATE.md \u003C\u003C 'EOF'\n# SESSION-STATE.md — Active Working Memory\n\nThis file is the agent's \"RAM\" — survives compaction, restarts, distractions.\n\n## Current Task\n[None]\n\n## Key Context\n[None yet]\n\n## Pending Actions\n- [ ] None\n\n## Recent Decisions\n[None yet]\n\n---\n*Last updated: [timestamp]*\nEOF\n```\n\n### 2. Enable LanceDB (Warm Store)\n\nIn `~\u002F.openclaw\u002Fopenclaw.json`:\n\n```json\n{\n  \"memorySearch\": {\n    \"enabled\": true,\n    \"provider\": \"openai\",\n    \"sources\": [\"memory\"],\n    \"minScore\": 0.3,\n    \"maxResults\": 10\n  },\n  \"plugins\": {\n    \"entries\": {\n      \"memory-lancedb\": {\n        \"enabled\": true,\n        \"config\": {\n          \"autoCapture\": false,\n          \"autoRecall\": true,\n          \"captureCategories\": [\"preference\", \"decision\", \"fact\"],\n          \"minImportance\": 0.7\n        }\n      }\n    }\n  }\n}\n```\n\n### 3. Initialize Git-Notes (Cold Store)\n\n```bash\ncd ~\u002Fclawd\ngit init  # if not already\npython3 skills\u002Fgit-notes-memory\u002Fmemory.py -p . sync --start\n```\n\n### 4. Verify MEMORY.md Structure\n\n```bash\n# Ensure you have:\n# - MEMORY.md in workspace root\n# - memory\u002F folder for daily logs\nmkdir -p memory\n```\n\n### 5. (Optional) Setup SuperMemory\n\n```bash\nexport SUPERMEMORY_API_KEY=\"your-key\"\n# Add to ~\u002F.zshrc for persistence\n```\n\n## Agent Instructions\n\n### On Session Start\n1. Read SESSION-STATE.md — this is your hot context\n2. Run `memory_search` for relevant prior context\n3. Check memory\u002FYYYY-MM-DD.md for recent activity\n\n### During Conversation\n1. **User gives concrete detail?** → Write to SESSION-STATE.md BEFORE responding\n2. **Important decision made?** → Store in Git-Notes (SILENTLY)\n3. **Preference expressed?** → `memory_store` with importance=0.9\n\n### On Session End\n1. Update SESSION-STATE.md with final state\n2. Move significant items to MEMORY.md if worth keeping long-term\n3. Create\u002Fupdate daily log in memory\u002FYYYY-MM-DD.md\n\n### Memory Hygiene (Weekly)\n1. Review SESSION-STATE.md — archive completed tasks\n2. Check LanceDB for junk: `memory_recall query=\"*\" limit=50`\n3. Clear irrelevant vectors: `memory_forget id=\u003Cid>`\n4. Consolidate daily logs into MEMORY.md\n\n## The WAL Protocol (Critical)\n\n**Write-Ahead Log:** Write state BEFORE responding, not after.\n\n| Trigger | Action |\n|---------|--------|\n| User states preference | Write to SESSION-STATE.md → then respond |\n| User makes decision | Write to SESSION-STATE.md → then respond |\n| User gives deadline | Write to SESSION-STATE.md → then respond |\n| User corrects you | Write to SESSION-STATE.md → then respond |\n\n**Why?** If you respond first and crash\u002Fcompact before saving, context is lost. WAL ensures durability.\n\n## Example Workflow\n\n```\nUser: \"Let's use Tailwind for this project, not vanilla CSS\"\n\nAgent (internal):\n1. Write to SESSION-STATE.md: \"Decision: Use Tailwind, not vanilla CSS\"\n2. Store in Git-Notes: decision about CSS framework\n3. memory_store: \"User prefers Tailwind over vanilla CSS\" importance=0.9\n4. THEN respond: \"Got it — Tailwind it is...\"\n```\n\n## Maintenance Commands\n\n```bash\n# Audit vector memory\nmemory_recall query=\"*\" limit=50\n\n# Clear all vectors (nuclear option)\nrm -rf ~\u002F.openclaw\u002Fmemory\u002Flancedb\u002F\nopenclaw gateway restart\n\n# Export Git-Notes\npython3 memory.py -p . export --format json > memories.json\n\n# Check memory health\ndu -sh ~\u002F.openclaw\u002Fmemory\u002F\nwc -l MEMORY.md\nls -la memory\u002F\n```\n\n## Why Memory Fails\n\nUnderstanding the root causes helps you fix them:\n\n| Failure Mode | Cause | Fix |\n|--------------|-------|-----|\n| Forgets everything | `memory_search` disabled | Enable + add OpenAI key |\n| Files not loaded | Agent skips reading memory | Add to AGENTS.md rules |\n| Facts not captured | No auto-extraction | Use Mem0 or manual logging |\n| Sub-agents isolated | Don't inherit context | Pass context in task prompt |\n| Repeats mistakes | Lessons not logged | Write to memory\u002Flessons.md |\n\n## Solutions (Ranked by Effort)\n\n### 1. Quick Win: Enable memory_search\n\nIf you have an OpenAI key, enable semantic search:\n\n```bash\nopenclaw configure --section web\n```\n\nThis enables vector search over MEMORY.md + memory\u002F*.md files.\n\n### 2. Recommended: Mem0 Integration\n\nAuto-extract facts from conversations. 80% token reduction.\n\n```bash\nnpm install mem0ai\n```\n\n```javascript\nconst { MemoryClient } = require('mem0ai');\n\nconst client = new MemoryClient({ apiKey: process.env.MEM0_API_KEY });\n\n\u002F\u002F Auto-extract and store\nawait client.add([\n  { role: \"user\", content: \"I prefer Tailwind over vanilla CSS\" }\n], { user_id: \"ty\" });\n\n\u002F\u002F Retrieve relevant memories\nconst memories = await client.search(\"CSS preferences\", { user_id: \"ty\" });\n```\n\n### 3. Better File Structure (No Dependencies)\n\n```\nmemory\u002F\n├── projects\u002F\n│   ├── strykr.md\n│   └── taska.md\n├── people\u002F\n│   └── contacts.md\n├── decisions\u002F\n│   └── 2026-01.md\n├── lessons\u002F\n│   └── mistakes.md\n└── preferences.md\n```\n\nKeep MEMORY.md as a summary (\u003C5KB), link to detailed files.\n\n## Immediate Fixes Checklist\n\n| Problem | Fix |\n|---------|-----|\n| Forgets preferences | Add `## Preferences` section to MEMORY.md |\n| Repeats mistakes | Log every mistake to `memory\u002Flessons.md` |\n| Sub-agents lack context | Include key context in spawn task prompt |\n| Forgets recent work | Strict daily file discipline |\n| Memory search not working | Check `OPENAI_API_KEY` is set |\n\n## Troubleshooting\n\n**Agent keeps forgetting mid-conversation:**\n→ SESSION-STATE.md not being updated. Check WAL protocol.\n\n**Irrelevant memories injected:**\n→ Disable autoCapture, increase minImportance threshold.\n\n**Memory too large, slow recall:**\n→ Run hygiene: clear old vectors, archive daily logs.\n\n**Git-Notes not persisting:**\n→ Run `git notes push` to sync with remote.\n\n**memory_search returns nothing:**\n→ Check OpenAI API key: `echo $OPENAI_API_KEY`\n→ Verify memorySearch enabled in openclaw.json\n\n---\n\n## Links\n\n- bulletproof-memory: https:\u002F\u002Fclawdhub.com\u002Fskills\u002Fbulletproof-memory\n- lancedb-memory: https:\u002F\u002Fclawdhub.com\u002Fskills\u002Flancedb-memory\n- git-notes-memory: https:\u002F\u002Fclawdhub.com\u002Fskills\u002Fgit-notes-memory\n- memory-hygiene: https:\u002F\u002Fclawdhub.com\u002Fskills\u002Fmemory-hygiene\n- supermemory: https:\u002F\u002Fclawdhub.com\u002Fskills\u002Fsupermemory\n\n---\n\n*Built by [@NextXFrontier](https:\u002F\u002Fx.com\u002FNextXFrontier) — Part of the Next Frontier AI toolkit*\n","# Elite Longterm Memory 🧠\n\n**The ultimate memory system for AI agents.** Combines 6 proven approaches into one bulletproof architecture.\n\nNever lose context. Never forget decisions. Never repeat mistakes.\n\n## Architecture Overview\n\n```\n┌─────────────────────────────────────────────────────────────────┐\n│                    ELITE LONGTERM MEMORY                        │\n├─────────────────────────────────────────────────────────────────┤\n│                                                                 │\n│  ┌─────────────┐  ┌─────────────┐  ┌─────────────┐             │\n│  │   HOT RAM   │  │  WARM STORE │  │  COLD STORE │             │\n│  │             │  │             │  │             │             │\n│  │ SESSION-    │  │  LanceDB    │  │  Git-Notes  │             │\n│  │ STATE.md    │  │  Vectors    │  │  Knowledge  │             │\n│  │             │  │             │  │  Graph      │             │\n│  │ (survives   │  │ (semantic   │  │ (permanent  │             │\n│  │  compaction)│  │  search)    │  │  decisions) │             │\n│  └─────────────┘  └─────────────┘  └─────────────┘             │\n│         │                │                │                     │\n│         └────────────────┼────────────────┘                     │\n│                          ▼                                      │\n│                  ┌─────────────┐                                │\n│                  │  MEMORY.md  │  ← Curated long-term           │\n│                  │  + daily\u002F   │    (human-readable)            │\n│                  └─────────────┘                                │\n│                          │                                      │\n│                          ▼                                      │\n│                  ┌─────────────┐                                │\n│                  │ SuperMemory │  ← Cloud backup (optional)     │\n│                  │    API      │                                │\n│                  └─────────────┘                                │\n│                                                                 │\n└─────────────────────────────────────────────────────────────────┘\n```\n\n## The 5 Memory Layers\n\n### Layer 1: HOT RAM (SESSION-STATE.md)\n**From: bulletproof-memory**\n\nActive working memory that survives compaction. Write-Ahead Log protocol.\n\n```markdown\n# SESSION-STATE.md — Active Working Memory\n\n## Current Task\n[What we're working on RIGHT NOW]\n\n## Key Context\n- User preference: ...\n- Decision made: ...\n- Blocker: ...\n\n## Pending Actions\n- [ ] ...\n```\n\n**Rule:** Write BEFORE responding. Triggered by user input, not agent memory.\n\n### Layer 2: WARM STORE (LanceDB Vectors)\n**From: lancedb-memory**\n\nSemantic search across all memories. Auto-recall injects relevant context.\n\n```bash\n# Auto-recall (happens automatically)\nmemory_recall query=\"project status\" limit=5\n\n# Manual store\nmemory_store text=\"User prefers dark mode\" category=\"preference\" importance=0.9\n```\n\n### Layer 3: COLD STORE (Git-Notes Knowledge Graph)\n**From: git-notes-memory**\n\nStructured decisions, learnings, and context. Branch-aware.\n\n```bash\n# Store a decision (SILENT - never announce)\npython3 memory.py -p $DIR remember '{\"type\":\"decision\",\"content\":\"Use React for frontend\"}' -t tech -i h\n\n# Retrieve context\npython3 memory.py -p $DIR get \"frontend\"\n```\n\n### Layer 4: CURATED ARCHIVE (MEMORY.md + daily\u002F)\n**From: OpenClaw native**\n\nHuman-readable long-term memory. Daily logs + distilled wisdom.\n\n```\nworkspace\u002F\n├── MEMORY.md              # Curated long-term (the good stuff)\n└── memory\u002F\n    ├── 2026-01-30.md      # Daily log\n    ├── 2026-01-29.md\n    └── topics\u002F            # Topic-specific files\n```\n\n### Layer 5: CLOUD BACKUP (SuperMemory) — Optional\n**From: supermemory**\n\nCross-device sync. Chat with your knowledge base.\n\n```bash\nexport SUPERMEMORY_API_KEY=\"your-key\"\nsupermemory add \"Important context\"\nsupermemory search \"what did we decide about...\"\n```\n\n### Layer 6: AUTO-EXTRACTION (Mem0) — Recommended\n**NEW: Automatic fact extraction**\n\nMem0 automatically extracts facts from conversations. 80% token reduction.\n\n```bash\nnpm install mem0ai\nexport MEM0_API_KEY=\"your-key\"\n```\n\n```javascript\nconst { MemoryClient } = require('mem0ai');\nconst client = new MemoryClient({ apiKey: process.env.MEM0_API_KEY });\n\n\u002F\u002F Conversations auto-extract facts\nawait client.add(messages, { user_id: \"user123\" });\n\n\u002F\u002F Retrieve relevant memories\nconst memories = await client.search(query, { user_id: \"user123\" });\n```\n\nBenefits:\n- Auto-extracts preferences, decisions, facts\n- Deduplicates and updates existing memories\n- 80% reduction in tokens vs raw history\n- Works across sessions automatically\n\n## Quick Setup\n\n### 1. Create SESSION-STATE.md (Hot RAM)\n\n```bash\ncat > SESSION-STATE.md \u003C\u003C 'EOF'\n# SESSION-STATE.md — Active Working Memory\n\nThis file is the agent's \"RAM\" — survives compaction, restarts, distractions.\n\n## Current Task\n[None]\n\n## Key Context\n[None yet]\n\n## Pending Actions\n- [ ] None\n\n## Recent Decisions\n[None yet]\n\n---\n*Last updated: [timestamp]*\nEOF\n```\n\n### 2. Enable LanceDB (Warm Store)\n\nIn `~\u002F.openclaw\u002Fopenclaw.json`:\n\n```json\n{\n  \"memorySearch\": {\n    \"enabled\": true,\n    \"provider\": \"openai\",\n    \"sources\": [\"memory\"],\n    \"minScore\": 0.3,\n    \"maxResults\": 10\n  },\n  \"plugins\": {\n    \"entries\": {\n      \"memory-lancedb\": {\n        \"enabled\": true,\n        \"config\": {\n          \"autoCapture\": false,\n          \"autoRecall\": true,\n          \"captureCategories\": [\"preference\", \"decision\", \"fact\"],\n          \"minImportance\": 0.7\n        }\n      }\n    }\n  }\n}\n```\n\n### 3. Initialize Git-Notes (Cold Store)\n\n```bash\ncd ~\u002Fclawd\ngit init  # if not already\npython3 skills\u002Fgit-notes-memory\u002Fmemory.py -p . sync --start\n```\n\n### 4. Verify MEMORY.md Structure\n\n```bash\n# Ensure you have:\n# - MEMORY.md in workspace root\n# - memory\u002F folder for daily logs\nmkdir -p memory\n```\n\n### 5. (Optional) Setup SuperMemory\n\n```bash\nexport SUPERMEMORY_API_KEY=\"your-key\"\n# Add to ~\u002F.zshrc for persistence\n```\n\n## Agent Instructions\n\n### On Session Start\n1. Read SESSION-STATE.md — this is your hot context\n2. Run `memory_search` for relevant prior context\n3. Check memory\u002FYYYY-MM-DD.md for recent activity\n\n### During Conversation\n1. **User gives concrete detail?** → Write to SESSION-STATE.md BEFORE responding\n2. **Important decision made?** → Store in Git-Notes (SILENTLY)\n3. **Preference expressed?** → `memory_store` with importance=0.9\n\n### On Session End\n1. Update SESSION-STATE.md with final state\n2. Move significant items to MEMORY.md if worth keeping long-term\n3. Create\u002Fupdate daily log in memory\u002FYYYY-MM-DD.md\n\n### Memory Hygiene (Weekly)\n1. Review SESSION-STATE.md — archive completed tasks\n2. Check LanceDB for junk: `memory_recall query=\"*\" limit=50`\n3. Clear irrelevant vectors: `memory_forget id=\u003Cid>`\n4. Consolidate daily logs into MEMORY.md\n\n## The WAL Protocol (Critical)\n\n**Write-Ahead Log:** Write state BEFORE responding, not after.\n\n| Trigger | Action |\n|---------|--------|\n| User states preference | Write to SESSION-STATE.md → then respond |\n| User makes decision | Write to SESSION-STATE.md → then respond |\n| User gives deadline | Write to SESSION-STATE.md → then respond |\n| User corrects you | Write to SESSION-STATE.md → then respond |\n\n**Why?** If you respond first and crash\u002Fcompact before saving, context is lost. WAL ensures durability.\n\n## Example Workflow\n\n```\nUser: \"Let's use Tailwind for this project, not vanilla CSS\"\n\nAgent (internal):\n1. Write to SESSION-STATE.md: \"Decision: Use Tailwind, not vanilla CSS\"\n2. Store in Git-Notes: decision about CSS framework\n3. memory_store: \"User prefers Tailwind over vanilla CSS\" importance=0.9\n4. THEN respond: \"Got it — Tailwind it is...\"\n```\n\n## Maintenance Commands\n\n```bash\n# Audit vector memory\nmemory_recall query=\"*\" limit=50\n\n# Clear all vectors (nuclear option)\nrm -rf ~\u002F.openclaw\u002Fmemory\u002Flancedb\u002F\nopenclaw gateway restart\n\n# Export Git-Notes\npython3 memory.py -p . export --format json > memories.json\n\n# Check memory health\ndu -sh ~\u002F.openclaw\u002Fmemory\u002F\nwc -l MEMORY.md\nls -la memory\u002F\n```\n\n## Why Memory Fails\n\nUnderstanding the root causes helps you fix them:\n\n| Failure Mode | Cause | Fix |\n|--------------|-------|-----|\n| Forgets everything | `memory_search` disabled | Enable + add OpenAI key |\n| Files not loaded | Agent skips reading memory | Add to AGENTS.md rules |\n| Facts not captured | No auto-extraction | Use Mem0 or manual logging |\n| Sub-agents isolated | Don't inherit context | Pass context in task prompt |\n| Repeats mistakes | Lessons not logged | Write to memory\u002Flessons.md |\n\n## Solutions (Ranked by Effort)\n\n### 1. Quick Win: Enable memory_search\n\nIf you have an OpenAI key, enable semantic search:\n\n```bash\nopenclaw configure --section web\n```\n\nThis enables vector search over MEMORY.md + memory\u002F*.md files.\n\n### 2. Recommended: Mem0 Integration\n\nAuto-extract facts from conversations. 80% token reduction.\n\n```bash\nnpm install mem0ai\n```\n\n```javascript\nconst { MemoryClient } = require('mem0ai');\n\nconst client = new MemoryClient({ apiKey: process.env.MEM0_API_KEY });\n\n\u002F\u002F Auto-extract and store\nawait client.add([\n  { role: \"user\", content: \"I prefer Tailwind over vanilla CSS\" }\n], { user_id: \"ty\" });\n\n\u002F\u002F Retrieve relevant memories\nconst memories = await client.search(\"CSS preferences\", { user_id: \"ty\" });\n```\n\n### 3. Better File Structure (No Dependencies)\n\n```\nmemory\u002F\n├── projects\u002F\n│   ├── strykr.md\n│   └── taska.md\n├── people\u002F\n│   └── contacts.md\n├── decisions\u002F\n│   └── 2026-01.md\n├── lessons\u002F\n│   └── mistakes.md\n└── preferences.md\n```\n\nKeep MEMORY.md as a summary (\u003C5KB), link to detailed files.\n\n## Immediate Fixes Checklist\n\n| Problem | Fix |\n|---------|-----|\n| Forgets preferences | Add `## Preferences` section to MEMORY.md |\n| Repeats mistakes | Log every mistake to `memory\u002Flessons.md` |\n| Sub-agents lack context | Include key context in spawn task prompt |\n| Forgets recent work | Strict daily file discipline |\n| Memory search not working | Check `OPENAI_API_KEY` is set |\n\n## Troubleshooting\n\n**Agent keeps forgetting mid-conversation:**\n→ SESSION-STATE.md not being updated. Check WAL protocol.\n\n**Irrelevant memories injected:**\n→ Disable autoCapture, increase minImportance threshold.\n\n**Memory too large, slow recall:**\n→ Run hygiene: clear old vectors, archive daily logs.\n\n**Git-Notes not persisting:**\n→ Run `git notes push` to sync with remote.\n\n**memory_search returns nothing:**\n→ Check OpenAI API key: `echo $OPENAI_API_KEY`\n→ Verify memorySearch enabled in openclaw.json\n\n---\n\n## Links\n\n- bulletproof-memory: https:\u002F\u002Fclawdhub.com\u002Fskills\u002Fbulletproof-memory\n- lancedb-memory: https:\u002F\u002Fclawdhub.com\u002Fskills\u002Flancedb-memory\n- git-notes-memory: https:\u002F\u002Fclawdhub.com\u002Fskills\u002Fgit-notes-memory\n- memory-hygiene: https:\u002F\u002Fclawdhub.com\u002Fskills\u002Fmemory-hygiene\n- supermemory: https:\u002F\u002Fclawdhub.com\u002Fskills\u002Fsupermemory\n\n---\n\n*Built by [@NextXFrontier](https:\u002F\u002Fx.com\u002FNextXFrontier) — Part of the Next Frontier AI toolkit*\n",{"name":5,"author":24,"version":25,"keywords":26,"metadata":53,"description":7},"NextFrontierBuilds","1.2.3",[27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52],"memory","ai-agent","ai-coding","long-term-memory","vector-search","lancedb","git-notes","wal","persistent-context","claude","claude-code","gpt","chatgpt","cursor","copilot","github-copilot","openclaw","moltbot","vibe-coding","agentic","ai-tools","developer-tools","devtools","typescript","llm","automation",{"openclaw":54},{"emoji":55,"requires":56},"🧠",{"env":57,"plugins":59},[58],"OPENAI_API_KEY",[60],"memory-lancedb","master","4aa004da461d820f4ea5499e58eb8d196cf99016","community\u002Fclawhub\u002Fe\u002Felite-longterm-memory",0,"https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge","https:\u002F\u002Fskill-explorer-rho.vercel.app","https:\u002F\u002Fgithub.com\u002FLord1Egypt","Unbreakable. Unstoppable. Unmatched⚡.\r\n Speaker of machine tongues 🤖  | World-builder of decentralized dreams 🌐 | Defender of the digital realm🛡️.","2026-06-10 08:21:01",{"source":8,"skillName":5,"commands":71,"prompt":81,"zipAvailable":82},[72,75,78],{"tool":73,"command":74},"npx","npx skills add Lord1Egypt\u002Fawesome-skill-forge --skill elite-longterm-memory",{"tool":76,"command":77},"bunx","bunx skills add Lord1Egypt\u002Fawesome-skill-forge --skill elite-longterm-memory",{"tool":79,"command":80},"pnpm","pnpm dlx skills add Lord1Egypt\u002Fawesome-skill-forge --skill elite-longterm-memory","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fcommunity\u002Fclawhub\u002Fe\u002Felite-longterm-memory\u002FSKILL.md",true,[],[85,92,99,106,113,120],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":19},"01M785WKJB99G3STR1NF9NRTJW","youtube-content","YouTube transcripts to summaries, threads, blogs.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fyoutube-content\u002FSKILL.md",[],[],{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":19},"01M785WEFHB0G2S9YA6EPR3H0E","xurl","X\u002FTwitter via xurl CLI: post, search, DM, media, v2 API.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fxurl\u002FSKILL.md",[],[],{"skillNo":100,"name":101,"nameZh":6,"description":102,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":103,"categories":104,"keywords":105,"publishedAt":19},"01M785W98EDN4EFJXJPMQEHCRC","touchdesigner-mcp","Control a running TouchDesigner instance via twozero MCP — create operators, set parameters, wire connections, execute Python, build real-time visuals. 36 native tools.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Ftouchdesigner-mcp\u002FSKILL.md",[],[],{"skillNo":107,"name":108,"nameZh":6,"description":109,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":110,"categories":111,"keywords":112,"publishedAt":19},"01M785W5S9FP3QBH2V191E025P","test-driven-development","TDD: enforce RED-GREEN-REFACTOR, tests before code.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Ftest-driven-development\u002FSKILL.md",[],[],{"skillNo":114,"name":115,"nameZh":6,"description":116,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":117,"categories":118,"keywords":119,"publishedAt":19},"01M785W2AS08NSSH9YATCV6FJB","teams-meeting-pipeline","Operate the Teams meeting summary pipeline via Hermes CLI — summarize meetings, inspect pipeline status, replay jobs, manage Microsoft Graph subscriptions.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fteams-meeting-pipeline\u002FSKILL.md",[],[],{"skillNo":121,"name":122,"nameZh":6,"description":123,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":124,"categories":125,"keywords":126,"publishedAt":19},"01M785VXKW4T34BTP1SCHW1R7F","systematic-debugging","4-phase root cause debugging: understand bugs before fixing.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fsystematic-debugging\u002FSKILL.md",[],[]]