Skip to content

Copies a reusable CDF graph viewer into a Flows app for visualizing data model relationships and instances.

CCM score
62 of 100
skills.sh installs
1.9K
GitHub stars
6
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers embedding an interactive graph of a CDF data model, including nodes, direct relations, edges, and reverse relations
  • Includes a useGraphViewer hook, a GraphCanvas component, and a local code bundle copied from skills/graph-viewer/code/
  • Enforces an explicit container height and bounds CDF cost via initialConnectionLimit, maxNodes, and whitelistedRelationProps
  • Designed for Flows apps wrapped in @cognite/dune's DuneProvider that need knowledge graph or data model visualization

Install

$ npx -y skills add cognitedata/builder-skills --skill graph-viewer -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Graph Viewer

Use This When

The user wants to embed an interactive graph of a CDF data model — nodes, direct relations, edges, and reverse relations — inside a Flows app.

Do not use this skill for static diagrams, pure dataflow visualizations, or non-CDF graphs.

Prerequisites

  • The app is wrapped in @cognite/dune's <DuneProvider> so useDune() returns an authenticated SDK.
  • The target data model exists in CDF and you know its space, externalId, and version.
  • The app uses React 18+ and TypeScript.

Integration Workflow

Follow these steps in order. Adapt to the target repo's conventions instead of inventing new ones.

Details

Repository
github.com/cognitedata/builder-skills
Categories
Frontend & UI Code, Data Science & Analytics
First seen
Jun 3, 2026

Questions

What does the graph-viewer skill do?

The graph-viewer skill embeds an interactive graph of a CDF data model inside a Flows app, showing nodes, direct relations, edges and reverse relations. It is built around the reusable useGraphViewer hook copied into the app as a local code bundle. It is not meant for static diagrams, pure dataflow visualizations or non-CDF graphs.

How do I install the graph-viewer skill?

Run npx -y skills add cognitedata/builder-skills --skill graph-viewer -y in your project to install it. The skill then lets the agent copy the graph viewer code into an app-local feature folder and wire up useGraphViewer and GraphCanvas. The app must also be wrapped in DuneProvider and use React 18 or newer with TypeScript.

What does graph-viewer need before it can run?

The app must be wrapped in DuneProvider from @cognite/dune so useDune returns an authenticated SDK. You also need a CDF data model with its space, externalId and version. The app needs @cognite/sdk, @cognite/dune, reagraph and lucide-react installed alongside React 18 or newer.

Where does graph-viewer stand in Frontend & UI Code?

Graph-viewer sits in the Frontend & UI Code category, which is led by vercel-react-best-practices, web-design-guidelines and design-taste-frontend. It sets itself apart by focusing on embedding interactive CDF data model graphs with explicit controls over CDF request cost. Its advanced settings, such as whitelistedRelationProps and initialConnectionLimit, bound how many requests each expansion makes.

More from cognitedata/builder-skills

All 25

Similar to Graph Viewer

More Frontend & UI Code