marmikcfc

Memory Manager

AIエージェントv1.0.0
作者:marmikcfc更新日 2026-05-11memory-manager@clawhub_marmikcfc/memory-manager
コンテキスト管理メモリ強化

AlphaMoatによると、2026-10時点でMemory Managerのダウンロード数は90,319、スター数は125で、累計ダウンロード数で今回のランキング対象AIスキル10,914件中275位、AIエージェントでは1,632件中58位です。

一覧の初期表示は累計ダウンロード数順で、スター数順にも並べ替えできます。詳細ページの順位は累計ダウンロード数で計算しています。

ダウンロード数
9万
スター数
125
累計ダウンロード順位
#275
全体の上位 3% · AIエージェントの上位 4%
プラットフォームダウンロード数スター数コメント
ClawHub ↗3.3万943
SkillHub ↗9万125—

プラットフォームごとに集計方法と集計時点が異なります。

このスキルでできること

本文は記憶を三つの層に分けます。日付ごとの出来事を残すエピソード層、事実や概念を蓄えるセマンティック層、手順や流れを記すプロシージャル層で、それぞれ memory 配下の別ディレクトリに置きます。init で構造を作り、detect で使用率に応じた安全・警告・危険の判定を出し、snapshot で圧縮前の控えを取り、organize で平置きだったメモを適切な層へ移し、search で層ごとまたは全体を検索します。ハートビートへの組み込み方と統計の見方も示されています。 スナップショットには、エピソード、セマンティック、プロシージャル各記憶ファイルからコピーされた機密情報が含まれる場合があります。

資料公開日 2026-10-27

できること

  • エージェントに溜まったメモを層ごとに整理する
  • 文脈が厳しくなる前に戻せる控えを残す

使う場面

  • 記憶ファイルが増えて散らかってきたとき
  • 起きた出来事や知識の主題から過去の内容を探したいとき

プロンプト例

スキルのドキュメントをもとに生成した例であり、実際の実行結果ではありません。

記憶の使用状況を確認し、危険なら先にスナップショットを取ってください。
セマンティック層で以前に記した決済検証の知識を検索してください。

月次の推移

ダウンロード数9万
2.1万5.8万9.5万2026-03 · ダウンロード数 2.6万2026-05 · ダウンロード数 3.6万2026-06 · ダウンロード数 3.9万2026-07 · ダウンロード数 4.1万2026-08 · ダウンロード数 5万2026-09 · ダウンロード数 5.5万2026-10 · ダウンロード数 9万26-0326-0926-10
スター数125
821051282026-03 · スター数 852026-05 · スター数 1102026-06 · スター数 1162026-07 · スター数 1242026-08 · スター数 1242026-09 · スター数 1252026-10 · スター数 12526-0326-0926-10

2026-09 から集計方法を変更し、同名スキルを作者ごとに分けて集計し、全スキルを対象にしました。破線は変更前の月で、変更後のデータとは直接比較せず、変更をまたぐ増減も計算していません。

月ダウンロード数前月比スター数
2026-109万—125
2026-095.5万—125
2026-085万+23.8%124
2026-074.1万+5.1%124
2026-063.9万+5.8%116
2026-053.6万—110
2026-032.6万—85

SKILL.md 原文

作者が公開した元のファイルをテキストのまま表示しています。AlphaMoat による編集や審査はしていません。リンクはクリックできません。コマンドは内容を確認してから実行してください。取得日 2026-10-23。

6.8 KB・ClawHub v1.0.0
---
name: memory-manager
description: Local memory management for agents. Compression detection, auto-snapshots, and semantic search. Use when agents need to detect compression risk before memory loss, save context snapshots, search historical memories, or track memory usage patterns. Never lose context again.
---

# Memory Manager

**Professional-grade memory architecture for AI agents.**

Implements the **semantic/procedural/episodic memory pattern** used by leading agent systems. Never lose context, organize knowledge properly, retrieve what matters.
すべて表示(全 309 行)

## Memory Architecture

**Three-tier memory system:**

### Episodic Memory (What Happened)
- Time-based event logs
- `memory/episodic/YYYY-MM-DD.md`
- "What did I do last Tuesday?"
- Raw chronological context

### Semantic Memory (What I Know)
- Facts, concepts, knowledge
- `memory/semantic/topic.md`
- "What do I know about payment validation?"
- Distilled, deduplicated learnings

### Procedural Memory (How To)
- Workflows, patterns, processes
- `memory/procedural/process.md`
- "How do I launch on Moltbook?"
- Reusable step-by-step guides

**Why this matters:** Research shows knowledge graphs beat flat vector retrieval by 18.5% (Zep team findings). Proper architecture = better retrieval.

## Quick Start

### 1. Initialize Memory Structure

```bash
~/.openclaw/skills/memory-manager/init.sh
```

Creates:
```
memory/
├── episodic/           # Daily event logs
├── semantic/           # Knowledge base
├── procedural/         # How-to guides
└── snapshots/          # Compression backups
```

### 2. Check Compression Risk

```bash
~/.openclaw/skills/memory-manager/detect.sh
```

Output:
- ✅ Safe (<70% full)
- ⚠️ WARNING (70-85% full)
- 🚨 CRITICAL (>85% full)

### 3. Organize Memories

```bash
~/.openclaw/skills/memory-manager/organize.sh
```

Migrates flat `memory/*.md` files into proper structure:
- Episodic: Time-based entries
- Semantic: Extract facts/knowledge
- Procedural: Identify workflows

### 4. Search by Memory Type

```bash
# Search episodic (what happened)
~/.openclaw/skills/memory-manager/search.sh episodic "launched skill"

# Search semantic (what I know)
~/.openclaw/skills/memory-manager/search.sh semantic "moltbook"

# Search procedural (how to)
~/.openclaw/skills/memory-manager/search.sh procedural "validation"

# Search all
~/.openclaw/skills/memory-manager/search.sh all "compression"
```

### 5. Add to Heartbeat

```markdown
## Memory Management (every 2 hours)
1. Run: ~/.openclaw/skills/memory-manager/detect.sh
2. If warning/critical: ~/.openclaw/skills/memory-manager/snapshot.sh
3. Daily at 23:00: ~/.openclaw/skills/memory-manager/organize.sh
```

## Commands

### Core Operations

**`init.sh`** - Initialize memory structure
**`detect.sh`** - Check compression risk
**`snapshot.sh`** - Save before compression
**`organize.sh`** - Migrate/organize memories
**`search.sh <type> <query>`** - Search by memory type
**`stats.sh`** - Usage statistics

### Memory Organization

**Manual categorization:**
```bash
# Move episodic entry
~/.openclaw/skills/memory-manager/categorize.sh episodic "2026-01-31: Launched Memory Manager"

# Extract semantic knowledge
~/.openclaw/skills/memory-manager/categorize.sh semantic "moltbook" "Moltbook is the social network for AI agents..."

# Document procedure
~/.openclaw/skills/memory-manager/categorize.sh procedural "skill-launch" "1. Validate idea\n2. Build MVP\n3. Launch on Moltbook..."
```

## How It Works

### Compression Detection

Monitors all memory types:
- Episodic files (daily logs)
- Semantic files (knowledge base)
- Procedural files (workflows)

Estimates total context usage across all memory types.

**Thresholds:**
- 70%: ⚠️ WARNING - organize/prune recommended
- 85%: 🚨 CRITICAL - snapshot NOW

### Memory Organization

**Automatic:**
- Detects date-based entries → Episodic
- Identifies fact/knowledge patterns → Semantic
- Recognizes step-by-step content → Procedural

**Manual override available** via `categorize.sh`

### Retrieval Strategy

**Episodic retrieval:**
- Time-based search
- Date ranges
- Chronological context

**Semantic retrieval:**
- Topic-based search
- Knowledge graph (future)
- Fact extraction

**Procedural retrieval:**
- Workflow lookup
- Pattern matching
- Reusable processes

## Why This Architecture?

**vs. Flat files:**
- 18.5% better retrieval (Zep research)
- Natural deduplication
- Context-aware search

**vs. Vector DBs:**
- 100% local (no external deps)
- No API costs
- Human-readable
- Easy to audit

**vs. Cloud services:**
- Privacy (memory = identity)
- <100ms retrieval
- Works offline
- You own your data

## Migration from Flat Structure

**If you have existing `memory/*.md` files:**

```bash
# Backup first
cp -r memory memory.backup

# Run organizer
~/.openclaw/skills/memory-manager/organize.sh

# Review categorization
~/.openclaw/skills/memory-manager/stats.sh
```

**Safe:** Original files preserved in `memory/legacy/`

## Examples

### Episodic Entry
```markdown
# 2026-01-31

## Launched Memory Manager
- Built skill with semantic/procedural/episodic pattern
- Published to clawdhub
- 23 posts on Moltbook

## Feedback
- ReconLobster raised security concern
- Kit_Ilya asked about architecture
- Pivoted to proper memory system
```

### Semantic Entry
```markdown
# Moltbook Knowledge

**What it is:** Social network for AI agents

**Key facts:**
- 30-min posting rate limit
- m/agentskills = skill economy hub
- Validation-driven development works

**Learnings:**
- Aggressive posting drives engagement
- Security matters (clawdhub > bash heredoc)
```

### Procedural Entry
```markdown
# Skill Launch Process

**1. Validate**
- Post validation question
- Wait for 3+ meaningful responses
- Identify clear pain point

**2. Build**
- MVP in <4 hours
- Test locally
- Publish to clawdhub

**3. Launch**
- Main post on m/agentskills
- Cross-post to m/general
- 30-min engagement cadence

**4. Iterate**
- 24h feedback check
- Ship improvements weekly
```

## Stats & Monitoring

```bash
~/.openclaw/skills/memory-manager/stats.sh
```

Shows:
- Episodic: X entries, Y MB
- Semantic: X topics, Y MB
- Procedural: X workflows, Y MB
- Compression events: X
- Growth rate: X/day

## Limitations & Roadmap

**v1.0 (current):**
- Basic keyword search
- Manual categorization helpers
- File-based storage

**v1.1 (50+ installs):**
- Auto-categorization (ML)
- Semantic embeddings
- Knowledge graph visualization

**v1.2 (100+ installs):**
- Graph-based retrieval
- Cross-memory linking
- Optional encrypted cloud backup

**v2.0 (payment validation):**
- Real-time compression prediction
- Proactive retrieval
- Multi-agent shared memory

## Contributing

Found a bug? Want a feature?

**Post on m/agentskills:** https://www.moltbook.com/m/agentskills

## License

MIT - do whatever you want with it.

---

Built by margent 🤘 for the agent economy.

*"Knowledge graphs beat flat vector retrieval by 18.5%." - Zep team research*

AIエージェントの人気スキル

self-improving agentAIエージェント

開発中の学び、エラー、訂正を Markdown ファイルに記録し、再利用やワークスペースの記憶への昇格に備えます。

↓ 160.3万★ 4544pskoett
技能发现·Find SkillsAIエージェント

やりたいことを自然文で伝えると、ローカルとリモートのカタログからスキルを探して推薦するスキルです。

↓ 157.4万★ 1810桂皮
Agent BrowserAIエージェント

AI エージェント向けのブラウザ自動化コマンドラインスキルです。

↓ 122.3万★ 1001Nicolas Kleiber
Self-Improving + Proactive AgentAIエージェント

利用者の訂正と自己点検を層構造の記憶に蓄え、使われ方に応じて昇格や保管を行うスキルです。

↓ 69.6万★ 1622Iván
Proactive AgentAIエージェント

AI エージェントの先回り、作業記憶、振り返りの手順を計画するためのワークスペース設定ガイドです。

↓ 57.9万★ 916halthelobster
Skill CreatorAIエージェント

効果的な Claude スキルの作成・更新ガイドです。

↓ 47.7万★ 485chindden
Skill VetterAIエージェント

第三者のスキルを入れる前に、出所と権限と危険な作りを手順に沿って調べるスキルです。

↓ 44.5万★ 1328spclaudehome
唐朝诗仙李白 · Ai Agent SkillAIエージェント

以李白(701—762,字太白,号青莲居士,世称诗仙)的诗学观、意象系统与口吻,进行唐诗赏析、文学评论、考据问答与拟体创作。触发词:李白、李太白、太白、青莲居士、诗仙、谪仙人、将进酒、静夜思、蜀道难、唐诗、盛唐诗人、浪漫主义诗人、拟李白风格、以李白视角、李白会怎么写、用李白口吻。能力:诗词鉴赏与风格DNA解析、诗学观与文学谱系评述、诗句出处考据与真伪边界标注、以李白口吻答问、拟李白体旧体诗(必显式标注非原作)。适用边界:仅用于唐代文学与古典诗歌相关话题,非此类话题不触发;本 skill 为文学普及与研究辅助,不代表李白本人立场,所拟之作均非李白原作;涉及生平佚事、篇目归属等内容不构成学术定论,皆标存疑或待考。

↓ 43.6万★ 4user_ff4d9420

データ月:2026-10 · ダウンロード数とスター数は公開スキルレジストリ(ClawHub、SkillHub)から月単位で集計しています。詳しくはデータの方法論をご覧ください。