Skip to content
cccskills
FreePublished on GitHub

memory-tiering

Multi-tiered memory management (HOT/WARM/COLD) for context compaction. Invoke ONLY for explicit compaction events: post-`/compact` cleanup, MEMORY.md tier promotion, archive batch, or "trim my context". NOT for general recall (use deep-recall) or routine memory writes (use storage-router). Triggers: "compact memory", "promote to durable", "archive old context", "tier this".

The English summary is being prepared. Showing the original description.

Run score Not tested

See how to install

Files included (1)

  • SKILL.md7.2 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

Memory Tiering Skill 🧠⚖️

2026.4.10 Update: OpenClaw now has two native memory systems — Active Memory (runs before every reply) and Dreaming (nightly consolidation at 3 AM IL). This skill covers what they DON'T handle — see section below.

What Native Systems Now Cover (don't duplicate)

TaskWho does it
Pull relevant context before each replyActive Memory plugin (automatic)
Promote strong signals to MEMORY.md nightlyDreaming / memory-core (automatic)
HOT.md pattern promotion after 2x mistakesself-learning skill

What This Skill Still Handles

  • Manual pruning when MEMORY.md grows >200 lines
  • Archiving old memory/daily/YYYY-MM-DD.md files (30-day retention)
  • Force-promoting critical owner corrections immediately (don't wait for Dreaming)
  • Graduation gate — reviewing and filtering dream promotions before they land in MEMORY.md
  • Post-compaction reorganization
  • Enforcing store boundaries: daily notes = raw-first log, MEMORY.md = durable rules only, project docs = project-scoped

The Three Tiers (for manual ops)

  1. 🔥 HOT (memory/hot/HOT_MEMORY.md) — current session, active tasks
  2. 🌡️ WARM (memory/warm/WARM_MEMORY.md) — stable preferences, configs
  3. ❄️ COLD (MEMORY.md) — long-term, distilled, curated

Workflow: Organize-Memory (Manual / Post-Compaction)

Step 1: Check native systems first

openclaw memory status --deep   # see what Dreaming already promoted
/dreaming status                  # check last run

Step 2: Ingest & Audit

  • Read MEMORY.md + last 7 memory/daily/YYYY-MM-DD.md files
  • Identify Dead Context: completed tasks, resolved issues, stale facts

Step 3: Prune & Redistribute

  • Remove stale COLD entries (if Dreaming already promoted better versions)
  • Force-add critical owner corrections → MEMORY.md immediately (don't wait for Dreaming)
  • Archive daily notes older than 30 days → memory/archive/YYYY-MM/

Step 4: Verify

  • MEMORY.md should be <200 lines after cleanup
  • Check DREAMS.md — are Dreaming's promotions accurate? Prune bad ones.

Progressive Context Compaction (inspired by Claude Code harness patterns)

Long sessions degrade quality as context fills. Apply progressive compression by conversation age:

Compression Layers (oldest → newest)

LayerAgeStrategyDetail Level
HISTORY_SNIP>50 turnsDrop entirely or keep 1-line summary~5%
Microcompact30-50 turnsAggressive: decisions + outcomes only~15%
CONTEXT_COLLAPSE15-30 turnsMedium: key exchanges, skip tool noise~40%
Full Detail<15 turnsNo compression100%

When to Apply

  • Session exceeds 30 turns
  • Context window pressure detected (tool responses getting truncated)
  • After any /compact command

How to Apply (Manual)

  1. Identify turn count in current session
  2. For turns older than 30: summarize into a single "Session context so far" block
  3. For turns 15-30: keep decisions and outcomes, drop tool output and exploration
  4. Keep last 15 turns at full detail
  5. Always preserve: owner corrections, final decisions, error causes

What Never Gets Compressed

  • Owner corrections and preferences
  • Permission decisions (approved/denied actions)
  • Error root causes and fixes applied
  • Active task state and pending items

Gap vs. Claude Code

Claude Code does this in the harness layer (code, not prompt). We currently rely on manual /compact and prompt-level instructions. Future improvement: move compaction logic into OpenClaw's session management layer so it runs automatically without consuming agent tokens.

Usage Trigger

  • Trigger manually: "Run memory tiering" or when MEMORY.md >200 lines
  • Trigger automatically after any /compact command

Dreaming Integration (OpenClaw 2026.4.9+)

Dreaming is already enabled (memory-core plugin, 0 3 * * * IL timezone).

What Dreaming does automatically:

  • Light phase: ingests daily notes + session transcripts
  • Deep phase: scores & promotes strong signals → MEMORY.md (weighted: relevance 0.30, frequency 0.24, recency 0.15)
  • REM phase: extracts themes and patterns

Manual CLI for inspection/intervention:

openclaw memory status --deep          # what's queued for promotion
openclaw memory promote                # preview what would promote
openclaw memory promote --apply        # force apply now
openclaw memory promote-explain "term" # why something would/wouldn't promote
/dreaming status                        # last run summary

What still requires manual action:

  • Owner corrections → MEMORY.md immediately (don't wait for Dreaming)
  • Critical session-startup rules → MEMORY.md manually
  • Pruning bad/stale Dreaming promotions → manual cleanup
  • MEMORY.md growing >200 lines → prune manually

Graduation Gate (inspired by agentic-stack)

Dreaming stages candidates. Nothing graduates to MEMORY.md without passing this gate:

Minimum Requirements

  • Score >= 0.70 (weighted relevance + frequency + recency)
  • Recalls >= 2 (the signal was retrieved and used at least twice)
  • Status = staged (raw candidates with status=staged only)
  • Content is a rule, preference, or durable fact — not a raw conversation fragment, not a debug log, not a confidence=0.00 dream corpus entry

Rejection Criteria (auto-reject)

  • Confidence = 0.00 or status != staged
  • Content is a raw session transcript or chat log (contains Candidate: User: or Candidate: Assistant: or evidence: memory/.dreams/)
  • Duplicate of an existing MEMORY.md entry (same semantic content)
  • Content is ephemeral (specific timestamps, one-off events, resolved issues)

Review Process

  1. Run openclaw memory promote to list candidates
  2. For each candidate, check against minimum requirements and rejection criteria
  3. Accept only with a one-line rationale: why this is durable and useful
  4. Reject with a one-line reason: why this doesn't belong
  5. Rewrite accepted content into clean, concise rule format before adding to MEMORY.md
  6. Never paste raw dream output directly into MEMORY.md

Post-Review Cleanup

  • After review, clear processed candidates from DREAMS.md staging area
  • Log review outcome in memory/daily/YYYY-MM-DD.md: [HH:MM] Dream review: accepted N, rejected M

Safety Rules

  • Content changes (MEMORY.md): require explicit review — never auto-apply
  • Archiving old files: safe to run automatically
  • trash > rm always

Retention Policy

  • Daily notes: keep 30 days → archive to memory/archive/YYYY-MM/
  • Archive: keep 90 days → delete
  • MEMORY.md: prune if >200 lines

Health Indicators

  • ✅ Healthy: MEMORY.md <200 lines, DREAMS.md updated nightly, daily notes exist
  • ⚠️ Warning: MEMORY.md 200–300 lines, Dreaming didn't run in 48h
  • ❌ Critical: MEMORY.md >300 lines, no Dreaming output in 7 days

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

ai-pa

Free

AI Personal Assistant network skill. Use when: contacting another PA, coordinating with peer agents, scheduling meetings between owners, broadcasting messages, looking up contacts from the local PA directory, or performing any cross-PA task. Reads contact data from data/pa-directory.json in the workspace. Does NOT contain hardcoded contact data — each PA maintains their own directory file.

The English summary is being prepared. Showing the original description.

netanel-abergel/pa-skills6Updated May 10, 2026

ai-pa

Free

AI Personal Assistant network skill for multi-agent PA coordination. Use when: contacting another PA, coordinating with peer agents, scheduling meetings between owners, broadcasting messages to PA groups, or looking up contacts from the local PA directory. Reads contact data from data/pa-directory.json in the workspace.

The English summary is being prepared. Showing the original description.

netanel-abergel/pa-skills6Updated May 10, 2026

ai-pa

Free

Route and execute inter-PA coordination tasks in the OpenClaw multi-agent PA network. Triggers when: contacting another PA, passing a message between owners, broadcasting to a PA group, handling group lead/silence rules, or adding a new PA to the directory. NOT for: contact lookups (use contact-list skill), calendar invites (use meetings skill), or billing issues (use billing-monitor skill).

The English summary is being prepared. Showing the original description.

netanel-abergel/pa-skills6Updated May 10, 2026

OpenClaw API gateway proxy for authenticated SaaS calls (100+ services in references/SERVICES.md). Use ONLY when making an HTTP request to a third-party service that requires the gateway's stored credentials. NOT for direct API calls with bearer tokens already in scope, NOT for monday.com (use monday-for-agents), NOT for WhatsApp (use heleni-whatsapp). Triggers: "call the X API", "fetch from <service>", "send to Slack via gateway", "use the gateway for".

The English summary is being prepared. Showing the original description.

netanel-abergel/pa-skills6Updated May 10, 2026

Automatically creates new skills from complex problem-solving sessions. Triggers at the end of multi-step tasks that required novel approaches, debugging sessions, or workflow creation. Use when: a task took 3+ tool calls, involved a non-obvious solution, or established a pattern likely to recur. Also triggers on: "create a skill from this", "save this as a skill", "this should be a skill".

The English summary is being prepared. Showing the original description.

netanel-abergel/pa-skills6Updated May 10, 2026

Monitor for API billing errors and alert the owner and admin immediately. Use when: an API billing error is detected, a peer PA reports a billing error, or during routine health checks. Handles detection, notification, and fallback model switching. Model-agnostic: works with any LLM provider (Anthropic, OpenAI, Google, etc.).

The English summary is being prepared. Showing the original description.

netanel-abergel/pa-skills6Updated May 10, 2026

See all skills by netanel-abergel

Report a problem with this skill