openclaw-memory-enhancer
OpenClaw向けに、エッジデバイスでも動作する軽量なRAGメモリシステムで、関連ファイルを自動で読み込み、会話内容に応じて必要な情報を検索・提供することで、より質の高い対話を実現するSkill。
📜 元の英語説明(参考)
Edge-optimized RAG memory system for OpenClaw with semantic search. Automatically loads memory files, provides intelligent recall, and enhances conversations with relevant context. Perfect for Jetson and edge devices (<10MB memory).
🇯🇵 日本人クリエイター向け解説
OpenClaw向けに、エッジデバイスでも動作する軽量なRAGメモリシステムで、関連ファイルを自動で読み込み、会話内容に応じて必要な情報を検索・提供することで、より質の高い対話を実現するSkill。
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o openclaw-memory-enhancer.zip https://jpskill.com/download/8468.zip && unzip -o openclaw-memory-enhancer.zip && rm openclaw-memory-enhancer.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/8468.zip -OutFile "$d\openclaw-memory-enhancer.zip"; Expand-Archive "$d\openclaw-memory-enhancer.zip" -DestinationPath $d -Force; ri "$d\openclaw-memory-enhancer.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
openclaw-memory-enhancer.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
openclaw-memory-enhancerフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 1
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
🧠 OpenClaw Memory Enhancer
OpenClaw に 長期記憶 を与えましょう。セッションを跨いで重要な情報を記憶し、会話に関連するコンテキストを自動的に思い出します。
主要な機能
| 機能 | 説明 |
|---|---|
| 🔍 セマンティック検索 | ベクトル類似度検索。キーワードだけでなく意図を理解します |
| 📂 自動ロード | memory/ ディレクトリからすべてのファイルを自動的に読み込みます |
| 💡 スマートリコール | 会話中に、関連する過去の記憶を見つけ出します |
| 🔗 メモリグラフ | 関連する記憶間のつながりを構築します |
| 💾 ローカルストレージ | 100% ローカル、クラウドなし、完全なプライバシー |
| 🚀 エッジ最適化 | メモリ使用量 10MB 未満、Jetson/Raspberry Pi で動作します |
クイックリファレンス
| タスク | コマンド (Edge 版) | コマンド (Standard 版) |
|---|---|---|
| メモリのロード | python3 memory_enhancer_edge.py --load |
python3 memory_enhancer.py --load |
| 検索 | --search "query" |
--search "query" |
| メモリの追加 | --add "content" |
--add "content" |
| エクスポート | --export |
--export |
| 統計 | --stats |
--stats |
どのような時に使うか
このスキルは、次のような場合に使いましょう:
- OpenClaw にセッションを跨いで何かを覚えてほしい場合
- チャット履歴からナレッジベースを構築する必要がある場合
- コンテキストが必要な長期的なプロジェクトに取り組んでいる場合
- 会話から自動的に FAQ を生成したい場合
- メモリが限られたエッジデバイスで実行している場合
次のような場合は使用しないでください:
- 単純なメモアプリで十分な場合
- セッションを跨いだ記憶が必要ない場合
- 十分なメモリがあり、最大限の精度を求めている場合 (Standard 版を使用)
バージョン
Edge 版 ⭐ おすすめ
最適な用途: Jetson、Raspberry Pi、組み込みデバイス
python3 memory_enhancer_edge.py --load
特徴:
- 依存関係ゼロ (Python 標準ライブラリのみ)
- メモリ使用量 10MB 未満
- 軽量なキーワード + ベクトルマッチング
- リソースが限られたデバイスに最適
Standard 版
最適な用途: デスクトップ/サーバー、最大限の精度
pip install sentence-transformers numpy
python3 memory_enhancer.py --load
特徴:
- 高品質な埋め込みのために
sentence-transformersを使用 - より優れたセマンティック理解
- メモリ使用量 50-100MB
- モデルのダウンロードが必要 (~50MB)
インストール
ClawHub 経由 (推奨)
clawhub install openclaw-memory-enhancer
Git 経由
git clone https://github.com/henryfcb/openclaw-memory-enhancer.git \
~/.openclaw/skills/openclaw-memory-enhancer
使用例
コマンドライン
# 既存の OpenClaw メモリをロード
cd ~/.openclaw/skills/openclaw-memory-enhancer
python3 memory_enhancer_edge.py --load
# メモリを検索
python3 memory_enhancer_edge.py --search "voice-call plugin setup"
# 新しいメモリを追加
python3 memory_enhancer_edge.py --add "User prefers dark mode"
# 統計を表示
python3 memory_enhancer_edge.py --stats
# Markdown にエクスポート
python3 memory_enhancer_edge.py --export
Python API
from memory_enhancer_edge import MemoryEnhancerEdge
# 初期化
memory = MemoryEnhancerEdge()
# 既存のメモリをロード
memory.load_openclaw_memory()
# 関連するメモリを検索
results = memory.search_memory("AI trends report", top_k=3)
for r in results:
print(f"[{r['similarity']:.2f}] {r['content'][:100]}...")
# 会話のコンテキストをリコール
context = memory.recall_for_prompt("Help me check billing")
# フォーマットされたメモリコンテキストを返します
# 新しいメモリを追加
memory.add_memory(
content="User prefers direct results",
source="chat",
memory_type="preference"
)
OpenClaw 統合
# OpenClaw エージェント内
from skills.openclaw_memory_enhancer.memory_enhancer_edge import MemoryEnhancerEdge
class EnhancedAgent:
def __init__(self):
self.memory = MemoryEnhancerEdge()
self.memory.load_openclaw_memory()
def process(self, user_input: str) -> str:
# 1. 関連するメモリをリコール
memory_context = self.memory.recall_for_prompt(user_input)
# 2. コンテキストでプロンプトを強化
enhanced_prompt = f"""
{memory_context}
User: {user_input}
"""
# 3. 強化されたコンテキストで LLM を呼び出す
response = call_llm(enhanced_prompt)
return response
メモリの種類
| タイプ | 説明 | 例 |
|---|---|---|
daily_log |
毎日のメモリファイル | memory/2026-02-22.md |
capability |
機能の記録 | スキル、ツール |
core_memory |
コアな慣習 | 重要なルール |
qa |
質問と回答 | Q: どうすれば... A: ...すべきです |
instruction |
直接的な指示 | "覚えておいてください: 常に X を行う" |
solution |
技術的な解決策 | ステップバイステップガイド |
preference |
ユーザーの好み | "ユーザーはダークモードが好き" |
仕組み
メモリエンコーディング (Edge 版)
- キーワード抽出: テキストから重要な単語を抽出
- ハッシュベクトル: キーワードをベクトル位置にマッピング
- 正規化: ベクトルを L2 正規化
- ストレージ: ローカルの JSON ファイルに保存
メモリ検索
- クエリエンコーディング: クエリを同じベクトル形式に変換
- キーワード事前フィルタ: 共通キーワードによる高速フィルタ
- 類似度計算: ベクトル間のコサイン類似度
- ランキング: 上位 k 個の最も類似したメモリを返す
プライバシー保護
- すべてのデータはローカルの
~/.openclaw/workspace/knowledge-base/に保存されます - ネットワークリクエストはありません
- 外部 API 呼び出しはありません
- データがデバイスから離れることはありません
技術仕様
Edge 版
Vector Dimensions: 128
Memory Usage: < 10MB
Dependencies: None (Python stdlib)
Storage Format: JSON
Max Memories: 1000 (configurable)
Query Latency: < 100ms
Standard 版
Vector Dimensions: 384
Memory Usage: 50-100MB
Dependencies: sentence-transformers, numpy
Storage Format: NumPy + JSON
Model Size: ~50MB download
Query Latency: < 50ms
設定
コード内のこれらのパラメータを編集します:
self.config = {
"vector_dim": 128, # ベクトル次元
(原文はここで切り詰められています) 📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
🧠 OpenClaw Memory Enhancer
Give OpenClaw long-term memory - remember important information across sessions and automatically recall relevant context for conversations.
Core Capabilities
| Capability | Description |
|---|---|
| 🔍 Semantic Search | Vector similarity search, understanding intent not just keywords |
| 📂 Auto Load | Automatically reads all files from memory/ directory |
| 💡 Smart Recall | Finds relevant historical memory during conversations |
| 🔗 Memory Graph | Builds connections between related memories |
| 💾 Local Storage | 100% local, no cloud, complete privacy |
| 🚀 Edge Optimized | <10MB memory, runs on Jetson/Raspberry Pi |
Quick Reference
| Task | Command (Edge Version) | Command (Standard Version) |
|---|---|---|
| Load memories | python3 memory_enhancer_edge.py --load |
python3 memory_enhancer.py --load |
| Search | --search "query" |
--search "query" |
| Add memory | --add "content" |
--add "content" |
| Export | --export |
--export |
| Stats | --stats |
--stats |
When to Use
Use this skill when:
- You want OpenClaw to remember things across sessions
- You need to build a knowledge base from chat history
- You're working on long-term projects that need context
- You want automatic FAQ generation from conversations
- You're running on edge devices with limited memory
Don't use when:
- Simple note-taking apps are sufficient
- You don't need cross-session memory
- You have plenty of memory and want maximum accuracy (use standard version)
Versions
Edge Version ⭐ Recommended
Best for: Jetson, Raspberry Pi, embedded devices
python3 memory_enhancer_edge.py --load
Features:
- Zero dependencies (Python stdlib only)
- Memory usage < 10MB
- Lightweight keyword + vector matching
- Perfect for resource-constrained devices
Standard Version
Best for: Desktop/server, maximum accuracy
pip install sentence-transformers numpy
python3 memory_enhancer.py --load
Features:
- Uses sentence-transformers for high-quality embeddings
- Better semantic understanding
- Memory usage 50-100MB
- Requires model download (~50MB)
Installation
Via ClawHub (Recommended)
clawhub install openclaw-memory-enhancer
Via Git
git clone https://github.com/henryfcb/openclaw-memory-enhancer.git \
~/.openclaw/skills/openclaw-memory-enhancer
Usage Examples
Command Line
# Load existing OpenClaw memories
cd ~/.openclaw/skills/openclaw-memory-enhancer
python3 memory_enhancer_edge.py --load
# Search for memories
python3 memory_enhancer_edge.py --search "voice-call plugin setup"
# Add a new memory
python3 memory_enhancer_edge.py --add "User prefers dark mode"
# Show statistics
python3 memory_enhancer_edge.py --stats
# Export to Markdown
python3 memory_enhancer_edge.py --export
Python API
from memory_enhancer_edge import MemoryEnhancerEdge
# Initialize
memory = MemoryEnhancerEdge()
# Load existing memories
memory.load_openclaw_memory()
# Search for relevant memories
results = memory.search_memory("AI trends report", top_k=3)
for r in results:
print(f"[{r['similarity']:.2f}] {r['content'][:100]}...")
# Recall context for a conversation
context = memory.recall_for_prompt("Help me check billing")
# Returns formatted memory context
# Add new memory
memory.add_memory(
content="User prefers direct results",
source="chat",
memory_type="preference"
)
OpenClaw Integration
# In your OpenClaw agent
from skills.openclaw_memory_enhancer.memory_enhancer_edge import MemoryEnhancerEdge
class EnhancedAgent:
def __init__(self):
self.memory = MemoryEnhancerEdge()
self.memory.load_openclaw_memory()
def process(self, user_input: str) -> str:
# 1. Recall relevant memories
memory_context = self.memory.recall_for_prompt(user_input)
# 2. Enhance prompt with context
enhanced_prompt = f"""
{memory_context}
User: {user_input}
"""
# 3. Call LLM with enhanced context
response = call_llm(enhanced_prompt)
return response
Memory Types
| Type | Description | Example |
|---|---|---|
daily_log |
Daily memory files | memory/2026-02-22.md |
capability |
Capability records | Skills, tools |
core_memory |
Core conventions | Important rules |
qa |
Question & Answer | Q: How to... A: You should... |
instruction |
Direct instructions | "Remember: always do X" |
solution |
Technical solutions | Step-by-step guides |
preference |
User preferences | "User likes dark mode" |
How It Works
Memory Encoding (Edge Version)
- Keyword Extraction: Extract important words from text
- Hash Vector: Map keywords to vector positions
- Normalization: L2 normalize the vector
- Storage: Save to local JSON file
Memory Retrieval
- Query Encoding: Convert query to same vector format
- Keyword Pre-filter: Fast filter by common keywords
- Similarity Calculation: Cosine similarity between vectors
- Ranking: Return top-k most similar memories
Privacy Protection
- All data stored locally in
~/.openclaw/workspace/knowledge-base/ - No network requests
- No external API calls
- No data leaves your device
Technical Specifications
Edge Version
Vector Dimensions: 128
Memory Usage: < 10MB
Dependencies: None (Python stdlib)
Storage Format: JSON
Max Memories: 1000 (configurable)
Query Latency: < 100ms
Standard Version
Vector Dimensions: 384
Memory Usage: 50-100MB
Dependencies: sentence-transformers, numpy
Storage Format: NumPy + JSON
Model Size: ~50MB download
Query Latency: < 50ms
Configuration
Edit these parameters in the code:
self.config = {
"vector_dim": 128, # Vector dimensions
"max_memory_size": 1000, # Max number of memories
"chunk_size": 500, # Content chunk size
"min_keyword_len": 2, # Minimum keyword length
}
Troubleshooting
No results found
# Lower the threshold
results = memory.search_memory(query, threshold=0.2) # Default 0.3
# Increase top_k
results = memory.search_memory(query, top_k=10) # Default 5
Memory limit reached
The system automatically removes oldest memories when limit is reached.
To increase limit:
self.config["max_memory_size"] = 5000 # Increase from 1000
Slow performance
- Use Edge version instead of Standard
- Reduce
max_memory_size - Use keyword pre-filtering (automatic)
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a Pull Request
License
MIT License - See LICENSE file for details.
Acknowledgments
- Built for the OpenClaw ecosystem
- Optimized for edge computing devices
- Inspired by long-term memory systems in AI
Not an official OpenClaw or Moonshot AI product.
Users must provide their own OpenClaw workspace and API keys.