Skip to content
Agentmart
Submit a tool

claude-memory-optimizer

Structured memory system with 4-type classification, frontmatter metadata, automated migration, and PUA-style maintenance checklist.

Skill by Arry8

IndexedMIT★ 2
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/arry8-claude-memory-optimizer

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Structured memory system with 4-type classification, frontmatter metadata, automated migration, and PUA-style maintenance checklist. Based on Claude Code memory architecture.

Use cases: agent-building

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found
Runs as
Node.js package

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/claude-memory-optimizer

What's inside

Skill name
claude-memory-optimizer
Description
Structured memory system with 4-type classification, frontmatter metadata, automated migration, and PUA-style maintenance checklist. Based on Claude Code memory architecture.
License
MIT
Instructions
309 lines in SKILL.md · view on GitHub

Before installing

  • Ships executable scripts

Files (11)

  • README.md
  • SKILL.md
  • feedback-example.md · examples/
  • memory-frontmatter-example.md · examples/
  • project-example.md · examples/
  • reference-example.md · examples/
  • package.json
  • memory-pua-task.js · scripts/
  • memory-pua.js · scripts/
  • refactor-memory.js · scripts/
  • task-pua.js · scripts/

SKILL.md (first lines)

# Claude Memory Optimizer

Structured memory system for OpenClaw with 4-type classification, automated migration, and **PUA-style maintenance checklist** (inspired by tanweai/pua - 14.8k GitHub stars).

## When to Use

- Setting up memory for the first time in OpenClaw
- Migrating from unstructured `memory/*.md` to organized categories
- Improving memory recall with semantic frontmatter
- Implementing Claude Code-style memory architecture

## Features

- **4-Type Classification**: user, feedback, project, reference
- **Frontmatter Metadata**: structured name/description/type for semantic search
- **Auto-Migration**: one-command refactor of existing memory files
- **Log Mode**: optional append-only daily logs (KAIROS style)
- **PUA-Style Maintenance**: 7 iron rules checklist with pressure escalation (L0-L4)

## Quick Start

### Install

```bash
clawhub install claude-memory-optimizer
```

### Run Migration

```bash
node ~/.openclaw/skills/claude-memory-optimizer/scripts/refactor-memory.js
```

### Run PUA Maintenance Check

```bash
# Normal mode (L0 - 3 checks)
node ~/.openclaw/skills/claude-memory-optimizer/scripts/memory-pua.js

# Strict mode (L3 - full 7 checks)
node ~/.openclaw/skills/claude-memory-optimizer/scripts/memory-pua.js --mode strict

# Audit mode (L4 - emergency fix)
node ~/.openclaw/skills/claude-memory-optimizer/scripts/memory-pua.js --mode audit
```

### Verify

```bash
ls -la ~/.openclaw/workspace/memory/
cat ~/.openclaw/workspace/MEMORY.md
```

## Memory Types

| Type          | Purpose                               | Example                                       |
| ------------- | ------------------------------------- | --------------------------------------------- |
| **user**      | User role, preferences, skills        | "Data scientist, prefers concise replies"     |
| **feedback**  | Behavior corrections/confirmations    | "No trailing summaries — user can read diffs" |
| **project**   | Project context, decisions, deadlines | "Thesis deadline: 2026-06-01"                 |
| **reference** | External system pointers              | "Kaggle: https://kaggle.com/chenziong"        |

## Directory Structure

```
memory/
├── user/          # User information
├── feedback/      # Behavior guidance
├── project/       # Project context
├── reference/     # External references
└── logs/          # Append-only logs (optional)
    └── YYYY/
        └── MM/
            └── YYYY-MM-DD.md
```

## Memory File Format

Each memory file uses frontmatter metadata:

```markdown
---
name: Data Science Background
description: User is a data scientist focused on observability and LLMs
type: user
---

User studies at Beijing University of Technology & UCD, GPA 3.95/4.2.
Research: LLM, AI Agents, MCP.

**Skills:** Python, PyTorch, Transformers, NLP

**How to apply:** Use data science terminology, assume ML background.
```

## What NOT to Save

- Code patterns, architecture, file paths (derivable from codebase)
- Git history, recent changes (use `git log`)
- Debugging solutions (fix is in the code)
- Content already in CLAUDE.md
- Ephemeral task details (only useful in current session)

## Configuration

### OpenClaw Config

```json
{
  "agents": {
    "defaults": {
      "memorySearch": {
        "enabled": true,
        "provider": "local",
        "maxResults": 20,
        "minScore": 0.3
      },
      "compaction": {
        "memoryFlush": {

From Arry8/openclaw-edge, MIT.

Signals

Stars
2
Forks
0
Open issues
10
Last commit (this folder)
Apr 3, 2026 (6 months ago)
Last release
Apr 10, 2026 (6 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from Arry8

Cite this page

claude-memory-optimizer skill. Agent Mart. https://agentmart.dev/skills/arry8-claude-memory-optimizer (last updated 2026-10-24)