neo4j-nvl-skill
Neo4j Visualization Library (NVL) — framework-agnostic graph rendering for the browser. Covers @neo4j-nvl/base (NVL class, nodes/relationships, Canvas vs…
от neo4j★ 126 звёзд на GitHub
Установить neo4j-nvl-skill в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Neo4j Visualization Library (@neo4j-nvl/base)
Shipped with
@neo4j-nvl/basev2.1.0. Once installed into a project this folder is detached from the package: the installed types innode_modules/@neo4j-nvl/*are the source of truth. If the project's@neo4j-nvl/baseis a different version andnode_modules/@neo4j-nvl/base/skills/neo4j-nvl-skill/SKILL.mdexists, read that copy instead.
When to use
- Rendering a Neo4j graph in the browser with custom interactions, rendering or data shapes
- Visualizing
driver.executeQueryresults as an interactive graph - Zoom, pan, drag, click, hover, lasso or box-select interactions; clustering; custom layouts
Not for: a pre-styled graph view with default behaviour (GraphVisualization from @neo4j-ndl/react wraps
NVL for that), Python notebooks (neo4j/python-graph-visualization), Cypher, driver setup, GDS or GraphQL.
Rules
- Types win. Confirm every option, callback and method against this skill or the
.d.tsfiles innode_modules/@neo4j-nvl/*before using it. If they disagree, trust the types and say so. - Never invent options. NVL options and callbacks are flat, named keys. If a key is not in the API reference below or the types, it does not exist.
- Do not reverse-engineer from compiled
dist/orlib/output. Use the types and these docs. - Symptom first. When something does not work, check the table below before changing code.
Before you code
- The container has explicit
widthandheight; otherwise the graph is invisible. - React wrappers:
layout,layoutOptionsand every other option go insidenvlOptions. - Wheel zoom in
<InteractiveNvlWrapper>is enabled bymouseEventCallbacks.onZoomAndPan; there is noonZoom. fit()needs explicit node ids.fit([])fits nothing.- The WebGL renderer draws no captions. Use
'canvas'when labels matter, orhtml/iconoverlays. - If the hierarchical layout never finishes under the Vite dev server, add
optimizeDeps: { include: ['bin-pack'] }. Vite 7.3 pre-bundles it on its own, so only apply it when the symptom appears. nvlResultTransformerreturns bare{ id }elements; labels and properties are inrecordObjectMap.- React:
nvlCallbacksare captured once; use refs or stable functions.interactionOptionsreplaces the defaults, so pass every option you need. - Destroy interaction handlers, then
nvl.destroy(), on teardown. The React wrappers do this for you. updateCallback(name, cb)on interaction handlers is untyped:cbis(...args: unknown[]) => void, so parameters arrive asunknownand a typed callback such as(node: Node) => …fails understrict. Cast inside the callback; the ReactmouseEventCallbacksare fully typed.
Symptom → cause → fix
| Symptom | Cause | Fix |
|---|---|---|
| Graph invisible / blank | Container has no height | Explicit width and height on the container |
| Wheel does not zoom (React) | Zoom handler only wired from onZoomAndPan |
mouseEventCallbacks={{ onZoomAndPan: true }} → react-wrappers |
| Hierarchical layout never finishes (Vite dev) | Layout SharedWorker imports CJS bin-pack; seen on older Vite, not on 7.3 |
optimizeDeps: { include: ['bin-pack'] } → vite-and-bundlers |
| No text on nodes with WebGL | Captions are Canvas-only | html / icon, own overlay, or setRenderer('canvas') → labels-and-overlays |
fit([]) does nothing |
Empty array = no nodes | fit(nvl.getNodes().map((n) => n.id)) |
fit() stops zoomed in on a huge graph |
minZoom clamp (default 0.075) |
fit(ids, { minZoom }) or lower the minZoom option |
| Clicking a cluster selects all its nodes | selectOnClick selects cluster.nodeIds |
selectOnClick: false and select in onNodeClick → clustering |
| No cluster outlines / halos | Not force-directed, or mixed colours (halo) | Force-directed with layoutOptions.clustering; one colour per cluster → clustering |
| Pinned nodes move when clustering is on | Cluster forces ignore pins | Do not combine → clustering |
| Changing circle options does nothing | Layout is not re-run on option change | Bounce via setLayout('free') → layouts-and-positions |
| Un-pinned nodes stay frozen | Settled simulation is not restarted | setNodePositions(current, true) → layouts-and-positions |
Node x/y are ignored |
Positions are owned by the layout; never set x/y on node data |
setNodePositions(nodes) or the React positions prop → layouts-and-positions |
| Callbacks see stale state (React) | nvlCallbacks captured at cre |
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- README.md
- references/api/base/classes/NVL.md
- references/api/base/functions/getZoomTargetForNodePositions.md
- references/api/base/index.md
- references/api/base/interfaces/CircularOptions.md
- references/api/base/interfaces/ClusteringOptions.md
- references/api/base/interfaces/ExternalCallbacks.md
- references/api/base/interfaces/ForceDirectedOptions.md
- references/api/base/interfaces/HierarchicalOptions.md
- references/api/base/interfaces/HitTargetCluster.md
- references/api/base/interfaces/HitTargetNode.md
- references/api/base/interfaces/HitTargetRelationship.md
- references/api/base/interfaces/Node.md
- references/api/base/interfaces/NvlMouseEvent.md
- references/api/base/interfaces/NvlOptions.md
- references/api/base/interfaces/NvlWindow.md
- references/api/base/interfaces/Point.md
- references/api/base/interfaces/Relationship.md
- references/api/base/type-aliases/CanvasRendererType.md
- references/api/base/type-aliases/Cluster.md
- references/api/base/type-aliases/ClusterByFn.md
- references/api/base/type-aliases/ClusterId.md
- references/api/base/type-aliases/HitTargets.md
- references/api/base/type-aliases/HitTestTarget.md
- references/api/base/type-aliases/Layout.md
- references/api/base/type-aliases/LayoutOptions.md
- references/api/base/type-aliases/NodeWithClientPosition.md
- references/api/base/type-aliases/PartialNode.md
- references/api/base/type-aliases/PartialRelationship.md
- references/api/base/type-aliases/Renderer.md
- references/api/base/type-aliases/StyledCaption.md
- references/api/base/type-aliases/WebGLRendererType.md
- references/api/base/type-aliases/ZoomOptions.md
- references/api/base/variables/CircularLayoutType.md
- references/api/base/variables/ForceDirectedLayoutType.md
- references/api/base/variables/FreeLayoutType.md
- references/api/base/variables/GridLayoutType.md
- references/api/base/variables/HierarchicalLayoutType.md
- references/api/base/variables/d3ForceLayoutType.md
- references/api/base/variables/nvlResultTransformer.md
FAQ
Что делает скилл neo4j-nvl-skill?
Neo4j Visualization Library (NVL) — framework-agnostic graph rendering for the browser. Covers @neo4j-nvl/base (NVL class, nodes/relationships, Canvas vs WebGL renderer), @neo4j-nvl/interaction-handlers (zoom, pan, drag, click, hover, box/lasso select, keyboard) and @neo4j-nvl/react (InteractiveNvlWrapper, BasicNvlWrapper, StaticPictureWrapper). Use when rendering a Neo4j graph in a browser, feeding driver results through nvlResultTransformer, choosing Canvas vs WebGL, clustering or laying out nodes, wiring node/relationship/cluster interactions, or embedding NVL in React, Vite or vanilla JS apps. Does NOT handle Cypher authoring — use neo4j-cypher-skill. Does NOT handle driver lifecycle, sessions or executeQuery setup — use neo4j-driver-javascript-skill. Does NOT handle the pre-styled GraphVisualization embed — use @neo4j-ndl/react.
Как установить скилл neo4j-nvl-skill?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл neo4j-nvl-skill запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
frontend-design
AnthropicGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
webapp-testing
AnthropicToolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
brand-guidelines
AnthropicApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand…
web-artifacts-builder
AnthropicSuite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…