rnhd2026130

Draw customer–contact relationship graphs with vis-network, suitable for scenarios needing customer relationship networks, contact graphs, or vis-network integration: lightweight integration via node/edge mapping and a Network instance, without building a full graph database or complex layout engine.

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "rnhd2026130" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-c27b8639558ad7354ddcd8ab4e714f1194213002f78ed3846cbb6e9382b7aa4b. Verify the upstream source and version against https://skillhub.cn/skills/user_f1b049da/xw20264483 before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

skillhub.cn

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

Draw customer–contact relationship graphs with vis-network, suitable for scenarios needing customer relationship networks, contact graphs, or vis-network integration: lightweight integration via node/edge mapping and a Network instance, without building a full graph database or complex layout engine.

0 Downloads

Introduction source: third_party · user_f1b049da · 1.0.0 Reference

SkillPi interpretation

Tasks
Translation pending; see source documentation.
Audience
Not specified in the source documentation.
Inputs and outputs
Not specified in the source documentation.
Software, accounts and paid services
Not specified in the source documentation.
Limits and differences
Not specified in the source documentation.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: rnhd2026130
slug: rnhd2026130
displayName: 客户关系网络
version: 1.0.0
summary: 用 vis-network 把客户与联系人画成可拖拽关系图。
license: MIT
description: 用 vis-network 画客户-联系人关系图。当用户要客户关系网络、联系人图谱、vis-network 时使用。轻量接入:节点/边映射 + Network 实例;不做完整图数据库或复杂布局引擎。

客户关系网络

灵感:能力工具箱 vis-network(画客户-联系人关系图)。

小四原创:当事人 → {nodes,edges} → Network。
卸载时 network.destroy(),防泄漏。

何时使用

  • 客户详情「关系人」图谱
  • Demo 展示客户—联系人—同事连线
  • 一眼看出关键人/介绍人链路

硬约束

  1. 依赖:vis-network(及文档要求的 vis-data / 样式)。
  2. 节点至少:id、label;边至少:from、to。
  3. 容器需固定宽高;空数据展示空态,勿初始化报错。
  4. 实现要点注释标 小四原创。
  5. 组件卸载必须 destroy()。
  6. 不做物理引擎调参全集、不做服务端图计算。

推荐实现

import { DataSet } from 'vis-data'
import { Network } from 'vis-network'
import 'vis-network/styles/vis-network.min.css'

export type PartyNode = {
  id: string
  label: string
  group?: 'customer' | 'contact' | 'staff'
}

export type PartyEdge = {
  id?: string
  from: string
  to: string
  label?: string
}

// 小四原创:当事人列表 → network 数据
export function toNetworkData(
  nodes: PartyNode[],
  edges: PartyEdge[],
) {
  return {
    nodes: new DataSet(
      nodes.map((n) => ({
        id: n.id,
        label: n.label,
        group: n.group ?? 'contact',
      })),
    ),
    edges: new DataSet(
      edges.map((e, i) => ({
        id: e.id ?? `e-${i}`,
        from: e.from,
        to: e.to,
        label: e.label,
        arrows: 'to',
      })),
    ),
  }
}

export function mountPartyNetwork(
  el: HTMLElement,
  nodes: PartyNode[],
  edges: PartyEdge[],
): { destroy: () => void } {
  if (!nodes.length) {
    el.textContent = '暂无关系人'
    return { destroy: () => { el.textContent = '' } }
  }
  const data = toNetworkData(nodes, edges)
  const network = new Network(el, data, {
    physics: { stabilization: true },
    interaction: { hover: true },
    groups: {
      customer: { color: '#3b82f6' },
      contact: { color: '#94a3b8' },
      staff: { color: '#22c55e' },
    },
  })
  return { destroy: () => network.destroy() }
}

Agent 步骤

  1. npm i vis-network vis-data;引入 CSS。
  2. 客户详情挂载容器,传入节点与边。
  3. onBeforeUnmount 调 destroy。
  4. 自测:客户+2 联系人可见;空列表不崩。

不要做

  • 一次渲染上千节点无筛选。
  • 忘记 destroy 导致画布叠层。

附加

Current listing version

1.0.0

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value75/100

Highlights

  • 提供客户关系网络图谱可视化能力,适用于客户详情关系人图谱、Demo 展示等明确场景
  • 轻量接入设计,通过节点/边映射 + Network 实例实现,不构建复杂图数据库
Trigger Precision85/100

Highlights

  • 触发词精准完整,明确指出适用于客户关系网络、联系人图谱或 vis-network 场景
Structure and Standards90/100

Areas to improve

  • description 重复 Reported severity: Minor

    顶层 frontmatter 和 skill_body 内部均包含 description 字段,内容重复

    Recommendation: 建议移除 skill_body 内部的 description 字段,保持 frontmatter 唯一性

Highlights

  • 文档结构完整,包含何时使用、硬约束、推荐实现、Agent 步骤等必要章节
  • 提供了完整的 TypeScript 代码示例和实现要点注释
Execution Reliability90/100

Highlights

  • 提供了完整的实现代码,包含节点/边映射、Network 实例化、destroy 防泄漏机制
  • 覆盖空数据处理场景,工具来源明确,参数配置合理
Evidence Verifiability (mean of the first four)85/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

  • Install or fetch external dependencies

    Use official sources and pin versions. Check install scripts in an isolated environment. This document check does not cover code downloaded later.

    Mentioned in main document · lines 103

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Not specified in the source documentation.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.