memorybox

memorybox is a skill for Claude Code, Codex from Ramsbaby/openclaw-memorybox. It costs 90 tokens per session (612 once invoked), scanned B, original, MIT.

A memory-maintenance tool for OpenClaw agents that organizes large MEMORY.md files into smaller domain files and archives old logs.

In plain words
What is it for?
Diagnosing oversized memory, splitting sections, archiving stale daily logs, and removing duplicates.
Why use it?
It reduces memory-file clutter, duplicate information, and context pressure caused by loading too much history.

Skill for Claude CodeCodex

Which agent this was written for is unclear — built for openclaw. Also seen: mentions AGENTS.md; built for openclaw.

Good fit Diagnosing oversized memory, splitting sections, archiving stale daily logs, and removing duplicates.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ramsbaby/openclaw-memorybox/skill
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Ramsbaby/openclaw-memorybox --skill skill
Clone the repo
git clone --depth 1 https://github.com/Ramsbaby/openclaw-memorybox

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for memorybox

README.md
[![agentmods](https://agentmods.dev/badge/skills/ramsbaby/openclaw-memorybox/skill/github.svg)](https://agentmods.dev/skills/ramsbaby/openclaw-memorybox/skill)
Your own site
<a href="https://agentmods.dev/skills/ramsbaby/openclaw-memorybox/skill"><img src="https://agentmods.dev/badge/skills/ramsbaby/openclaw-memorybox/skill/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for memorybox

Your own site · 80×15
<a href="https://agentmods.dev/skills/ramsbaby/openclaw-memorybox/skill"><img src="https://agentmods.dev/badge/skills/ramsbaby/openclaw-memorybox/skill.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 90 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 612 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00090 $0.00612
Opus 5.5 $0.00036 $0.00245
Sonnet 5.5 $0.00018 $0.00122
Haiku 4.5 $0.00009 $0.00061

Measured 1mo ago against content hash 70592b7ae389, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

memorybox scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

sudo ln -sf "$(pwd)/bin/memorybox" /usr/local/bin/memorybox
skill/SKILL.md · 66 lines

What it actually says

MemoryBox

Zero-dependency memory maintenance tool for OpenClaw agents.

What It Does

Prevents MEMORY.md bloat by organizing memory into 3 tiers:

  • Tier 1: MEMORY.md (≤10KB, loaded every session)
  • Tier 2: memory/domains/*.md (searched on-demand)
  • Tier 3: memory/archive/ (old daily logs)

Works alongside Mem0, Supermemory, QMD, or standalone. Only touches file structure — never configs or plugins.

Install

git clone https://github.com/Ramsbaby/openclaw-memorybox.git
cd openclaw-memorybox && chmod +x bin/memorybox
sudo ln -sf "$(pwd)/bin/memorybox" /usr/local/bin/memorybox
  1. Run memorybox doctor ~/openclaw — full diagnostic (start here)
  2. Run memorybox split ~/openclaw — move flagged sections to domain files
  3. Verify with memorybox health ~/openclaw — target score above 80
  4. Run memorybox archive ~/openclaw — archive daily logs older than 14 days
  5. Run memorybox dedupe ~/openclaw — remove duplicate content

Additional commands:

memorybox stale ~/openclaw     # Detect outdated content
memorybox analyze ~/openclaw   # Section-by-section size breakdown
memorybox suggest ~/openclaw   # Improvement recommendations
memorybox report ~/openclaw    # Before/after token savings
memorybox init ~/openclaw      # Set up 3-tier directory structure

Teach Your Agent

Add to AGENTS.md:

## Memory Protocol
- **MEMORY.md** (≤10KB): Core facts only. Loaded everywhere — keep it lean.
- **memory/domains/*.md**: Detailed reference. Use `memory_search` to find.
- **memory/archive/**: Old logs. Rarely needed.

Results

Tested on production (7 Discord channels, 48 crons):

  • MEMORY.md: 20KB → 3.5KB (-83%)
  • Context pressure: 98% → 7%
  • Setup time: 5 minutes
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 66 lines · 90 tokens per session scan B 70592b7ae389

Subscribe to this mod's changes

memorybox is a skill published in the GitHub repository Ramsbaby/openclaw-memorybox (10 stars, last pushed 15d ago), licensed MIT. It adds 90 tokens to every session and 612 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

fresh-start

Continue in a new chat without losing anything — writes a compact handoff to paste into a fresh conversation. Use whenever the user wants to move to a new chat or conversation, hits usage limits, says replies got slow or Claude forgets earlier details, or the conversation has grown long.

egorfedorov/claude-context-optimizer · 60 tokens

doc-digest

Turn a long document, PDF, transcript, spreadsheet or log into a compact working digest the conversation can continue from. Use when the user shares or pastes something long (several pages or more) and wants to discuss, analyze, compare or use it over more than one message, or asks to summarize a document so they can…

egorfedorov/claude-context-optimizer · 75 tokens

token-check

Estimate how many tokens a pasted text, an attached file or the conversation so far takes, what it means for the context window and usage limits, and how to cut it. Use when the user asks how big something is in tokens, why they keep hitting limits, or whether a file is too large to send.

egorfedorov/claude-context-optimizer · 66 tokens

project-context

Turn background the user keeps re-explaining or re-pasting into reusable instructions, so new chats start with it for free. Use when the user repeats the same context, rules, style guide, persona or reference text across messages or chats, says they are tired of explaining the same thing, or asks how to set up a…

egorfedorov/claude-context-optimizer · 81 tokens

memstem-search

Search MemStem — the unified memory index across all AI agents (Ari, Claude Code, future agents). Use for any retrieval-style question: past decisions, project status, skills lookup, prior work, 'what did we decide about X', 'do we have a skill for Y', 'what did the other agent do yesterday'. This skill owns the full…

Memstem/memstem · 98 tokens

lorg-contribution-loop

Use when the Lorg MCP server is connected and the user begins any non-trivial coding, research, writing, analysis, or multi-step task. Checks the Lorg knowledge archive for validated approaches before starting, records adoptions when archive knowledge is used, and evaluates the completed session for contribution back…

LorgAI/lorg-mcp-server · 69 tokens