Install
openclaw skills install neo4jWrite Cypher queries with proper patterns for merging, traversal, and performance.
openclaw skills install neo4jMERGE matches the FULL pattern—MERGE (a)-[:KNOWS]->(b) creates duplicates if relationship missingON CREATE SET and ON MATCH SET for conditional properties—without these, nothing updates on matchMERGE (n:User {id: $id}) with unique constraint on idEXPLAIN before production—look for "NodeByLabelScan" without filter pushdownCREATE FULLTEXT INDEX FOR (n:Post) ON EACH [n.title, n.body][*] explodes on connected graphs—always set upper bound [*1..5][*0..] includes start node—usually unintended, start from [*1..]shortestPath() returns one path only—use allShortestPaths() for all equally short paths[r:KNOWS* WHERE r.active] scans then filters—consider data model changeMATCH (a:User), (b:Product) returns rows × rowsPROFILE query shows "CartesianProduct" operator when it happensMATCH (a)--(b) WITH a loses bMATCH (u:User) WITH u.country AS c, count(*) AS nWITH n ORDER BY n.created SKIP 10 LIMIT 10OPTIONAL MATCH returns NULL for missing patterns—NULLs propagate through expressionsWHERE after OPTIONAL MATCH filters out NULLs—use COALESCE() to preserve rowscount(NULL) returns 0—useful: OPTIONAL MATCH (u)-[:REVIEWED]->(p) RETURN count(p)(a)-[:KNOWS]-(b) matches both ways(a)-[:OWNS]->(b), query (b)-[:OWNS]->(a) finds nothingCALL {} IN TRANSACTIONS OF 1000 ROWSUNWIND $list AS item CREATE (n:Node {id: item.id}) for batch insertsapoc.periodic.iterate() for complex batch logic with progressMATCH (n:Old) WITH n LIMIT 10000 DETACH DELETE n in loop$param not string concatenation—prevents Cypher injection{param: value} in driver, :param {param: value} in browserWHERE n.id IN $ids