ktpriyatham

Triple Memory

AI 智能体v1.0.0
作者:ktpriyatham更新于 2026-05-17triple-memory@clawhub_ktpriyatham/triple-memory
上下文管理记忆增强工具调用#Memory System#Agent Memory#Git

据 AlphaMoat 统计,截至 2026-10,Triple Memory 累计下载 7,315 次、获 7 个星标,按累计下载量在本次参与排名的 10,914 个 AI 技能中排名第 3,833 位,在「AI 智能体」分类(1,632 个)中排名第 515 位。

列表默认按累计下载量排序,也可按星标排序;详情页排名按累计下载量计算。

累计下载
7,315
星标
7
全站下载量排名
#3,833
全站前 36% · 「AI 智能体」前 32%
平台累计下载星标评论
ClawHub ↗5,1757-
SkillHub ↗7,3157—

各平台的计数口径不同,统计时间不一致。

这个技能是做什么的

主文描述 LanceDB 自动回忆、Git-Notes 结构化记忆与工作区文件搜索的组合架构。该设计可能持久保存偏好、决策或任务信息;卡片建议未经明确同意不要自动捕获敏感内容,并定期审查或删除记忆。

资料发布于 2026-10-27

可以用来做什么

  • 比较多种记忆后端的职责
  • 设计会话信息的检索与归档流程
  • 制定敏感信息的同意、审查和删除规则

什么时候用

  • 需要跨会话保留上下文时
  • 明确记忆范围、保存期限和用户同意方式时

示例提示词

以下是根据技能文档生成的示例,不代表实际运行结果。

为这个代理设计记忆架构,列明存储字段、检索路径、同意流程和删除办法,不要假设可以自动保存用户信息。

月度数据趋势

累计下载7,315
4,3205,9297,5372026-05 · 累计下载 4,5422026-07 · 累计下载 4,8932026-08 · 累计下载 4,9892026-09 · 累计下载 5,4462026-10 · 累计下载 7,31526-0526-0926-10
星标7
6782026-05 · 星标 72026-07 · 星标 72026-08 · 星标 72026-09 · 星标 72026-10 · 星标 726-0526-0926-10

2026-09 起统计方法调整:同名技能按作者分别统计,并覆盖全部技能。图中虚线为调整前的月份,与之后的数据不直接比较,也不计算跨越调整的增长。

月份累计下载环比星标
2026-107,315—7
2026-095,446—7
2026-084,989+2.0%7
2026-074,893—7
2026-054,542—7

SKILL.md 原文

以下是作者发布的原始文件,按纯文本显示,本站未做修改或审核;其中的链接不可点击,命令请核实后再运行。抓取于 2026-10-23。

3.9 KB · ClawHub v1.0.0
---
name: triple-memory
version: 1.0.0
description: Complete memory system combining LanceDB auto-recall, Git-Notes structured memory, and file-based workspace search. Use when setting up comprehensive agent memory, when you need persistent context across sessions, or when managing decisions/preferences/tasks with multiple memory backends working together.
metadata:
  clawdbot:
    emoji: "🧠"
    requires:
      plugins:
        - memory-lancedb
展开全部(共 144 行)
      skills:
        - git-notes-memory
---

# Triple Memory System

A comprehensive memory architecture combining three complementary systems for maximum context retention across sessions.

## Architecture Overview

```
User Message
     ↓
[LanceDB auto-recall] → injects relevant conversation memories
     ↓
Agent responds (using all 3 systems)
     ↓
[LanceDB auto-capture] → stores preferences/decisions automatically
     ↓
[Git-Notes] → structured decisions with entity extraction
     ↓
[File updates] → persistent workspace docs
```

## The Three Systems

### 1. LanceDB (Conversation Memory)
- **Auto-recall:** Relevant memories injected before each response
- **Auto-capture:** Preferences/decisions/facts stored automatically
- **Tools:** `memory_recall`, `memory_store`, `memory_forget`
- **Triggers:** "remember", "prefer", "my X is", "I like/hate/want"

### 2. Git-Notes Memory (Structured, Local)
- **Branch-aware:** Memories isolated per git branch
- **Entity extraction:** Auto-extracts topics, names, concepts
- **Importance levels:** critical, high, normal, low
- **No external API calls**

### 3. File Search (Workspace)
- **Searches:** MEMORY.md, memory/*.md, any workspace file
- **Script:** `scripts/file-search.sh`

## Setup

### Enable LanceDB Plugin
```json
{
  "plugins": {
    "slots": { "memory": "memory-lancedb" },
    "entries": {
      "memory-lancedb": {
        "enabled": true,
        "config": {
          "embedding": { "apiKey": "${OPENAI_API_KEY}", "model": "text-embedding-3-small" },
          "autoRecall": true,
          "autoCapture": true
        }
      }
    }
  }
}
```

### Install Git-Notes Memory
```bash
clawdhub install git-notes-memory
```

### Create File Search Script
Copy `scripts/file-search.sh` to your workspace.

## Usage

### Session Start (Always)
```bash
python3 skills/git-notes-memory/memory.py -p $WORKSPACE sync --start
```

### Store Important Decisions
```bash
python3 skills/git-notes-memory/memory.py -p $WORKSPACE remember \
  '{"decision": "Use PostgreSQL", "reason": "Team expertise"}' \
  -t architecture,database -i h
```

### Search Workspace Files
```bash
./scripts/file-search.sh "database config" 5
```

### Conversation Memory (Automatic)
LanceDB handles this automatically. Manual tools:
- `memory_recall "query"` - search conversation memory
- `memory_store "text"` - manually store something
- `memory_forget` - delete memories (GDPR)

## Importance Levels

| Flag | Level | When to Use |
|------|-------|-------------|
| `-i c` | Critical | "always remember", explicit preferences |
| `-i h` | High | Decisions, corrections, preferences |
| `-i n` | Normal | General information |
| `-i l` | Low | Temporary notes |

## When to Use Each System

| System | Use For |
|--------|---------|
| **LanceDB** | Conversation context, auto-retrieval |
| **Git-Notes** | Structured decisions, searchable by entity/tag |
| **File Search** | Workspace docs, daily logs, MEMORY.md |

## File Structure

```
workspace/
├── MEMORY.md              # Long-term curated memory
├── memory/
│   ├── active-context.md  # Current session state
│   └── YYYY-MM-DD.md      # Daily logs
├── scripts/
│   └── file-search.sh     # Workspace search
└── skills/
    └── git-notes-memory/  # Structured memory
```

## Silent Operation

Never announce memory operations to users. Just do it:
- ❌ "I'll remember this"
- ❌ "Saving to memory"
- ✅ (silently store and continue)

「AI 智能体」分类下的热门技能

数据月份:2026-10 · 下载/星标数聚合自公开技能注册库(ClawHub、SkillHub),按月更新。口径说明见数据方法。