Token导航 LogoToken导航

Agent Skill · 研究检索

d3-viz(d3 可视化)

d3-viz 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

d3-viz 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为操作浏览器;许可证信息还不明确,第三方扫描有提醒项,按安装量在研究检索类的 73,675 个 Skill 里排第 62,370。

总安装 336周安装 14GitHub Stars 公开资料未说明下载 112核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/dtran320/claud3 --skill d3-viz

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

d3-viz 基于 Edward Tufte 信息设计原则创建高质量 D3.js 可视化图表,输出单文件 HTML。适合在 Codex、Claude、Cursor、Gemini CLI 中快速生成图表、图形或数据展示方案。根据用户意图自动选择合适的可视化方式,支持交互式图表与静态图像两种输出模式。

安装前请确认是否具备浏览器预览能力,并注意生成的代码依赖 D3 v7 运行时环境。d3-viz 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/d3-viz

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/dtran320/claud3 --skill d3-viz;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要操作浏览器,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

d3-viz 怎么安装?

在终端执行 npx skills add https://github.com/dtran320/claud3 --skill d3-viz。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

d3-viz 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

d3-viz 需要什么权限?

权限级别是操作浏览器。该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

d3-viz 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

d3-viz 用的人多吗?

公开数据是累计安装 336 次,近一周安装 14 次,下载 112 次。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

d3-viz 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
d3-viz

d3 可视化 · 本页

336—操作浏览器未明确有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

D3 Data Visualization Builder

Creates publication-quality D3.js visualizations grounded in Edward Tufte's information design principles: high data-ink ratio, information density, meaningful annotation, and purposeful interaction. Produces single-file HTML with inline D3 v7.


Workflow Decision Table

Route the user's request to the right mode:

User intentSignal wordsAction
Direct visualization"chart", "plot", "graph", "visualize"Generate standalone HTML → open in browser
Chart type help"what chart", "how should I show", "best way to display"Consult reference/d3-gallery.md → recommend → generate
Data exploration"explore", "play with", "try different", "experiment"Build D3 playground → see §7 Playground Integration
Small multiples"compare across", "facet by", "each category"Generate small multiples layout (one chart per group, shared axes)
Annotation focus"annotate", "highlight", "call out", "story"Generate with heavy annotation layer

Chart Selection Framework

Start with the data question, not the chart name. Walk this decision tree:

Step 1 — What question is the user asking?

Question patternCategoryGo to
"How does X change over time?"Temporald3-gallery.md → Temporal
"How does X compare to Y?"Comparisond3-gallery.md → Comparison
"How is X distributed / spread?"Distributiond3-gallery.md → Distribution
"How do X and Y relate?"Correlationd3-gallery.md → Correlation
"What are the parts of the whole?"Compositiond3-gallery.md → Composition
"How do things connect or flow?"Flow/Networkd3-gallery.md → Flow & Network
"Where is X?"Spatiald3-gallery.md → Spatial

Step 2 — Data shape narrows the choice

ShapeConstraint
<20 data pointsPrefer dot plot, lollipop, direct-labeled bar
20–500 pointsStandard charts: line, bar, scatter
500–5000 pointsConsider hexbin, contour, aggregation
5000+ pointsHexbin, density, canvas rendering, or small multiples
HierarchicalTreemap, sunburst, pack, icicle, tree
Network/graphForce-directed, arc, adjacency matrix, chord

Step 3 — Select and generate

Read reference/d3-gallery.md for the selected chart type to get:

  • Key D3 modules needed
  • When NOT to use (important for avoiding bad choices)
  • Tufte considerations specific to that chart type

Tufte Principles as Code Rules

Apply these rules to every visualization generated. These are non-negotiable.

1. Maximize data-ink ratio

DO: Remove axis domain lines, minimize tick marks, use subtle reference lines (stroke-opacity: 0.15). DON'T: Add gridlines by default, use 3D effects, add drop shadows, use gradient fills on data elements.

// After rendering axis:
g.select(".domain").remove();
g.selectAll(".tick line").attr("stroke-opacity", 0.15);
g.selectAll(".tick text").attr("fill", "#888").attr("font-size", "11px");

2. Direct labels, not legends

DO: Label line endpoints, bar values, notable scatter points directly on the chart with matching colors. DON'T: Use a separate legend box unless there are >5 series and direct labeling is impractical.

// Direct label at end of each line:
groups.forEach(group => {
  const last = group.values[group.values.length - 1];
  svg.append("text")
    .attr("x", x(last.date) + 6).attr("y", y(last.value))
    .attr("fill", color(group.name)).attr("font-size", "12px")
    .attr("dominant-baseline", "middle")
    .text(group.name);
});

3. Small multiples over toggles

DO: When comparing 4+ subgroups, render one small chart per group in a grid with shared axes. DON'T: Hide groups behind a dropdown selector or toggle that forces sequential viewing.

4. Annotate the interesting

DO: Add at least one text annotation calling out a peak, drop, crossover, or milestone directly on the chart. DON'T: Leave the chart without any annotation. Every chart tells a story — make it explicit.

// Annotation pattern:
svg.append("text")
  .attr("x", x(annotationDate)).attr("y", y(annotationValue) - 16)
  .attr("fill", "#e0e0e0").attr("font-size", "11px").attr("text-anchor", "middle")
  .text("Peak: 1,234 users");
svg.append("line")
  .attr("x1", x(annotationDate)).attr("y1", y(annotationValue) - 10)
  .attr("x2", x(annotationDate)).attr("y2", y(annotationValue) - 2)
  .attr("stroke", "#888").attr("stroke-width", 1);

5. Color carries meaning

DO: Use d3.schemeTableau10 for categorical data. Use sequential scales (d3.interpolateBlues) for quantities. Use diverging scales when there's a meaningful midpoint. DON'T: Use rainbow for sequential data. Use more than 7–8 distinct colors. Add decorative color that doesn't encode data.

6. Title is a finding

DO: Write the chart title as a key insight: "Revenue doubled after the March campaign". DON'T: Use generic titles like "Revenue over Time". If a descriptive title is truly needed, add the finding as a subtitle.

7. Interactions reveal, not decorate

DO: Tooltips show additional dimensions. Hover dims non-hovered elements. Brush filters linked views. DON'T: Add bounce animations, elastic easing, or interaction that gates essential data. Transition duration: ≤300ms. Easing: d3.easeCubicOut.


D3 Code Generation Template

Every visualization follows this canonical single-file HTML structure. Adapt as needed but maintain the skeleton.

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>[Insight-based title]</title>
  <script src="https://cdn.jsdelivr.net/npm/d3@7"></script>
  <style>
    * { margin: 0; box-sizing: border-box; }
    body {
      background: #1a1a2e; color: #e0e0e0;
      font-family: system-ui, -apple-system, sans-serif;
      display: flex; justify-content: center; align-items: center;
      min-height: 100vh; padding: 24px;
    }
    .chart-container { max-width: 900px; width: 100%; }
    h1 { font-size: 18px; font-weight: 600; margin-bottom: 4px; }
    .subtitle { font-size: 13px; color: #888; margin-bottom: 20px; }
    .source { font-size: 11px; color: #666; margin-top: 12px; }

    /* Axis styles */
    .axis text { fill: #888; font-size: 11px; }
    .axis .domain { display: none; }
    .axis .tick line { stroke: #2a2a4a; stroke-opacity: 0.3; }

    /* Annotation styles */
    .annotation { fill: #e0e0e0; font-size: 11px; }
    .annotation-line { stroke: #888; stroke-width: 1; }

    /* Tooltip */
    .tooltip {
      position: absolute; pointer-events: none;
      background: #16213e; border: 1px solid #2a2a4a;
      border-radius: 4px; padding: 8px 12px;
      font-size: 12px; color: #e0e0e0;
      box-shadow: 0 4px 12px rgba(0,0,0,0.3);
      opacity: 0; transition: opacity 0.15s;
    }
  </style>
</head>
<body>
  <div class="chart-container">
    <h1>[Insight title — key finding from the data]</h1>
    <p class="subtitle">[Context: date range, methodology, or secondary finding]</p>
    <div id="chart"></div>
    <p class="source">Source: [data source]</p>
  </div>

  <script>
    // === DATA ===
    const data = [ /* inline data or fetch */ ];

    // === DIMENSIONS (margin convention) ===
    const margin = { top: 20, right: 120, bottom: 40, left: 60 };
    const width = 860 - margin.left - margin.right;
    const height = 480 - margin.top - margin.bottom;

    // === SVG ===
    const svg = d3.select("#chart").append("svg")
      .attr("viewBox", `0 0 ${width + margin.left + margin.right} ${height + margin.top + margin.bottom}`)
      .style("max-width", "100%")
      .style("height", "auto")
      .append("g")
      .attr("transform", `translate(${margin.left},${margin.top})`);

    // === SCALES ===
    const x = d3.scaleTime()  // or scaleLinear, scaleBand
      .domain(d3.extent(data, d => d.date))
      .range([0, width]);

    const y = d3.scaleLinear()
      .domain([0, d3.max(data, d => d.value)])
      .range([height, 0])
      .nice();

    // === AXES (Tufte-clean) ===
    svg.append("g")
      .attr("class", "axis")
      .attr("transform", `translate(0,${height})`)
      .call(d3.axisBottom(x).ticks(6))
      .call(g => g.select(".domain").remove());

    svg.append("g")
      .attr("class", "axis")
      .call(d3.axisLeft(y).ticks(5).tickFormat(d3.format(",.0f")))
      .call(g => g.select(".domain").remove())
      .call(g => g.selectAll(".tick line").clone()
        .attr("x2", width).attr("stroke-opacity", 0.08));

    // Axis labels
    svg.append("text")
      .attr("x", width / 2).attr("y", height + 36)
      .attr("fill", "#888").attr("font-size", "12px").attr("text-anchor", "middle")
      .text("[X label]");

    svg.append("text")
      .attr("transform", "rotate(-90)")
      .attr("x", -height / 2).attr("y", -44)
      .attr("fill", "#888").attr("font-size", "12px").attr("text-anchor", "middle")
      .text("[Y label]");

    // === DATA RENDERING ===
    // [Chart-specific code: lines, bars, circles, etc.]

    // === DIRECT LABELS ===
    // [Label line ends, notable bars, key points — no legend]

    // === ANNOTATIONS ===
    // [At least one call-out on a notable data point]

    // === TOOLTIP ===
    const tooltip = d3.select("body").append("div").attr("class", "tooltip");
    // [Mouseover/mouseout handlers on data elements]
  </script>
</body>
</html>

Adapting the template

  • Right margin: Set to 120px+ when direct-labeling line endpoints on the right
  • viewBox: Always use viewBox for responsive sizing — never hardcode width/height attributes
  • Data: Inline small datasets (<100 rows). For larger data, use d3.csv() or d3.json() with the file path
  • Multiple charts: For small multiples, create one SVG per facet in a CSS grid container

Interactive Patterns

Add interaction only when it reveals additional data, not for decoration.

InteractionWhen to useD3 patternNotes
TooltipAlways (for detail-on-demand)mouseover → position div → mouseout → hideShow dimensions not in the static view
Voronoi hoverScatter, multi-line (nearest point detection)d3.Delaunay.from() → find() on mousemoveBetter UX than hovering tiny elements
BrushTime-series range selection, scatter filteringd3.brushX() or d3.brush() → filter dataCombine with linked views for exploration
Zoom + panMaps, dense scatter, treemapsd3.zoom() → transform groupSet scaleExtent and translateExtent bounds
Linked viewsDashboard with 2+ coordinated chartsShared selection state → re-render bothHighlight in one, filter in another
TransitionsSorting, chart type switching, data updatesselection.transition().duration(250).ease(d3.easeCubicOut)Max 300ms; no elastic/bounce

See reference/d3-modules.md → Interaction Behaviors for full code patterns.


Playground Integration

When the user wants to explore data interactively (try different chart types, adjust fields, toggle Tufte features), build a D3 playground following the /playground skill conventions.

Detection

Trigger playground mode on signals like: "explore", "play with", "try different views", "experiment", "what chart works best".

How to build

  1. Analyze the data — detect column names, types (numeric, temporal, categorical), and row count
  2. Build the playground HTML following reference/playground-integration.md:

- Controls panel on the left (chart type cards, field dropdowns, scale radios, color swatches, Tufte toggles) - D3 SVG preview on the right (re-renders fully on every state change) - Prompt output at bottom with copy button

  1. Populate controls from data — field dropdowns list actual column names; chart type options are filtered to those compatible with the data shape
  2. Set intelligent defaults — auto-detect time columns for x-axis, largest numeric column for y-axis, any low-cardinality string column for color grouping
  3. Include presets: "Tufte minimal", "Annotated", "Dense", "Presentation"

State management

Follow the playground skill pattern: single state object, updateAll() triggers renderPreview() + updatePrompt(). Every control writes to state and calls updateAll().

Prompt output

Natural language, not a value dump. Only mentions non-default choices. Example:

"Create a scatter plot of price vs. square footage, colored by neighborhood, using a log scale for price, with direct labels on outliers and an annotation on the cluster of high-value properties."

Data Handling

Handle data input in order of preference:

Input typeHow to handle
File path provided (CSV/JSON)Read the file, analyze columns, auto-detect types. Use d3.csv() or d3.json() with relative path in the HTML
Inline data (pasted values)Parse and embed directly in the const data = [...] block
URLFetch with d3.csv(url) or d3.json(url). Warn about CORS if not a known open data source
Description only ("monthly sales data with columns date, revenue, region")Generate realistic sample data matching the description. Note clearly in subtitle: "Sample data — replace with actual data"
No data (just a chart type request)Generate with illustrative sample data. Note in subtitle

Data analysis steps

  1. Read the data — first 5 rows + column names
  2. Detect types — numeric, date (try common formats), categorical (string with <20 unique values), ID (unique strings)
  3. Compute summary stats — min, max, mean, count, unique values for categoricals
  4. Select chart type — using the Chart Selection Framework above
  5. Map fields — assign columns to x, y, color, size, tooltip based on types and chart requirements

Post-Generation Audit

After generating the visualization HTML, before presenting it to the user:

  1. Read reference/tufte-checklist.md
  2. Audit the generated code against every checklist item
  3. Fix any violations found:

- Remove gridlines if present (unless explicitly requested) - Replace legend with direct labels - Add annotation if missing - Check title is a finding not a description - Verify color encodes data, not decoration - Ensure tooltip reveals additional dimensions

  1. Write the final HTML file
  2. Open in browser: open <filename>.html

Examples

Example 1: Time-series data

User: "Visualize this CSV of monthly revenue by region" Flow: Read CSV → detect date + numeric + categorical columns → select multi-line chart → generate with direct-labeled line endpoints → annotate peak month → audit checklist → open in browser

Example 2: Comparison

User: "Show me how departments compare on headcount" Flow: Detect categorical + numeric → select horizontal bar chart (sorted by value) → direct-label each bar → annotate the largest and smallest → title: "Engineering has 3x the headcount of Marketing" → audit → open

Example 3: Exploration

User: "Let me explore this sales dataset" Flow: Detect playground intent → analyze data columns → build D3 playground with chart type cards, field dropdowns, Tufte toggles → set intelligent defaults → write HTML → open in browser

Example 4: Distribution

User: "What does the distribution of response times look like?" Flow: Detect single numeric variable → select histogram → add KDE overlay → annotate median and p99 → add rug plot for individual data points → title: "95% of responses complete under 200ms" → audit → open

平台分布

Codex

35.61%
按下载量换算40

Claude

27.08%
按下载量换算30

Cursor

20.89%
按下载量换算23

Gemini CLI

9.35%
按下载量换算10

安全审计

Gen Agent Trust Hub

通过

Socket

可疑

Snyk

可疑

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills