/unreal-skills:neo4jfrom Unreal Harness Skills
Projects Unreal Engine assets (Blueprints, StateTrees, materials, Niagara) into a Neo4j graph database for querying topology with Cypher. Useful for cross-asset analysis and execution tracing.
Ships in Unreal Harness Skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Make an Unreal project queryable as a graph. Blueprints, StateTrees, materials, Niagara systems — they're all visual programs: nodes wired to nodes. Reading them one asset at a time (open the editor, trace the wires by eye) doesn't scale and doesn't answer cross-cutting questions. Loading their topology into Neo4j turns "trace this execution chain", "who calls this function", "what feeds this pin", "which trees share this task" into one-line Cypher queries.
This skill is the doctrine for doing that in this harness, generically. It reads through the harness's own canonical MCP read tools and derives what to ingest from the live project — it bakes in no specific game's assets, paths, password, or schema.
A runnable, generic ingester ships with the harness: ${CLAUDE_SKILL_DIR}/tool/ (wrapped by
${CLAUDE_SKILL_DIR}/neo4j.{ps1,sh}). It implements everything below — discover from the live
project, read via the canonical MCP tools, shape any asset's JSON into a graph, and
load idempotently with indexes. Prefer it over hand-rolling an ingest; reach for the
doctrine when extending it (new asset type, curated schema) or when a project already
has its own pipeline. Quick start:
${CLAUDE_SKILL_DIR}/neo4j.ps1 discover # what exists + reader coverage
${CLAUDE_SKILL_DIR}/neo4j.ps1 ingest --class StateTree # graph all StateTrees (additive)
${CLAUDE_SKILL_DIR}/neo4j.ps1 ingest --dir /Game/Foo/ --with-refs # a subtree + cross-asset edges
${CLAUDE_SKILL_DIR}/neo4j.ps1 query "MATCH (n) RETURN labels(n)[0], count(*)"
Follows the architecture-document doctrine (concepts, contracts, constraints — lead with the answer, be honest about status). Cypher templates and the schema below are contracts (stable shapes), so they belong here; anything project-specific is discovered at run time.
Neo4j is a read-only analysis projection of the live editor. The pipeline is a classic ETL with three stages, and the harness already owns the hard middle:
READ TRANSFORM LOAD
MCP read tools ▸ asset JSON → nodes ▸ MERGE into Neo4j
(statetree_read, + relationships + CREATE INDEX
bp_read, material_read…) (UE concept → label) (idempotent)
The graph is a projection, never a source of truth. You never mutate the project through Neo4j — mutation always goes back through the typed MCP tools. The graph is for questions, the MCP is for changes. This keeps the harness's "no escape hatches" contract intact: Neo4j is inspection, layered on top of the inspection tools.
Two consequences that drive every decision below:
MERGE keyed on a stable id, so
running the pipeline twice converges instead of duplicating. That's what makes
incremental, per-asset ingestion safe.Neo4j runs as a container; nothing about it is project-specific. Credentials and URI come from environment variables so no secret is ever hardcoded in a skill or repo.
# one-off container (data persists in a named volume)
docker run -d --name ue-neo4j \
-p 7474:7474 -p 7687:7687 \
-v ue-neo4j-data:/data \
-e NEO4J_AUTH="neo4j/${NEO4J_PASS:?set NEO4J_PASS}" \
neo4j:5
http://localhost:7474)cypher-shell connection)Connection settings every consumer should read from env (with sane local defaults):
| Var | Default | Meaning |
|---|---|---|
NEO4J_URI | bolt://localhost:7687 | Bolt endpoint |
NEO4J_USER | neo4j | username |
NEO4J_PASS | (required — no default) | password; never commit it |
Run Cypher from the shell without a driver:
docker exec ue-neo4j cypher-shell -u "$NEO4J_USER" -p "$NEO4J_PASS" --format plain "RETURN 1;"
If a project already runs its own Neo4j (its own container/compose, its own
credentials), use that — point NEO4J_URI/NEO4J_PASS at it rather than starting a
second instance on the same ports. Discover it (docker ps, the project's
docker-compose*.yml) before standing up your own.
These labels describe Unreal concepts, not any one game — they apply to every UE
project. Use id as the stable MERGE key on every node and put a range index on it.
Blueprints / graphs
| Node label | Represents | Key non-id props |
|---|---|---|
Blueprint | a Blueprint asset | path, name, parent_class |
Graph | an event graph / function graph | name, type |
GraphNode | a node in a graph | node_type, title |
Variable | a Blueprint variable | name, type |
Component | a component on the BP | name, class |
Function | a function/event | name |
Relationships: INHERITS_FROM (Blueprint→Class/Blueprint), HAS_VARIABLE,
HAS_COMPONENT, HAS_FUNCTION, HAS_GRAPH, CONTAINS_NODE (Graph→GraphNode),
EXEC (node→node, execution wire), DATA_FLOW (node→node, typed data wire).
StateTrees
| Node label | Represents |
|---|---|
StateTree | the tree asset |
STState | a state (name, type, selection_behavior, depth) |
STTask | a task on a state (type, plus prop_*) |
STTransition | a transition (trigger, target) |
STCondition | a guard condition (type, plus prop_*) |
Relationships: HAS_STATE, PARENT_STATE (hierarchy), HAS_TASK, HAS_TRANSITION,
TARGETS_STATE, TRANSITIONS_TO (convenience state→state), GUARDED_BY.
Materials, Niagara, data tables, anim assets extend the same pattern (one label per
concept, id-keyed, prop_* for leaf properties). Add labels as you ingest new asset
types — the schema is open, not fixed.
Preflight. Editor running + MCP bridge up (the harness server connected). If not,
start them (scripts/launch-editor, scripts/run-server) and wait for boot. Neo4j
reachable (cypher-shell … "RETURN 1"). Fail loudly if either is down — the read
tools and the loader both need their endpoint.
Discover the asset set from the LIVE project — don't hardcode it. This is the crux of staying generic. Use the harness's catalog/list tools to enumerate what actually exists:
asset_list (filter by path/class) to find Blueprints, StateTrees, materials, etc.catalog_search / catalog_domains to find the right read tool per asset type.
Let the user scope it ("all AI StateTrees", "the player Blueprint and its
dependencies", "everything under /Game/Foo"). Confirm the resolved list before a
large pull.Read each asset via its canonical MCP read tool. These return structured JSON — the transform input. The relevant readers in this harness:
statetree_read (+ statetree_state_list, statetree_node_get_properties)bp_read, bp_inspect, bp_list_graphs, bp_list_node_pins,
bp_get_variable_details, bp_get_function_detailsmaterial_read, material_read_instance, material_read_functionniagara_system_read, asset_datatable_read, class_inspect,
reflection_class_properties, the anim_* read tools
(Names are this harness's canonical surface. A project running a different MCP
server may expose different names — read its tool list; never assume.)Transform → nodes + relationships per the schema above. One node per concept,
id a deterministic key (e.g. <asset_path>#<local_id>), leaf values as prop_*.
Load with idempotent MERGE + ensure indexes. Always MERGE, never CREATE
blindly. Create the per-label id index once (cheap, IF NOT EXISTS):
CREATE INDEX IF NOT EXISTS FOR (n:StateTree) ON (n.id);
CREATE INDEX IF NOT EXISTS FOR (n:STState) ON (n.id);
// … one per label you ingest
UNWIND $nodes AS n
MERGE (x { id: n.id })
SET x += n.props
WITH x, n CALL apoc.create.addLabels(x, [n.label]) YIELD node RETURN count(*);
// (or generate one MERGE per label if APOC isn't installed)
UNWIND $rels AS r
MATCH (a { id: r.from }), (b { id: r.to })
MERGE (a)-[e:`%TYPE%` ]->(b); // %TYPE% templated per relationship type
Verify, don't trust the exit code. Count what you loaded and confirm indexes are ONLINE:
MATCH (n) RETURN labels(n)[0] AS label, count(*) ORDER BY label;
SHOW INDEXES YIELD labelsOrTypes, properties, state;
// Trace an execution chain out of an event node
MATCH p = (start:GraphNode {title:$event})-[:EXEC*1..20]->(end) RETURN p;
// Who reads a given variable (data-flow back to sources)
MATCH (v:Variable {name:$var})<-[:DATA_FLOW*1..10]-(consumer) RETURN DISTINCT consumer;
// Every state a StateTree can reach from its root
MATCH (t:StateTree {name:$tree})-[:HAS_STATE]->(:STState)-[:TRANSITIONS_TO*0..]->(s)
RETURN DISTINCT s.name;
// Tasks shared across more than one tree (refactor candidates)
MATCH (t:StateTree)-[:HAS_STATE]->(:STState)-[:HAS_TASK]->(k:STTask)
WITH k.type AS task, collect(DISTINCT t.name) AS trees
WHERE size(trees) > 1 RETURN task, trees;
// Blueprints inheriting from a base class
MATCH (b:Blueprint)-[:INHERITS_FROM*]->(c {name:$base}) RETURN b.name;
CREATE for re-ingestible data — always MERGE on id. Non-idempotent
loads duplicate nodes on the second run and silently corrupt counts.id before bulk MERGE. Without the index, MERGE does a full
scan per row and a large ingest crawls.CLEAR/DETACH DELETE the whole DB to add a few assets. Scope the
re-ingest to the assets you're refreshing (MERGE handles the overwrite). A full clear
is only for a deliberate from-scratch rebuild — confirm with the user first; it's
destructive to everything else already graphed.asset_list/catalog_search and let the user scope.NEO4J_PASS is never written into a skill, script, or
committed file. A project that ships its own Neo4j owns its own credentials — read
them, don't duplicate them.${CLAUDE_SKILL_DIR}/tool/ (Bun/TS, wrapped by
${CLAUDE_SKILL_DIR}/neo4j.{ps1,sh}) implementing the read→shape→load pipeline above. Validated
end-to-end against a live editor (resolved EXEC/DATA_* wires, CHILD_OF component
hierarchy, FEEDS_MATERIAL_INPUT, cross-asset REFERENCES).${CLAUDE_SKILL_DIR}/tool/src/ontology.ts) produce the curated schema
above for Blueprint, StateTree, Material — resolving cross-references into edges
and normalizing types (EStateTreeStateType::State → State), not just walking JSON.
MaterialInstanceConstant, NiagaraSystem, DataTable (+ *DataAsset) use the
generic walk (${CLAUDE_SKILL_DIR}/tool/src/shape.ts); other classes list as (no reader).Handler (multi-call read + typed
shape) to TYPED in ontology.ts; for a quick generic mapping, add a row to
readers.ts. Keep id-keyed MERGE + per-label indexes as the invariant.statetree_read vs read_state_tree etc.id-keyed MERGE and per-label indexes as the
invariant.neo4j.ps1 (opens in a new tab)neo4j.sh (opens in a new tab)tool/README.md (opens in a new tab)tool/bun.lock (opens in a new tab)tool/package.json (opens in a new tab)tool/src/cli.ts (opens in a new tab)tool/src/config.ts (opens in a new tab)tool/src/graph.ts (opens in a new tab)tool/src/mcp.ts (opens in a new tab)tool/src/ontology.ts (opens in a new tab)tool/src/readers.ts (opens in a new tab)tool/src/select.ts (opens in a new tab)tool/src/shape.ts (opens in a new tab)tool/tsconfig.json (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
neo4j, unreal-engine, blueprint-analysis, graph-database, game-development, cypher
Other plugins' skills for the same job
npx claudepluginhub oliver-io/unreal-harness --plugin unreal-skills22 skills in this plugin
/architectWrite or update an architecture document for an Unreal Engine system — a conceptual spec a senior engineer can build from. Use when someone wants to "document this system", "write an architecture doc", "spec a feature before building it", "describe how X works for the team", or "update the docs to match the code". Plan-only and code-free: it researches the live editor, Blueprints, and source, then writes a Design-level document about intent, boundaries, contracts, and invariants — no implementation, no builds, no editor mutation. Works in any UE project, not one studio's house style./automated-testerSet up an automated, agent-observed end-to-end test (or a guarded dev loop) for an Unreal feature in this harness. Use when someone wants to "add a test", "test this feature end-to-end", "verify X works in PIE", "build a verification harness", "guard this feature with a test", or "make a guardrail loop for an agent building X". Opinionated: the engine constructs the scenario via typed C++ primitives, the agent observes the behaviour it controls through a DIFFERENT read primitive, no mocks, headless-first. Encodes docs/TESTING.md./bootstrapCreate a new Unreal Engine project under projects/ wired to this repo's UnrealMCP plugin and pre-configured with the recommended engine built-in plugins (Niagara, Water, GeometryScripting, GAS, StateTree, animation, runtime mesh, etc.), and give the project its own agent-facing CLAUDE.md. Use when someone wants to "bootstrap a project", "make a new UE project", "scaffold a test/sandbox project", get a fresh project to drive with the MCP, or "write a CLAUDE.md for this game". Produces a minimal C++ host project that loads the plugin from this repo (no copy) and builds against the engine at UNREAL_ENGINE_ROOT. Asks the intended architecture (C++-first vs Blueprint-first, single- vs multiplayer) and writes a project CLAUDE.md tuned to the answers; can also adopt an existing project by exploring it and writing a CLAUDE.md that describes it./buildBuild an Unreal Engine project across its flavors — the editor target for local play-in-editor (PIE), a standalone/packaged Windows client, and a dedicated server (local dev or a cooked Linux build for remote/cloud hosting). Use when someone wants to "build the game", "build the editor", "compile the project", "package for Windows", "cook content", "make a client/server build", "build the dedicated server", "make a shipping build", "build for the cloud/GameLift", or asks which build command they need and what config/platform to use. Generic across any UE project with similar Editor/Game/Server target architecture — it derives names from the project, hardcodes none. Knows the compile-vs-cook-vs-package distinction, the target matrix, and the constraints that silently break builds./capture-poseTurn a human-framed editor viewport into a reproducible, automated IN-GAME screenshot. The human positions the level-editor camera on whatever they want to see; this records that exact pose (location/rotation/FOV/aspect) and reproduces it inside the running game (PIE) through the real game render path — no character driving, no camera flying — saving the shot so any later run can re-capture the identical view with zero human input. This is the sanctioned way to build the "fixed capture rig" that agent-observed testing doctrine requires (docs/TESTING.md in the harness repo) before any screenshot-based visual validation. Use when someone says "capture this view", "record my camera", "snapshot this framing in-game", "set up a repeatable shot of X", "make a capture rig for this", or "I framed it — grab it in the game". Pairs with /visual-critique for judging the captured frame (against a reference image or a written spec).
/docsBuild and maintain a game project's architecture-documentation system — a bidirectionally-navigable, code-synced knowledge base genericized from a production UE reference project's two-taxonomy model. One namespace, three modes. `/docs taxonomy` builds the FORWARD taxonomy (the file-by-file source atlas TAXONOMY.md + doc router INDEX.md, for top-down navigation). `/docs reverse` builds the REVERSE taxonomy (backward-reference CLAUDE.md files that point a leaf folder up to its owning doc + an ANNOTATE.md backlog of undocumented systems). `/docs audit` is the SYNC loop (verify each doc against the code, one per pass, with a resumable ledger). Use for "build a taxonomy / index the codebase / source atlas", "add folder pointers / annotate the source tree / stop agents drifting off-architecture", "audit the docs / check docs against code / find stale docs". Markdown-only — no source edits, no editor mutation. Generic across any UE project (C++-first, Blueprint-first, or with a TS backend); derives source roots from the project, hardcodes none. The doc *bodies* themselves are written by the sibling `/architect` skill.