# mem

A skill that gives your agent a local SQLite memory: it saves decisions, facts and snippets, then finds them again in later sessions.

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

## What it does

\`mem` is a CLI wrapper around a database file at `~/.mem/mem.db`. Three operators drive it: no prefix means recall, `+` writes a memory, `-` removes one. Recall covers full-text search, tag filtering, a result limit, and `--json` when you want to parse the output in a script.

Short strings go in as arguments. For anything long, pipe it: `echo "long content" | mem + --tag notes`. A memory can also carry an image through `--image`, which is handy for screenshots. Deletion works by ID, several at once if you list them, and piping through `jq` and `xargs` clears a batch of old entries in one go.

The author's advice: keep tags lowercase and descriptive, and store one idea per memory so search stays useful. Check what is already stored before asking the user for it. Since the database sits in your home directory, moving to another machine carries your memory only if you bring `~/.mem/mem.db` along.

## Install

### Claude Code (native platform)

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

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

### Codex

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

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

### Cursor

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

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

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install runablehq/memory skill
```

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

### Gemini CLI

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

2. **Platform CLI**
```bash
gemini skills install https://github.com/runablehq/memory --path skill
```

### Windsurf (Devin Desktop)

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

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add runablehq/memory --skill skill -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/runablehq/memory/tree/HEAD/skill/SKILL.md

## When to use it
- recall an architecture decision from an earlier session
- save a deploy command and find it later
- record user preferences so the agent stops asking
- attach a UI screenshot to a note
- delete a batch of stale memories by ID

## Example prompts
- Search memory for everything tagged `deploy` and show the full text
- Remember this: we picked SQLite for simplicity, tag `architecture`
- Forget memories `id1` and `id2`

## Similar
- [context-mem](https://affpapa.org/en/nevibecode/mcp/context-mem.md) — MCP server · ★ 19
- [parallel-memory](https://affpapa.org/en/nevibecode/skills/parallel-memory.md) — skill · 2300 installs
- [mem-search](https://affpapa.org/en/nevibecode/skills/mem-search.md) — skill · 8900 installs
- [mem-forever](https://affpapa.org/en/nevibecode/plugins/mem-forever.md) — plugin · ★ 20
- [db-mcp (SQLite MCP Server)](https://affpapa.org/en/nevibecode/mcp/db-mcp-sqlite-mcp-server.md) — MCP server · ★ 13
- [deja-search](https://affpapa.org/en/nevibecode/skills/deja-search.md) — skill · ★ 1317

---
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
