Agent skill

AgentDB Pattern Memory

by ruvnet in ruvnet/ruflo

Stores, searches, and retrieves successful patterns with HNSW-indexed semantic search so agents can reuse past solutions instead of relearning them.

MITAuto-check passedAI & LLM Engineering

Install AgentDB Pattern Memory

skills CLI
$ npx skills add ruvnet/ruflo --skill memory-management -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ruvnet/ruflo memory-management --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ruvnet/ruflo.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/memory-management .claude/skills/memory-management && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
memory-management
GitHub stars
74k
Used in
2 other repos
Token cost
~830 tokens
SKILL.md length
198 words
Files
3 (incl. scripts)
Skills in repo
264
Repo updated
First seen
Licence
MIT

At a glance

Stores, searches, and retrieves successful patterns with HNSW-indexed semantic search so agents can reuse past solutions instead of relearning them.

  • Works in 4 steps: Check memory for existing patterns… → Use hierarchical topology for coordination → Store successful patterns after completion → …
  • Storing a successful pattern or solution for later reuse
  • SKILL.md covers Purpose, When to Trigger, When to Skip and Commands, plus 3 more sections
  • Runs Shell scripts from its folder; calls npx

What it does

This skill wraps a CLI for storing a pattern under a key and namespace, running a semantic search by query, retrieving or listing entries, deleting an entry, and initializing the HNSW vector index; it also reports usage statistics and exports the whole memory store to JSON.

It ships backup and consolidate shell scripts for external backup and for optimizing the stored memory, plus a bundled HNSW configuration guide. It is meant to be skipped for ephemeral one-off tasks, read-only exploration, or whenever an external data source already covers what's needed.

When your agent uses it

  • Storing a successful pattern or solution for later reuse
  • Searching past work semantically instead of by exact key
  • Sharing learned knowledge between multiple agents

Example prompts

  • “Store this JWT auth pattern in memory under the patterns namespace.”
  • “Search memory for anything about authentication best practices.”
  • “Export all stored memory patterns to a backup JSON file.”

Requirements

  • Node.js for the bundled CLI package

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  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

What it can do on your machine

Read from SKILL.md and the folder at commit de590e1. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 2 files in scripts/ (Shell), which the agent can run.

    Shell commands in SKILL.md call:

    • npx

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use npx, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

AgentDB Pattern Memory loads about 830 tokens when it runs. Until then it costs about 128 tokens; SKILL.md has 198 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~128
When it runs · the whole SKILL.md, loaded when a task matches
~830

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from ruvnet/ruflo at commit de590e1, republished under its MIT licence (© ruvnet). 198 words, ~830 tokens.

Download SKILL.mdSave it as .claude/skills/memory-management/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
memory-management
description
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. Use when: 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. Skip when: no learning needed, ephemeral one-off tasks, external data sources available, read-only exploration.

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

bash
npx @claude-flow/cli memory store --key "[key]" --value "[value]" --namespace patterns

Example:

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

Search memory using semantic similarity

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

Example:

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

Retrieve a specific memory entry by key

bash
npx @claude-flow/cli memory get --key "[key]" --namespace [namespace]

Example:

bash
npx @claude-flow/cli memory get --key "auth-jwt-pattern" --namespace patterns
List Entries

List all entries in a namespace

bash
npx @claude-flow/cli memory list --namespace [namespace]

Example:

bash
npx @claude-flow/cli memory list --namespace patterns --limit 20
Delete Entry

Delete a memory entry

bash
npx @claude-flow/cli memory delete --key "[key]" --namespace [namespace]
Initialize HNSW Index

Initialize HNSW vector search index

bash
npx @claude-flow/cli memory init --enable-hnsw
Memory Stats

Show memory usage statistics

bash
npx @claude-flow/cli memory stats
Export Memory

Export memory to JSON

bash
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

© ruvnet, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (scripts) in .agents/skills/memory-management of ruvnet/ruflo.

  • SKILL.md
  • scripts/memory-backup.sh
  • scripts/memory-consolidate.sh

Open the folder on GitHubat commit de590e1

Used in 2 other repositories

We found 2 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 2 other GitHub owners. This page covers the copy in ruvnet/ruflo, which our catalogue first saw on October 7, 2026.

Compare with similar skills

AgentDB Pattern Memory next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

AgentDB Pattern Memory compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
AgentDB Pattern Memory this skillruvnet/ruflo74k2 repos~830Automated safety check: PassMIT
Hermes Memory Providersmnemosyne-oss/mnemosyne3.4k—~1.8kAutomated safety check: PassMIT
Memoryharperreed/dotfiles334—~484Automated safety check: PassNone
Neo4j Graphrag Skillneo4j-contrib/neo4j-skills114—~4.2kAutomated safety check: NotesMIT
Cognee Community Packagestopoteretes/cognee32k—~1.2kAutomated safety check: PassApache-2.0
Mem0 Bridgemomori777/Artemis377—~453Automated safety check: PassCustom licence

Similar skills

  • Hermes Memory Providers

    mnemosyne-oss/mnemosyne

    Install and configure Mnemosyne as a Hermes Agent memory provider — local SQLite with vector search, episodic consolidation, and temporal knowledge graphs.

    3.4k GitHub stars~1.8k tokensUpdated 3 days ago
    AI & LLM EngineeringAuto-check passed
  • Memory

    harperreed/dotfiles

    Semantic memory and context - store and retrieve information with embeddings for similarity search.

    334 GitHub stars~484 tokensUpdated 4 days ago
    AI & LLM EngineeringAuto-check passed
  • Neo4j Graphrag Skill

    neo4j-contrib/neo4j-skills

    Build GraphRAG retrieval pipelines on Neo4j using the neo4j-graphrag Python package (v1.22.0+).

    114 GitHub stars~4.2k tokensUpdated today
    Knowledge ManagementAuto-check: notes
  • Cognee Community Packages

    topoteretes/cognee

    Guide to using and contributing cognee community packages: database adapters, data-source connectors, custom tasks and retrievers, and Keywords AI observability.

    32k GitHub stars~1.2k tokensUpdated today
    DatabasesAuto-check passed
  • Mem0 Bridge

    momori777/Artemis

    Mem0 memory bridge for AI Girlfriend — search/read/write long-term memories from Qdrant vector DB.

    377 GitHub stars~453 tokensUpdated 6 days ago
    Media & CreativeAuto-check passed
  • Ogham Maintain

    ogham-mcp/ogham-mcp

    Admin and maintenance workflows for Ogham shared memory. An agent skill from ogham-mcp/ogham-mcp.

    115 GitHub stars~1.1k tokensUpdated 7 days ago
    Agent WorkflowsAuto-check passed

More from ruvnet/ruflo

All 264 skills in this repo
  • Runs claude-flow CLI security scans for input validation, path traversal, SQL injection, XSS, hardcoded secrets and known CVEs, and writes an audit report.

    74k GitHub starsUsed in 2 repos~823 tokens
    Auto-check passed
  • Applies the SPARC method (specification, pseudocode, architecture, refinement, completion) with 17 specialized modes and multi-agent orchestration, from research to deployment.

    74k GitHub starsUsed in 2 repos~829 tokens
    Auto-check passed
  • Coordinates a hierarchical swarm of specialized agents through the claude-flow CLI for work that spans several files or modules at once.

    74k GitHub starsUsed in 2 repos~779 tokens
    Auto-check passed
  • Sets up and drives Ruflo, an npm-installed orchestration layer for multi-agent swarms, persistent memory, routing, hooks and its MCP tool catalog.

    74k GitHub starsUsed in 1 repo~975 tokens
    Auto-check passed
  • Agent Coordination

    ruvnet/ruflo

    Reference for spawning, listing, monitoring and stopping agents with claude-flow commands, with agent type families, routing codes and coordination tips.

    74k GitHub starsUsed in 2 repos~519 tokens
    Auto-check passed
  • Claims

    ruvnet/ruflo

    Claims-based authorization for agents and operations. An agent skill from ruvnet/ruflo.

    74k GitHub starsUsed in 2 repos~1.1k tokens
    Auto-check passed

Questions about AgentDB Pattern Memory

What does AgentDB Pattern Memory do?

Stores, searches, and retrieves successful patterns with HNSW-indexed semantic search so agents can reuse past solutions instead of relearning them. This skill wraps a CLI for storing a pattern under a key and namespace, running a semantic search by query, retrieving or listing entries, deleting an entry, and initializing the HNSW vector index; it also reports usage statistics and exports the whole memory store to JSON.

When should I use AgentDB Pattern Memory?

AgentDB Pattern Memory fits situations like: storing a successful pattern or solution for later reuse; searching past work semantically instead of by exact key; sharing learned knowledge between multiple agents.

How do I install AgentDB Pattern Memory in Claude Code?

Run `npx skills add ruvnet/ruflo --skill memory-management -a claude-code`. Or copy the skill folder (.agents/skills/memory-management in ruvnet/ruflo) into .claude/skills/memory-management in your project. Claude Code loads it when a task matches its description.

How do I install AgentDB Pattern Memory in Codex?

Run `npx skills add ruvnet/ruflo --skill memory-management -a codex`. Or copy the skill folder (.agents/skills/memory-management in ruvnet/ruflo) into .agents/skills/memory-management in your project. Codex loads it when a task matches its description.

Can I use AgentDB Pattern Memory in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ruvnet/ruflo --skill memory-management -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/memory-management, .gemini/skills/memory-management, .github/skills/memory-management and .opencode/skills/memory-management in your project.

What does AgentDB Pattern Memory need to run?

Going by SKILL.md and its folder, AgentDB Pattern Memory needs a shell for the scripts in its folder and the command-line tools its instructions call (npx). Our summary lists: Node.js for the bundled CLI package.

Does AgentDB Pattern Memory access the network?

SKILL.md contains no URLs. Its commands use npx, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is AgentDB Pattern Memory safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does AgentDB Pattern Memory use?

AgentDB Pattern Memory is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does AgentDB Pattern Memory use?

About 830 tokens (SKILL.md is roughly 3.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to AgentDB Pattern Memory?

Skills that share tags, products or a category with AgentDB Pattern Memory: Hermes Memory Providers (mnemosyne-oss/mnemosyne, 3.4k stars), Memory (harperreed/dotfiles, 334 stars), Neo4j Graphrag Skill (neo4j-contrib/neo4j-skills, 114 stars) and Cognee Community Packages (topoteretes/cognee, 32k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains AgentDB Pattern Memory?

ruvnet (a GitHub user) maintains it in ruvnet/ruflo, which has 74,012 GitHub stars. The repository holds 264 skills in this directory. The repository was last updated on October 7, 2026.

Source: ruvnet/ruflo on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.