
Memory Management
- 96 installs
- 67k repo stars
- Updated August 4, 2026
- ruvnet/claude-flow
This is a copy of memory-management by ruvnet - installs and ranking accrue to the original listing.
Helps with ai & agent building tasks during AI-assisted development.
About
memory-management is a Claude Code skill for ai & agent building. It helps solo builders move faster with AI-assisted coding.
- memory-management
- AI & Agent Building
- AI-coding skill
Memory Management by the numbers
- 96 all-time installs (skills.sh)
- Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/ruvnet/claude-flow --skill memory-managementAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 96 |
|---|---|
| repo stars | ★ 67k |
| Last updated | August 4, 2026 |
| Repository | ruvnet/claude-flow ↗ |
What it does
Helps with ai & agent building tasks during AI-assisted development.
Files
Memory Management Skill
Purpose
AgentDB memory system with HNSW vector search. Provides 150x-12,500x faster pattern retrieval, persistent storage, and semantic search capabilities for learning and knowledge management.
When to Trigger
- need to store successful patterns
- searching for similar solutions
- semantic lookup of past work
- learning from previous tasks
- sharing knowledge between agents
- building knowledge base
When to Skip
- no learning needed
- ephemeral one-off tasks
- external data sources available
- read-only exploration
Commands
Store Pattern
Store a pattern or knowledge item in memory
npx @claude-flow/cli memory store --key "[key]" --value "[value]" --namespace patternsExample:
npx @claude-flow/cli memory store --key "auth-jwt-pattern" --value "JWT validation with refresh tokens" --namespace patternsSemantic Search
Search memory using semantic similarity
npx @claude-flow/cli memory search --query "[search terms]" --limit 10Example:
npx @claude-flow/cli memory search --query "authentication best practices" --limit 5Retrieve Entry
Retrieve a specific memory entry by key
npx @claude-flow/cli memory get --key "[key]" --namespace [namespace]Example:
npx @claude-flow/cli memory get --key "auth-jwt-pattern" --namespace patternsList Entries
List all entries in a namespace
npx @claude-flow/cli memory list --namespace [namespace]Example:
npx @claude-flow/cli memory list --namespace patterns --limit 20Delete Entry
Delete a memory entry
npx @claude-flow/cli memory delete --key "[key]" --namespace [namespace]Initialize HNSW Index
Initialize HNSW vector search index
npx @claude-flow/cli memory init --enable-hnswMemory Stats
Show memory usage statistics
npx @claude-flow/cli memory statsExport Memory
Export memory to JSON
npx @claude-flow/cli memory export --output memory-backup.jsonScripts
| Script | Path | Description |
|---|---|---|
memory-backup | .agents/scripts/memory-backup.sh | Backup memory to external storage |
memory-consolidate | .agents/scripts/memory-consolidate.sh | Consolidate and optimize memory |
References
| Document | Path | Description |
|---|---|---|
HNSW Guide | docs/hnsw.md | HNSW vector search configuration |
Memory Schema | docs/memory-schema.md | Memory namespace and schema reference |
Best Practices
1. Check memory for existing patterns before starting 2. Use hierarchical topology for coordination 3. Store successful patterns after completion 4. Document any new learnings
#!/bin/bash
# Memory Management - Backup Script
# Export memory to backup file
set -e
BACKUP_DIR="${BACKUP_DIR:-./.backups}"
TIMESTAMP=$(date +%Y%m%d_%H%M%S)
BACKUP_FILE="${BACKUP_DIR}/memory_${TIMESTAMP}.json"
mkdir -p "$BACKUP_DIR"
echo "Backing up memory to $BACKUP_FILE..."
npx @claude-flow/cli memory export --output "$BACKUP_FILE"
echo "Backup complete: $BACKUP_FILE"
#!/bin/bash
# Memory Management - Consolidate Script
# Optimize and consolidate memory
set -e
echo "Running memory consolidation..."
npx @claude-flow/cli hooks worker dispatch --trigger consolidate
echo "Memory consolidation complete"
npx @claude-flow/cli memory stats