pntrivedy

Lancedb Memory

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

AlphaMoatによると、2026-10時点でLancedb Memoryのダウンロード数は11,542、スター数は7で、累計ダウンロード数で今回のランキング対象AIスキル10,914件中2,383位、AIエージェントでは1,632件中321位です。

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

ダウンロード数
1.2万
スター数
7
累計ダウンロード順位
#2,383
全体の上位 22% · AIエージェントの上位 20%
プラットフォームダウンロード数スター数コメント
ClawHub ↗66857-
SkillHub ↗1.2万7—

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

このスキルでできること

本文、分類、タグ、重要度、メタデータを保存し、照会、更新、削除、統計を扱う例です。Python、LanceDB、ローカル保存先が必要です。意味検索のベクトルと埋め込み設定は検証が必要で、同意、秘匿化、保存期限、暗号化も別途実装します。検証済みの完全な記憶システムではありません。

資料公開日 2026-10-27

できること

  • ローカル記憶の構造と連携条件を評価する

使う場面

  • LanceDB を使う記録インターフェースを調べるとき

プロンプト例

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

実行や保存をせず、保存構造、検索条件、プライバシー制御の不足を確認して。

月次の推移

ダウンロード数1.2万
472983881.2万2026-03 · ダウンロード数 52342026-05 · ダウンロード数 59842026-06 · ダウンロード数 61982026-07 · ダウンロード数 64822026-08 · ダウンロード数 66472026-09 · ダウンロード数 73232026-10 · ダウンロード数 1.2万26-0326-0926-10
スター数7
6782026-03 · スター数 72026-05 · スター数 72026-06 · スター数 72026-07 · スター数 72026-08 · スター数 72026-09 · スター数 72026-10 · スター数 726-0326-0926-10

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

月ダウンロード数前月比スター数
2026-101.2万—7
2026-097323—7
2026-086647+2.5%7
2026-076482+4.6%7
2026-066198+3.6%7
2026-055984—7
2026-035234—7

SKILL.md 原文

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

6.4 KB・ClawHub v1.0.0
#!/usr/bin/env python3
"""
LanceDB integration for long-term memory management.
Provides vector search and semantic memory capabilities.
"""

import os
import json
import lancedb
from datetime import datetime
すべて表示(全 178 行)
from typing import List, Dict, Any, Optional
from pathlib import Path

class LanceMemoryDB:
    """LanceDB wrapper for long-term memory storage and retrieval."""
    
    def __init__(self, db_path: str = "/Users/prerak/clawd/memory/lancedb"):
        self.db_path = Path(db_path)
        self.db_path.mkdir(parents=True, exist_ok=True)
        self.db = lancedb.connect(self.db_path)
        
        # Ensure memory table exists
        if "memory" not in self.db.table_names():
            self._create_memory_table()
    
    def _create_memory_table(self):
        """Create the memory table with appropriate schema."""
        schema = [
            {"name": "id", "type": "int", "nullable": False},
            {"name": "timestamp", "type": "timestamp", "nullable": False},
            {"name": "content", "type": "str", "nullable": False},
            {"name": "category", "type": "str", "nullable": True},
            {"name": "tags", "type": "str[]", "nullable": True},
            {"name": "importance", "type": "int", "nullable": True},
            {"name": "metadata", "type": "json", "nullable": True},
        ]
        
        self.db.create_table("memory", schema=schema)
    
    def add_memory(self, content: str, category: str = "general", tags: List[str] = None, 
                   importance: int = 5, metadata: Dict[str, Any] = None) -> int:
        """Add a new memory entry."""
        table = self.db.open_table("memory")
        
        # Get next ID
        max_id = table.to_pandas()["id"].max() if len(table) > 0 else 0
        new_id = max_id + 1
        
        # Insert new memory
        memory_data = {
            "id": new_id,
            "timestamp": datetime.now(),
            "content": content,
            "category": category,
            "tags": tags or [],
            "importance": importance,
            "metadata": metadata or {}
        }
        
        table.add([memory_data])
        return new_id
    
    def search_memories(self, query: str, category: str = None, limit: int = 10) -> List[Dict]:
        """Search memories using vector similarity."""
        table = self.db.open_table("memory")
        
        # Build filter
        where_clause = []
        if category:
            where_clause.append(f"category = '{category}'")
        
        filter_expr = " AND ".join(where_clause) if where_clause else None
        
        # Vector search
        results = table.vector_search(query).limit(limit).where(filter_expr).to_list()
        
        return results
    
    def get_memories_by_category(self, category: str, limit: int = 50) -> List[Dict]:
        """Get memories by category."""
        table = self.db.open_table("memory")
        df = table.to_pandas()
        filtered = df[df["category"] == category].head(limit)
        return filtered.to_dict("records")
    
    def get_memory_by_id(self, memory_id: int) -> Optional[Dict]:
        """Get a specific memory by ID."""
        table = self.db.open_table("memory")
        df = table.to_pandas()
        result = df[df["id"] == memory_id]
        return result.to_dict("records")[0] if len(result) > 0 else None
    
    def update_memory(self, memory_id: int, **kwargs) -> bool:
        """Update a memory entry."""
        table = self.db.open_table("memory")
        
        valid_fields = ["content", "category", "tags", "importance", "metadata"]
        updates = {k: v for k, v in kwargs.items() if k in valid_fields}
        
        if not updates:
            return False
        
        # Convert to proper types for LanceDB
        if "tags" in updates and isinstance(updates["tags"], list):
            updates["tags"] = str(updates["tags"]).replace("'", '"')
        
        table.update(updates, where=f"id = {memory_id}")
        return True
    
    def delete_memory(self, memory_id: int) -> bool:
        """Delete a memory entry."""
        table = self.db.open_table("memory")
        current_count = len(table)
        table.delete(f"id = {memory_id}")
        return len(table) < current_count
    
    def get_all_categories(self) -> List[str]:
        """Get all unique categories."""
        table = self.db.open_table("memory")
        df = table.to_pandas()
        return df["category"].dropna().unique().tolist()
    
    def get_memory_stats(self) -> Dict[str, Any]:
        """Get statistics about memory storage."""
        table = self.db.open_table("memory")
        df = table.to_pandas()
        
        return {
            "total_memories": len(df),
            "categories": len(self.get_all_categories()),
            "by_category": df["category"].value_counts().to_dict(),
            "date_range": {
                "earliest": df["timestamp"].min().isoformat() if len(df) > 0 else None,
                "latest": df["timestamp"].max().isoformat() if len(df) > 0 else None
            }
        }

# Global instance
lancedb_memory = LanceMemoryDB()

def add_memory(content: str, category: str = "general", tags: List[str] = None, 
               importance: int = 5, metadata: Dict[str, Any] = None) -> int:
    """Add a memory to the LanceDB store."""
    return lancedb_memory.add_memory(content, category, tags, importance, metadata)

def search_memories(query: str, category: str = None, limit: int = 10) -> List[Dict]:
    """Search memories using semantic similarity."""
    return lancedb_memory.search_memories(query, category, limit)

def get_memories_by_category(category: str, limit: int = 50) -> List[Dict]:
    """Get memories by category."""
    return lancedb_memory.get_memories_by_category(category, limit)

def get_memory_stats() -> Dict[str, Any]:
    """Get memory storage statistics."""
    return lancedb_memory.get_memory_stats()

# Example usage
if __name__ == "__main__":
    # Test the database
    print("Testing LanceDB memory integration...")
    
    # Add a test memory
    test_id = add_memory(
        content="This is a test memory for LanceDB integration",
        category="test",
        tags=["lancedb", "integration", "test"],
        importance=8
    )
    print(f"Added memory with ID: {test_id}")
    
    # Search for memories
    results = search_memories("test memory")
    print(f"Search results: {len(results)} memories found")
    
    # Get stats
    stats = get_memory_stats()
    print(f"Memory stats: {stats}")

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

pntrivedyのその他のスキル

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