This implements a three-tier memory system for AI agents: hot memory in MEMORY.md with P0/P1/P2 tags and TTLs, cold searchable storage in JSONL lesson files, and raw daily logs. The hook is the 70-80% token reduction claim, which makes sense since you're only loading ~200 lines of current context instead of everything. Comes with a Python janitor script that auto-archives expired entries based on priority and date tags. The discipline of deciding what's P0 versus P2 is actually the hard part here, not the tooling. If you're running long-lived agents that accumulate context bloat, this gives you a structured way to prune without losing important stuff to semantic search.

skills.sh installs
229
GitHub stars
39
last updated
Aug 21, 2026

Install

$ npx -y skills add jzocb/openclaw-memory-management --skill memory-management --agent claude-code

Installs into .claude/skills of the current project.

Files

Memory Management Skill

Manage agent memory efficiently using a three-layer architecture with automatic archival.

Quick Setup

  1. Format MEMORY.md with priority tags:
- [P0] Core identity item (never expires)
- [P1][2026-02-10] Active project (90-day TTL)
- [P2][2026-02-10] Temporary item (30-day TTL)
  1. Set up auto-archive cron:
0 4 * * * python3 ~/.openclaw/workspace/scripts/memory-janitor.py
  1. Store lessons in memory/lessons/*.jsonl:
{"id": "lesson-001", "date": "2026-02-10", "category": "infra", "title": "Problem title", "problem": "What happened", "solution": "How to fix", "tags": ["tag1"]}

Three-Layer Architecture

Layer 1: Hot Memory (MEMORY.md)

  • Always loaded, ≤200 lines
  • P0: Core identity, never expires
  • P1: Active projects, 90-day TTL
  • P2: Temporary, 30-day TTL

Layer 2: Cold Memory (searchable)

  • memory/lessons/*.jsonl — structured lessons
  • memory/archive/ — expired content
  • Use memory_search to recall

Layer 3: Raw Logs

  • memory/YYYY-MM-DD.md — daily logs
  • Not loaded automatically

Priority Guidelines

Sponsors

Details

Repository
github.com/jzocb/openclaw-memory-management
Categories
AI & Agent Building, Productivity & Planning, Automation & Workflows
First seen
Jun 3, 2026
1yonatangross avatarweb-research-workflowyonatangross/orchestkitUnified decision tree for web research and competitive monitoring. Auto-selects WebFetch, Tavily, or agent-browser based on target site characteristics and avai227skills.sh installs
2crossmint avatarlobstercashcrossmint/lobstercash-cli-skillsUse this skill when the user wants to spend money, make purchases, send crypto, pay for APIs, browse websites for shopping, complete checkout, or manage an AI a226skills.sh installs
3sanky369 avatarremotion-script-writersanky369/vibe-building-skillsWrite a complete, render-ready Remotion video script as structured JSON: analyze the user's codebase or product, break the video into timed scenes, specify ever224skills.sh installs
4resemble-ai avatarremotion-resemble-airesemble-ai/remotion-resemble-skillCreate professional AI-narrated videos with Remotion and Resemble.ai - from educational tutorials to product launches223skills.sh installs
5yonatangross avatarerrorsyonatangross/orchestkitError pattern analysis and troubleshooting for Claude Code sessions. Categorizes errors (network, auth, model, tool, memory, permission) with known resolution p223skills.sh installs
6aj-geddes avatarBuilderaj-geddes/claude-code-bmad-skillsCreates custom agents, workflows, and templates for BMAD. Extends BMAD functionality with domain-specific components. Trigger keywords - create agent, create wo222skills.sh installs