preview-d3

preview-d3 is a skill for Claude Code from veelenga/preview-skills. It costs 24 tokens per session (2,269 once invoked), scanned A, original, MIT.

A preview tool for D3.js, a JavaScript library for drawing data-driven charts and diagrams. It opens an interactive two-dimensional view with zooming, panning, and export support.

In plain words
What is it for?
Use it to preview charts, network diagrams, and other custom D3 visualizations from code or a file.
Why use it?
It lets you inspect a D3 visualization in a browser without manually building the surrounding preview page.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

Good fit Use it to preview charts, network diagrams, and other custom D3 visualizations from code or a file.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/veelenga/preview-skills/preview-d3
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add veelenga/preview-skills --skill preview-d3
Clone the repo
git clone --depth 1 https://github.com/veelenga/preview-skills

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for preview-d3

README.md
[![agentmods](https://agentmods.dev/badge/skills/veelenga/preview-skills/preview-d3/github.svg)](https://agentmods.dev/skills/veelenga/preview-skills/preview-d3)
Your own site
<a href="https://agentmods.dev/skills/veelenga/preview-skills/preview-d3"><img src="https://agentmods.dev/badge/skills/veelenga/preview-skills/preview-d3/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for preview-d3

Your own site · 80×15
<a href="https://agentmods.dev/skills/veelenga/preview-skills/preview-d3"><img src="https://agentmods.dev/badge/skills/veelenga/preview-skills/preview-d3.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 24 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,269 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00024 $0.02269
Opus 5 $0.00012 $0.01135
Sonnet 5 $0.00005 $0.00454
Haiku 4.5 $0.00002 $0.00227

Measured 10d ago against content hash dd86759d2ab7, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

preview-d3 scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

The scan reads SKILL.md. This mod also ships 8 executable files (config.sh, lib/browser-utils.sh, lib/content-utils.sh, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/preview-d3/SKILL.md · 327 lines

How it starts

The opening of the file, as written. The whole thing — 327 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Preview D3 Skill

Interactive D3.js visualization viewer that renders custom data visualizations with built-in zoom, pan, and export capabilities.

Agent Usage

When the user asks to create a D3 visualization, write the D3 code and pipe it to the script. Use the Bash tool to execute this skill's run.sh script:

# Pipe D3 code
cat visualization.js | ./run.sh

# Or from a file
./run.sh chart.d3

The script handles all HTML generation and automatically opens the result in the browser. Do NOT open the file manually to avoid duplicate tabs.

Usage

# Preview a D3 visualization file
/preview-d3 network-graph.d3

# Pipe D3 code (preferred for temporary content)
cat visualization.js | /preview-d3
echo "const svg = d3.select('#visualization').append('svg')..." | /preview-d3

Best Practice: For temporary or generated visualizations, prefer piping over creating temporary files. This avoids cluttering your filesystem and the content is automatically cleaned up.

Options

The script works with sensible defaults but supports these flags for flexibility:

  • -o, --output PATH - Custom output path
  • --no-browser - Skip browser, output file path only

Features

  • Universal D3 compatibility - Works with any D3 code from the web
  • Zoom and pan - Mouse wheel to zoom (0.5x to 10x), drag to pan
  • Reset zoom button
  • Code viewer toggle
  • Export to SVG functionality
  • Preserves interactions - Tooltips, draggable nodes, animations all work
  • Automatic container detection - Works with any selector
  • Responsive design adapts to screen size

When to Use This Skill

Use this skill when the user wants to:

  • Create custom data visualizations
  • Render charts, graphs, and network diagrams
  • Visualize hierarchical data
  • Create interactive dashboards
  • Test D3 code snippets from online examples

D3 Code Requirements

Your D3 code should be self-contained JavaScript that:

  1. Gets container dimensions from the DOM
  2. Creates its own SVG element
  3. Handles tooltips directly (if needed)
  4. Embeds data in the code

Read the full file on GitHub · 327 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 327 lines · 24 tokens per session scan A dd86759d2ab7

Subscribe to this mod's changes

preview-d3 is a skill published in the GitHub repository veelenga/preview-skills (8 stars, last pushed 29d ago), licensed MIT. It adds 24 tokens to every session and 2,269 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

experts

Assemble a panel of experts to assess a problem from multiple professional perspectives, surface agreement and disagreement, and deliver a chaired recommendation with clear tradeoffs. Use when the user wants multi-expert judgment, a second opinion, design critique, option comparison, or a recommendation backed by…

flc1125/skills · 62 tokens

create-plan

A guide for creating repository-aware technical plans: written proposals for implementation, refactoring, migration, or design work based on the actual codebase.

flc1125/skills · 114 tokens

github-release-notes-writer

Draft or update user-focused GitHub Release Notes from verified tags, commits, pull requests, existing releases, and supplied changelog baselines. Use when preparing prerelease or stable release notes, turning GitHub's generated What's Changed list into a curated narrative, documenting upgrades or breaking changes, or…

flc1125/skills · 84 tokens

google-fonts-curator

Recommend high-taste Google Fonts for websites based on brand tone, page type, and visual direction. Use when the user needs font selection, font pairing, or aesthetic judgment within the Google Fonts ecosystem for landing pages, brand sites, editorial pages, portfolios, or digital products.

flc1125/skills · 61 tokens

programmer-motivator

Give calm, technically grounded encouragement to programmers when the user is stuck on a bug, frustrated by debugging, tired, discouraged, blaming themselves after a mistake, asking for motivation or emotional support while coding, wanting someone to stay with them through a hard problem, celebrating a breakthrough…

flc1125/skills · 102 tokens

subagent-orchestrator

Orchestrate subagent workflows for complex tasks that benefit from decomposition, role-based delegation, and parallel execution. Use when Codex should assemble a temporary team of subagents, choose roles from a reusable role library, create a controlled fallback role when no preset role fits, coordinate read-heavy…

flc1125/skills · 87 tokens