slm-build-graph

Build and optimize a knowledge graph from memories using TF-IDF and Leiden clustering.

206|34|Updated Feb 5, 2026
One-click install
npx skills add https://github.com/qualixar/superlocalmemory --skill slm-build-graph
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: slm-build-graph
Source: https://github.com/qualixar/superlocalmemory/tree/main/ide/skills/slm-build-graph
Command: npx skills add https://github.com/qualixar/superlocalmemory --skill slm-build-graph

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Build and maintain a knowledge graph from your memories to improve search relevance and reveal hidden connections.

Core Features & Use Cases

  • Extracts memory entities with TF-IDF to create graph nodes
  • Discovers relationships between memories via shared entities and similarity
  • Optional topic clustering using Leiden algorithm to form semantic clusters

Quick Start

Execute slm build-graph to create or refresh your knowledge graph from the current memories.

Frequently Asked Questions about slm-build-graph

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a knowledge graph from imported memories to improve search quality?

Build a knowledge graph from memories by extracting entities with TF-IDF and discovering relationships via Leiden clustering to improve search quality. Run the build command to create or refresh graph nodes from existing memory data.

When should I rebuild my memory knowledge graph?

Rebuild your memory knowledge graph when search quality is weak, after bulk memory imports, or to improve performance in memory-rich environments. Refreshing the graph updates entity nodes and semantic clusters for better retrieval accuracy.

Do I need python-igraph and leidenalg installed to extract memory entities?

You need python-igraph and leidenalg as optional dependencies to enable Leiden clustering for semantic topic grouping. Core entity extraction with TF-IDF and memory relationship discovery function without these libraries on SuperLocalMemory V3.

How does TF-IDF entity extraction work for memory search optimization?

TF-IDF entity extraction identifies significant terms across memories to create graph nodes for memory search optimization. Shared entities and similarity metrics then link these nodes, revealing hidden connections that enhance retrieval relevance.

What is the best way to cluster memories into semantic topics using a knowledge graph?

Cluster memories into semantic topics using the Leiden algorithm on a knowledge graph built from shared entities. This optional clustering groups related memories into distinct communities, improving navigability and contextual search performance.