Token导航 LogoToken导航TokenDH.com
前端设计需要联网github未标认证来源可访问许可证需确认审计通过

graph-viewer图形查看器

Agent Skill

graph-viewer 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

499

周安装

21

GitHub Stars

4

下载量

175
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:graph-viewer(图形查看器)
来源仓库:https://github.com/cognitedata/dune-skills
仓库路径:skills/graph-viewer
安装命令:
npx skills add https://github.com/cognitedata/dune-skills --skill graph-viewer
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/cognitedata/dune-skills --skill graph-viewer

简介

graph-viewer 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。

  • 它可辅助渲染复杂图表、交互式浏览结构或导出 SVG/PNG 图像。
  • 通过 npx skills add 命令从指定仓库安装,具体用法请参考原始 README。
  • 安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

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 Dune 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.

  1. Inspect the target app. Read package.json and look at the existing folder structure (e.g. src/features/*, src/components/*, path aliases like @/*).
  2. Install missing dependencies with the app's package manager (npm, pnpm, yarn, …). See the Dependencies table below for purposes and suggested versions. Reuse the React version already pinned by the app rather than upgrading it, and prefer any versions the repo already pins over the suggestions here.
  3. Copy the bundle into the app. Copy every file from skills/graph-viewer/code/ into an app-local feature folder, for example: src/features/graph-viewer/ If the repo already has a different feature/components layout or alias, mirror it.
  4. Import from the local folder, never from @skills/.... With a typical @/* alias: import {useGraphViewer} from "@/features/graph-viewer";
  5. Render GraphCanvas inside a container with explicit dimensions (height is required — see the minimal example below).
  6. Run typecheck and build (tsc --noEmit, npm run build, etc.) and fix any path or type issues introduced by the copy.

Minimal Example

import { useGraphViewer } from "@/features/graph-viewer";

export function GraphPanel() {
  const { GraphCanvas, isLoading, error } = useGraphViewer({
    dataModel: { space: "my-space", externalId: "my-data-model", version: "1" },
    instance: { space: "my-instance-space", externalId: "pump-001" },
  });

  if (isLoading) return <div>Loading graph…</div>;
  if (error) return <div>Error: {error}</div>;

  return <GraphCanvas className="h-[600px] w-full" />;
}

Dependencies

Suggested versions reflect the latest published majors at the time of writing. They are starting points — if the target app already pins different versions, defer to the app.

PackageSuggested versionPurpose
react^18.2.0UI framework (peer; reuse the app's version)
@cognite/sdk^10.10.0CDF API client (instances, data models)
@cognite/dune^2.1.0Provides the authenticated SDK via useDune()
reagraph^4.30.8WebGL graph rendering engine
lucide-react^1.14.0Icon set used by the node-type legend

Example install (npm; adapt to the app's package manager):

npm install @cognite/sdk@^10.10.0 @cognite/dune@^2.1.0 reagraph@^4.30.8 lucide-react@^1.14.0

CDF Cost & Performance

Graph expansion can issue many CDF requests, especially with reverse relations. For large or unfamiliar data models, be conservative:

  • Set whitelistedRelationProps to the few properties the app actually needs to traverse.
  • Lower initialConnectionLimit (it is a hard maximum of connections fetched per expansion).
  • Lower maxNodes to bound the in-memory LRU buffer.
  • Only declare coreReverseQueries for relations the app must surface; each entry adds an extra query per expansion.

Tuples in coreReverseQueries are version-aware: [space, viewExternalId, viewVersion, propertyName, isList].

Advanced Reference

For full configuration tables, return-value docs, layouts, theming, and richer examples, read code/README.md.

For implementation details, inspect the source files under code/.

Verification Checklist

  • The app is wrapped in <DuneProvider>.
  • All files from skills/graph-viewer/code/ were copied into an app-local folder.
  • Imports point to the app-local folder (e.g. @/features/graph-viewer), not @skills/....
  • @cognite/dune, @cognite/sdk, reagraph, and lucide-react are present in package.json.
  • The container that renders <GraphCanvas> has an explicit height.
  • tsc --noEmit and the app's build both pass.
  • No references to dune-industrial-components were introduced.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

34.46%
按下载量换算60

Claude

28.61%
按下载量换算50

Cursor

18.72%
按下载量换算33

Gemini CLI

8.59%
按下载量换算15

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills