New to Claude Skills? Learn how to install them →

ruvnet on GitHub

Memory Management

Free

Enhance learning and knowledge sharing with persistent memory.

by ruvnet67.6k stars on ruvnet/ruflo
2 views
Updated Aug 10, 2026
Get this skill

Free · Opens the source repo

What Memory Management does

The Memory Management skill provides an advanced memory system for agents, utilizing HNSW vector search to offer rapid pattern retrieval and semantic search capabilities. With performance improvements ranging from 150x to 12,500x faster than traditional methods, this skill is designed for developers and designers who need to store, retrieve, and manage knowledge effectively. It allows users to create a persistent storage solution that can significantly enhance learning from past experiences and streamline knowledge sharing between agents.

This skill is particularly useful in scenarios where successful patterns or solutions need to be documented and accessed later. By enabling semantic lookups, users can easily find relevant information based on context rather than exact matches, making it ideal for tasks that require learning from previous work or sharing insights across multiple agents. The ability to store, retrieve, and manage knowledge efficiently can lead to improved productivity and better decision-making.

The commands available within this skill allow users to store patterns, perform semantic searches, retrieve specific entries, list all memory items, and delete entries as needed. Additionally, users can back up their memory, optimize it, and even export it for external use. This comprehensive set of features ensures that users can maintain an organized and efficient knowledge management system tailored to their needs.

While the Memory Management skill is powerful, it is best suited for environments where ongoing learning and knowledge retention are essential. If your tasks are one-off or do not require a learning component, this skill may not be necessary. However, for those looking to build a knowledge base or enhance their agents' capabilities through shared learning, this skill is an invaluable addition.

When to use it

Use this skill when you need to store successful patterns, conduct semantic searches, or manage knowledge over time.

When not to use it

Skip this skill for ephemeral tasks or when external data sources suffice for your needs.

What you can build with it

Storing Successful Patterns

Use the skill to document successful coding patterns or solutions for future reference.

Semantic Lookup for Best Practices

Conduct semantic searches to find relevant best practices from past projects quickly.

Knowledge Sharing Between Agents

Facilitate knowledge sharing by storing and retrieving insights that can be accessed by multiple agents.

How to install Memory Management

View source

1. Install with the skills CLI

npx skills add ruvnet/ruflo/memory-management --agent claude-code

2. Or install it manually

Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.

Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs

Inside SKILL.md

Written by ruvnet

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 patterns

Example:

npx @claude-flow/cli memory store --key "auth-jwt-pattern" --value "JWT validation with refresh tokens" --namespace patterns

Semantic Search

Search memory using semantic similarity

npx @claude-flow/cli memory search --query "[search terms]" --limit 10

Example:

npx @claude-flow/cli memory search --query "authentication best practices" --limit 5

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

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

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

Memory Stats

Show memory usage statistics

npx @claude-flow/cli memory stats

Export Memory

Export memory to JSON

npx @claude-flow/cli memory export --output memory-backup.json

Scripts

ScriptPathDescription
memory-backup.agents/scripts/memory-backup.shBackup memory to external storage
memory-consolidate.agents/scripts/memory-consolidate.shConsolidate and optimize memory

References

DocumentPathDescription
HNSW Guidedocs/hnsw.mdHNSW vector search configuration
Memory Schemadocs/memory-schema.mdMemory 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

Frequently asked questions about Memory Management

Similar skills