Skip to content
Back to skills

Vector Memory

ASecurity

Smart memory search with automatic vector fallback. Uses semantic embeddings when available, falls back to built-in search otherwise. Zero configuration - works immediately after ClawHub install. No setup required - just install and memory_search works immediately, gets better after optional sync.

  • 10 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added May 30, 2026
ai-agentsjavascriptjavabashnode

Security analysis

A100/100

Pro scans all 15 files and shows the line behind each finding

Scanned May 30, 2026

npx -y skills add Demerzels-lab/elsamultiskillagent --skill vector-memory --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Vector Memory?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Vector Memory
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/demerzels-lab-vector-memory/badge)](https://www.skillsdirectory.com/skills/demerzels-lab-vector-memory)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: vector-memory
description: Smart memory search with automatic vector fallback. Uses semantic embeddings when available, falls back to built-in search otherwise. Zero configuration - works immediately after ClawHub install. No setup required - just install and memory_search works immediately, gets better after optional sync.
---

# Vector Memory

Smart memory search that **automatically selects the best method**:
- **Vector search** (semantic, high quality) when synced
- **Built-in search** (keyword, fast) as fallback

**Zero configuration required.** Works immediately after install.

## Quick Start

### Install from ClawHub
```bash
npx clawhub install vector-memory
```

Done! `memory_search` now works with automatic method selection.

### Optional: Sync for Better Results
```bash
node vector-memory/smart_memory.js --sync
```

After sync, searches use neural embeddings for semantic understanding.

## How It Works

### Smart Selection
```javascript
// Same call, automatic best method
memory_search("James principles values") 

// If vector ready: finds "autonomy, competence, creation" (semantic match)
// If not ready: uses keyword search (fallback)
```

### Behavior Flow
1. **Check**: Is vector index ready?
2. **Yes**: Use semantic search (synonyms, concepts)
3. **No**: Use built-in search (keywords)
4. **Vector fails**: Automatically fall back

## Tools

### memory_search
**Auto-selects best method**

Parameters:
- `query` (string): Search query
- `max_results` (number): Max results (default: 5)

Returns: Matches with path, lines, score, snippet

### memory_get
Get full content from file.

### memory_sync
Index memory files for vector search. Run after edits.

### memory_status
Check which method is active.

## Comparison

| Feature | Built-in | Vector | Smart Wrapper |
|---------|----------|--------|---------------|
| Synonyms | ❌ | ✅ | ✅ (when ready) |
| Setup | Built-in | Requires sync | ✅ Zero config |
| Fallback | N/A | Manual | ✅ Automatic |

## Usage

**Immediate (no action needed):**
```bash
node vector-memory/smart_memory.js --search "query"
```

**Better quality (after sync):**
```bash
# One-time setup
node vector-memory/smart_memory.js --sync

# Now all searches use vector
node vector-memory/smart_memory.js --search "query"
```

## Files

| File | Purpose |
|------|---------|
| `smart_memory.js` | Main entry - auto-selects method |
| `vector_memory_local.js` | Vector implementation |
| `memory.js` | OpenClaw wrapper |

## Configuration

**None required.** 

Optional environment variables:
```bash
export MEMORY_DIR=/path/to/memory
export MEMORY_FILE=/path/to/MEMORY.md
```

## Scaling

- **< 1000 chunks**: Built-in + JSON (current)
- **> 1000 chunks**: Use pgvector (see references/pgvector.md)

## References

- [Integration](references/integration.md) - Detailed setup
- [pgvector](references/pgvector.md) - Large-scale deployment

Files in this skill

  • AGENTS.md2.3 KB
  • CHANGELOG.md1.2 KB
  • MEMORY_STRUCTURE.md2.3 KB
  • README.md5.6 KB
  • SKILL.md2.8 KB
  • _meta.json305 B
  • install.sh2.3 KB
  • skills/vector-memory/README.md5.3 KB
  • skills/vector-memory/skill.json2.2 KB
  • vector-memory/memory.js4.2 KB
  • vector-memory/package.json254 B
  • vector-memory/references/integration.md3 KB
  • vector-memory/references/pgvector.md1.1 KB
  • vector-memory/smart_memory.js8.9 KB
  • vector-memory/vector_memory_local.js8.9 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.