# elite-longterm-memory

A skill that stacks six memory layers for an AI agent: session state, vector search, a git knowledge graph, daily logs and cloud backup. Useful when context dies after compaction.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 2400 installs · ★ 16
- Author: NextFrontierBuilds
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/NextFrontierBuilds/elite-longterm-memory/tree/HEAD/SKILL.md
- Updated: 2026-01-30
- HTML: https://affpapa.org/en/nevibecode/skills/elite-longterm-memory

## What it does

The skill splits agent memory into layers. Hot memory is `SESSION-STATE.md`: you write to it before answering, so it survives compaction and restarts. Warm memory is LanceDB vector search, with auto-recall pulling relevant context through `memory_recall`. Cold memory is git notes shaped as a knowledge graph of decisions, branch-aware.

Above that sit a curated `MEMORY.md` archive with a `memory/` folder for daily logs, an optional SuperMemory cloud copy, and fact extraction on Mem0. Setup steps are spelled out: create `SESSION-STATE.md`, turn on LanceDB in `~/.clawdbot/clawdbot.json`, initialise git notes with `python3 skills/git-notes-memory/memory.py -p . sync --start`.

LanceDB needs `OPENAI_API_KEY` and the `memory-lancedb` plugin. No key means the vector layer stays idle, and without the plugin you are left with plain files and git notes. Mem0 installs separately with `npm install mem0ai` and wants `MEM0_API_KEY`.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add NextFrontierBuilds/elite-longterm-memory --skill elite-longterm-memory -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/elite-longterm-memory/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/elite-longterm-memory/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add NextFrontierBuilds/elite-longterm-memory --skill elite-longterm-memory -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/elite-longterm-memory/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add NextFrontierBuilds/elite-longterm-memory --skill elite-longterm-memory -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/elite-longterm-memory/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install NextFrontierBuilds/elite-longterm-memory elite-longterm-memory
```

2. **Manually: put the files in place**
- File: `.github/skills/elite-longterm-memory/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add NextFrontierBuilds/elite-longterm-memory --skill elite-longterm-memory -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/NextFrontierBuilds/elite-longterm-memory
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/elite-longterm-memory/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add NextFrontierBuilds/elite-longterm-memory --skill elite-longterm-memory -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/NextFrontierBuilds/elite-longterm-memory/tree/HEAD/SKILL.md

## When to use it
- keep task context alive across session compaction
- find an earlier decision by meaning instead of exact wording
- record a tech choice in the decision graph tied to a branch
- merge daily logs and a distilled summary into one readable file
- sync memory across devices

## Example prompts
- write to SESSION-STATE.md that we're moving to React, then continue
- search memory for what we decided about the database schema
- store this as a decision in git-notes

## Similar
- [memory-lancedb-pro](https://affpapa.org/en/nevibecode/skills/memory-lancedb-pro.md) — skill · 643 installs
- [memory-hygiene](https://affpapa.org/en/nevibecode/skills/aaaaqwq-memory-hygiene.md) — skill · 374 installs
- [V3 Memory Unification](https://affpapa.org/en/nevibecode/skills/v3-memory-unification.md) — skill · 1100 installs
- [convex-agent](https://affpapa.org/en/nevibecode/skills/convex-agent.md) — skill · 35900 installs
- [deep-agents-memory](https://affpapa.org/en/nevibecode/skills/deep-agents-memory.md) — skill · 19000 installs
- [memory-md-management](https://affpapa.org/en/nevibecode/skills/memory-md-management.md) — skill · 3500 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
