Neo4j Knowledge Graph skill
An agent skill that builds a Neo4j knowledge graph from CSV and Excel, writes safe Cypher and adds GraphRAG vector search.
- 581 ★ on the repository
- Last commit
- MIT
Extended access
Why this level
- The skill writes data into a Neo4j database, and MERGE queries and destructive commands can change an existing graph.
- The profiling script reads local Excel and CSV tables.
Install
- Works in
In your terminal, with SkillFoxx CLI
npx skillfoxx add skills/neo4j-knowledge-graphDetects the agents on your machine, shows the access level and pins the version.
Other ways to install
Access and checks
How we reviewExtended accessThe tool runs code or makes network calls and only reads external data.
- The skill writes data into a Neo4j database, and MERGE queries and destructive commands can change an existing graph.
- The profiling script reads local Excel and CSV tables.
This is third-party code. Review the repository files before installing.
What it does
The `neo4j-knowledge-graph` skill lives in a repository with an "Excel to Neo4j" teaching example and walks an agent through six steps. First the agent identifies the data source (CSV, Excel, DataFrame, database export, API or an existing graph), the goal (import, modeling, queries, migration, visualization, GraphRAG) and the Neo4j target: local, Aura, legacy 3.x or 5 and newer. Before modeling, the agent profiles the table with `scripts/profile_table.py`: columns, sample values, blanks, likely identifiers and repeats. Node labels come from nouns (Invoice, Person, Company), relationships are named with verbs like ISSUED_BY, and relationship properties hold roles, timestamps and confidence. Import uses parameterized MERGE with UNWIND, uniqueness constraints are created before loading, and destructive commands need an explicit request and a confirmed target. For new projects the skill recommends the official `neo4j` driver and keeps `py2neo` only for maintaining code on Neo4j 3.x. It adds vector search and GraphRAG when semantic retrieval is needed: it builds `search_text` from graph facts and creates a vector index. Verification runs on a small sample, and the report includes node and relationship counts, constraints and index status.
Who it is for. Data analysts and developers moving Excel and CSV tables into a Neo4j knowledge graph, or maintaining old py2neo code and wanting to move to the modern driver.
Good fit when
- Invoices from Excel must be broken into nodes and relationships and loaded into Neo4j.
- A table has to be profiled first to choose identifiers and labels.
- Code on py2neo v3 and Neo4j 3.x needs migrating to the official driver.
- A graph needs semantic search: a vector index and GraphRAG queries.
- You want to show a user ready Cypher queries that run in Neo4j Browser.
Not a fit when
- The data is already in a well-modeled Neo4j database: the skill is built for creating a graph from tables.
- You want an agent that queries your database over MCP: look to Neo4j MCP servers for that.
- You need a ready production system: the repository remains a teaching example with legacy dependencies.
Example request
Take Invoice_data_Demo.xls, profile the table and propose a Neo4j graph model with Cypher for a safe load.Limitations
The main example in the repository is intentionally dated: Python 3.6.5, Windows 10, Neo4j 3.x, py2neo 3. The pinned dependencies in `requirements.txt` are legacy, and the author tracks modernization separately.
To run `invoice_neo4j.py` you must replace the path in `os.chdir` and the `Graph(...)` connection parameters in `DataToNeo4jClass.py`.
Local embeddings in the modern example are deterministic and good only for demos and CI. Production search needs `neo4j-graphrag` or a real embedding provider.
How to disable. Delete the `skills/neo4j-knowledge-graph` folder from the agent's skills directory or the repository clone.
FAQ
How do I connect the skill?
Clone the repository and put the `skills/neo4j-knowledge-graph` folder into the agent's skills directory. The folder also carries `agents/openai.yaml` for Codex.
Is py2neo required?
Not for new projects: the skill recommends the official `neo4j` driver. py2neo stays for maintaining old code on Neo4j 3.x.
What does profile_table.py do?
It shows table columns, sample values, blank counts, likely identifiers and repeated values so labels and keys are chosen before any Cypher is written.
How do I try the modern example without keys?
Run `python -m examples.modern_invoice_graphrag.app --input examples/modern_invoice_graphrag/sample_invoice_rows.csv --limit 2 dry-run`. The example uses local deterministic embeddings.
When should I add GraphRAG?
When you need semantic or fuzzy search, natural-language answers or RAG. Plain Cypher is enough for simple key lookups.
Discussion
No questions or reviews yet.
Related
SkillsNeo4j skills for agents: Cypher queries, graph modeling, drivers, import, GraphRAG, GDS and Aura provisioning
With Graph Engineering, an agent designs a knowledge graph, checks relationships and prepares data for source-based retrieval.
KGLite keeps a knowledge graph in one file, and its bundled MCP server gives agents Cypher queries with no separate database.
A CLI and MCP server that extracts structured knowledge from documents: graphs, hypergraphs, and fact search with sources
A Neo4j MCP server and skill: the agent runs Graph Data Science algorithms on a graph, from centrality to embeddings
A Neon skill with Postgres 14 to 18 guidance: schema design, indexes, query tuning, migrations and common pitfalls.
README in short
The README describes the teaching project that moves Excel data into Neo4j through py2neo v3, the maintenance status as of 2026-06, a modern example on the official driver with a vector index, a section on the open-source skill, the original environment's compatibility and a quick start with a warning to edit paths.
README badge
Original SKILL.md
--- name: neo4j-knowledge-graph description: Use when designing, importing, querying, or modernizing Neo4j knowledge graphs from CSV, Excel, pandas, Cypher, py2neo, the official neo4j Python driver, vector indexes, or GraphRAG workflows. --- # Neo4j Knowledge Graph ## Overview Use this skill to turn tabular or semi-structured data into a Neo4j knowledge graph, then choose the right path: legacy py2neo compatibility, modern official-driver Cypher, or GraphRAG/vector search. ## Workflow 1. **Frame the graph task** - Identify the source data: CSV, Excel, pandas DataFrame, database export, API data, or existing Neo4j graph. - Ask what the user wants to do: import, model, query, migrate, visualize, or add GraphRAG. - Confirm Neo4j target: local Neo4j, Aura, legacy Neo4j 3.x, Neo4j 5+, or unknown. 2. **Profile data before modeling** - For CSV/Excel files, run `scripts/profile_table.py <path>` when local files are available. - Inspect columns, sample values, blank counts, likely identifiers, and repeated values. - Do not infer graph labels from one row only. 3. **Model the graph** - Use nouns for labels: `Invoice`, `Person`, `Company`, `Product`, `Location`. - Use verbs or role phrases for relationships: `ISSUED_BY`, `PAID_TO`, `HAS_PARTICIPANT`. - Choose stable IDs before writing Cypher. - Put frequently queried identifiers under uniqueness constraints. - Keep relationship properties for roles, timestamps, source rows, and confidence. 4. **Generate safe Cypher** - Prefer parameterized `MERGE` + `UNWIND` for imports. - Create constraints before loading data. - Avoid destructive commands unless the user explicitly asks and the target is confirmed. - For modern projects, prefer the official `neo4j` Python driver. - Use py2neo only when maintaining legacy Neo4j 3.x / py2neo v3 code. 5. **Add GraphRAG only when useful** - Use vector search when users need semantic retrieval, fuzzy matching, natural-language search, or RAG. - Build a clear `search_text` from graph facts. - Create a Neo4j vector index on the embedding property. - Use deterministic embeddings only for demos/tests; use `neo4j-graphrag` or a real embedding provider for production. 6. **Verify** - Dry-run on a small sample before loading the full dataset.