falkordb
БесплатноБез исполняемых скриптовНе проверенFalkorDB is a graph database that runs as a Redis module and answers openCypher queries. Use it to store knowledge graphs, agent memory or connected data and…
от TerminalSkills★ 221 звезда на GitHubОб этом скилле
FalkorDB — a Redis-module graph database with Cypher and vector search
Overview
FalkorDB stores property graphs inside Redis and executes openCypher queries with sparse-matrix algebra. Because it is a Redis module, any Redis client can talk to it: graph commands are GRAPH.QUERY, GRAPH.RO_QUERY, GRAPH.EXPLAIN, GRAPH.LIST and GRAPH.DELETE. Each graph is a separate Redis key, so one server holds many isolated graphs (one per tenant, per agent, per project).
It also supports range, full-text and vector indexes on node and edge properties, which makes it a fit for GraphRAG: embeddings and the entity graph live in the same store and the same query.
This skill was run against falkordb/falkordb:v4.22.3 (the 4.22 line) and the PyPI falkordb client 1.8.1. A newer 6.0.x line is published and the latest tag now points to it; it was not tested here, so keep the pinned tag until you have checked your queries against the newer one.
Instructions
Run the server
Pin the image tag and bind to localhost; the server has no password by default.
docker run -d --name falkordb -p 127.0.0.1:6379:6379 -v falkordb-data:/var/lib/falkordb/data falkordb/falkordb:v4.22.3
Use another host port (-p 127.0.0.1:6390:6379) if 6379 is taken. The image ships a redis-cli:
docker exec falkordb redis-cli PING
docker exec falkordb redis-cli MODULE LIST
MODULE LIST shows the module named graph. The falkordb/falkordb image is the only thing you need; Redis and the module are inside it.
Write and read with redis-cli
The graph is created by the first write that names it.
docker exec falkordb redis-cli GRAPH.QUERY supply "CREATE (:Supplier {name:'Baltic Steel', country:'EE'})-[:SHIPS_TO {days:3}]->(:Warehouse {name:'Rotterdam-1'})"
docker exec falkordb redis-cli GRAPH.QUERY supply "MATCH (s:Supplier)-[r:SHIPS_TO]->(w:Warehouse) RETURN s.name, r.days, w.name"
docker exec falkordb redis-cli GRAPH.LIST
docker exec falkordb redis-cli GRAPH.EXPLAIN supply "MATCH (s:Supplier) WHERE s.name = 'Baltic Steel' RETURN s"
The reply lists the header row, the data rows and statistics (nodes created, execution time). GRAPH.RO_QUERY is the same for read-only queries and is safe to send to replicas. GRAPH.DELETE <graph> drops a whole graph.
Python client
pip install falkordb
from falkordb import FalkorDB
db = FalkorDB(host="127.0.0.1", port=6379) # password=... if the server requires one
g = db.select_graph("supply") # lazy: the graph exists after the first write
g.query(
"MERGE (s:Supplier {name: $name}) SET s.country = $country",
{"name": "Baltic Steel", "country": "EE"},
)
res = g.ro_query("MATCH (s:Supplier {country: $c}) RETURN s.name", {"c": "EE"})
for row in res.result_set: # list of rows, each a list of column values
print(row[0])
print(res.header, res.run_time_ms)
print(db.list_graphs())
Always pass values as the parameter dict ($name), never format them into the query string: it avoids injection and lets the server cache the query plan. Nodes and edges come back as objects with .labels, .properties and .id when you RETURN s instead of properties.
Indexes
g.query("CREATE INDEX FOR (s:Supplier) ON (s.name)") # range index, speeds up lookups and MERGE
g.create_node_range_index("Warehouse", "name") # same thing through the client
print(g.query("CALL db.indexes()").result_set)
Vector search for GraphRAG
Create a vector index with a fixed dimension, store vectors with vecf32(...), and search with db.idx.vector.queryNodes.
g = db.select_graph("kb")
g.query("CREATE VECTOR INDEX FOR (c:Chunk) ON (c.embedding) OPTIONS {dimension: 4, similarityFunction: 'cosine'}")
g.query(
"CREATE (:Chunk {id: $id, text: $text, embedding: vecf32($vec)})",
{"id": "c1", "text": "Baltic Steel supplies the Rotterdam warehouse", "vec": [0.1, 0.2, 0.3, 0.4]},
)
hits = g.ro_query(
"CALL db.idx.vector.queryNodes('Chunk', 'embedding', 5, vecf32($q)) "
"YIELD node, score RETURN node.id, node.text, score",
{"q": [0.1, 0.2, 0.3, 0.35]},
).result_set
The dimension must equal your embedding model's output size (for example 1536 for OpenAI text-embedding-3-small). With cosine the returned score is a distance: smaller means closer, so the best match has a score near 0. Combine the search with traversal by chaining a MATCH after the YIELD, for instance MATCH (node)-[:MENTIONS]->(e:Entity) RETURN e.name.
Housekeeping
- Remove a graph:
g.delete()in Python orGRAPH.DELETE name. - Persistence follows Redis persistence; the volume at
/var/lib/falkordb/datakeeps the data across container restarts. - Stop and clean up a test server with
docker rm -fv falkordb.
Examples
Example 1: a small supply-chain graph
Request: "Start FalkorDB locally and model that Baltic Steel ships to the Rotterdam-1 warehouse in 3 days;
Установить falkordb в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл falkordb?
FalkorDB is a graph database that runs as a Redis module and answers openCypher queries. Use it to store knowledge graphs, agent memory or connected data and to run vector similarity search next to graph traversal. Trigger phrases - "run FalkorDB", "GRAPH.QUERY", "store a knowledge graph in FalkorDB", "falkordb Python client", "vector index on graph nodes", "graph database on Redis", "Cypher in Docker".
Как установить скилл falkordb?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл falkordb запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic