claude-memory-optimizer
Structured memory system with 4-type classification, frontmatter metadata, automated migration, and PUA-style maintenance checklist.
Skill by Arry8
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.
About
Use cases: agent-building
Reviews
Write a reviewNo 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.
More from Arry8/openclaw-edge
- 0.448score
portfolio-intel
Arry8
Portfolio intelligence copilot.
SkillDFreshness: D★ 2Claude Code +9 - 0.445score
task-pua
Arry8
Task persistence enhancer with 13 corporate flavors.
SkillDFreshness: D★ 2Claude Code +9 - 0.445score
hermes-learning-loop
Arry8
Self-improving learning loop inspired by Hermes Agent.
SkillDFreshness: D★ 2Claude Code +9 - 0.444score
kernel-cp-activator
Arry8
Deploy KERNEL_INTUITION_Cp on any AI architecture with calibrated thresholds.
SkillDFreshness: D★ 2Claude Code +9 - 0.442score
feishu-bot-refresh
Arry8
Refresh Feishu bot identity information.
SkillDFreshness: D★ 2Claude Code +9 - 0.440score
security-triage
Arry8
Triage GitHub security advisories for OpenClaw with high-confidence close/keep decisions, exact tag and commit verification, trust-model checks, optional…
SkillDFreshness: D★ 2Claude Code +9 - 0.440score
vpn-deployment
Arry8
End-to-end WireGuard VPN deployment guide — VPS server setup, router client configuration, and traffic routing via apfree-wifidog tools.
SkillDFreshness: D★ 2Claude Code +9 - 0.436score
apfree-wifidog
Arry8
Guide tool usage for managing ApFree WiFiDog routers, gateways, and captive portal devices.
SkillDFreshness: D★ 2Claude Code +9 - 0.417score
acp-router
Arry8
Route plain-language requests for Pi, Claude Code, Codex, Cursor, Copilot, OpenClaw ACP, OpenCode, Gemini CLI, Qwen, Kiro, Kimi, iFlow, Factory Droid…
SkillDFreshness: D★ 2Claude Code +9
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
- Repository
- github.com/Arry8/openclaw-edge
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from Arry8
- 0.448score
portfolio-intel
Arry8
Portfolio intelligence copilot.
SkillDFreshness: D★ 2Claude Code +9 - 0.445score
task-pua
Arry8
Task persistence enhancer with 13 corporate flavors.
SkillDFreshness: D★ 2Claude Code +9 - 0.445score
hermes-learning-loop
Arry8
Self-improving learning loop inspired by Hermes Agent.
SkillDFreshness: D★ 2Claude Code +9 - 0.444score
kernel-cp-activator
Arry8
Deploy KERNEL_INTUITION_Cp on any AI architecture with calibrated thresholds.
SkillDFreshness: D★ 2Claude Code +9 - 0.442score
feishu-bot-refresh
Arry8
Refresh Feishu bot identity information.
SkillDFreshness: D★ 2Claude Code +9 - 0.440score
security-triage
Arry8
Triage GitHub security advisories for OpenClaw with high-confidence close/keep decisions, exact tag and commit verification, trust-model checks, optional…
SkillDFreshness: D★ 2Claude Code +9
Cite this page
claude-memory-optimizer skill. Agent Mart. https://agentmart.dev/skills/arry8-claude-memory-optimizer (last updated 2026-10-24)