Adds a new visualization engine or style to the visualization module.

MITAuto-check passedKnowledge Management

Install Add Visualization

skills CLI
$ npx skills add FabioYanezRomero/Knowledge-Graph-Builder --skill add-visualization -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install FabioYanezRomero/Knowledge-Graph-Builder add-visualization --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/FabioYanezRomero/Knowledge-Graph-Builder.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agent/skills/add-visualization .claude/skills/add-visualization && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
add-visualization
GitHub stars
103
Token cost
~3.3k tokens
SKILL.md length
441 words
Files
1
Skills in repo
6
Repo updated
First seen
Licence
MIT

At a glance

Adds a new visualization engine or style to the visualization module.

  • Works in 5 steps: Understand the Interface → Implement Your Visualization → Register in Module → …
  • Knowledge Management work in your project
  • SKILL.md covers Overview, Architecture, Dependencies and Existing Visualizations…, plus 9 more sections
  • Calls python

What it does

Add Visualization is an agent skill from FabioYanezRomero/Knowledge-Graph-Builder. Adds a new visualization engine or style to the visualization module.

Its SKILL.md is about 3.3k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Knowledge Management. It works with NetworkX. The repository describes itself as: Repository for building knowledge graphs from specific datasets using generative language model through ollama. The licence is MIT.

When your agent uses it

  • Knowledge Management work in your project

Example prompts

  • “/add-visualization”

Requirements

  • Python 3

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Understand the Interface
  2. Implement Your Visualization
  3. Register in Module
  4. Add CLI Subcommand
  5. Verify

What it can do on your machine

Read from SKILL.md and the folder at commit 588f0d9. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • python

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Add Visualization loads about 3.3k tokens when it runs. Until then it costs about 22 tokens; SKILL.md has 441 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~22
When it runs · the whole SKILL.md, loaded when a task matches
~3.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from FabioYanezRomero/Knowledge-Graph-Builder at commit 588f0d9, republished under its MIT licence (© FabioYanezRomero). 441 words, ~3,343 tokens.

Download SKILL.mdSave it as .claude/skills/add-visualization/SKILL.md (or your agent's skills folder).
name
add-visualization
description
Adds a new visualization engine or style to the visualization module.

Adding a Visualization

This skill documents how to add a new visualization type to the kgb/visualization/ module.

Overview

Visualizations render knowledge graphs as interactive HTML. The system provides:

  • Network topology (graph_viz.py) — Cytoscape.js + NetworkX graph with origin-based coloring, node dragging, search/filter, and context menus
  • Text highlighting (text_viz.py) — langextract-based entity highlighting in source text
  • Extensible architecture for custom visualizations

Architecture

                     Visualization Module
    ┌────────────────────────────────────────────────────┐
    │                                                    │
    │  graph_viz.py             text_viz.py              │
    │  ├─ render_graph()        ├─ TextVisualizer        │
    │  ├─ batch_render_graphs() │   ├─ render_triples_   │
    │  │                        │   │   in_text()        │
    │  │  Cytoscape.js          │   ├─ save_html()       │
    │  │  Node/edge topology    │   └─ batch_render()    │
    │  │  Origin coloring       │                        │
    │  │  (Extracted/Augmented) │   langextract-based    │
    │  │  Node dragging         │   Entity highlighting  │
    │  │  Search/filter         │                        │
    │  │  Context menus         │                        │
    │  │                        │                        │
    │  │  your_viz.py                                    │
    │  │  └─ Your new visualization                      │
    │  │                                                 │
    │  └─────────────────────────────────────────────────┘

Data Flow:
  list[Triple] or GraphML → Graph Construction → Layout → Rendering → HTML

Key Files:

  • kgb/visualization/graph_viz.py — Graph topology (Cytoscape.js + NetworkX)
  • kgb/visualization/text_viz.py — Text entity highlighting (langextract)
  • kgb/visualization/__init__.py — Public exports

Dependencies

Required:

  • networkx>=3.0 — Graph data structures and layout computation
  • Cytoscape.js v3.30.4 (CDN) — Interactive graph rendering in the browser
  • cytoscape-dagre (CDN) — Hierarchical layout plugin
  • cytoscape-cxtmenu (CDN) — Right-click context menu plugin

Optional:

  • langextract — For text-based entity highlighting

Existing Visualizations Reference

graph_viz.py — render_graph()

Key features to understand:

  • Input flexibility: Accepts nx.Graph | str | Path | list[Triple] | list[dict]
  • Origin coloring: Nodes colored by extraction origin (Extracted=blue, Augmented=amber, Both=violet)
  • Edge styling: Solid lines for extracted edges, dashed for augmented
  • Inference detection: Uses edge_attrs.get("inference") == "contextual" to classify
  • Theme system: Dark/light mode via theme dict
  • Layout algorithms: cose (force-directed), circle, dagre (hierarchical) — switchable in-browser
  • Interactive features: Node dragging, search/filter bar, right-click context menus, path finder, export (PNG/SVG/JSON)
text_viz.py — TextVisualizer

Key features:

  • Class-based: Instance holds configuration (animation_speed, show_legend, gif_optimized)
  • langextract integration: Converts triples to AnnotatedDocument for visualization
  • Entity grouping: By entity_type or relation
  • Augmented distinction: Adds "(Augmented)" suffix to entity type for CSS styling

Step 1: Understand the Interface

Follow the patterns from existing visualizations:

Function-based (like render_graph):

python
def visualize_<type>(
    data: Path | list[Triple] | nx.Graph,
    output_path: Path | str,
    *,
    dark_mode: bool = False,
    **kwargs: Any
) -> Path:

Class-based (like TextVisualizer):

python
class YourVisualizer:
    def __init__(self, config_option: type = default, ...) -> None: ...
    def render(self, data, **kwargs) -> str: ...
    def save_html(self, data, output_path, **kwargs) -> Path: ...
    def batch_render(self, records, output_dir, **kwargs) -> list[Path]: ...

Step 2: Implement Your Visualization

Create kgb/visualization/timeline_viz.py:

python
"""Timeline visualization for temporal knowledge graphs."""

from __future__ import annotations
from pathlib import Path
from typing import Any
from datetime import datetime

import networkx as nx
import plotly.graph_objects as go

from ..domains import Triple


def visualize_timeline(
    data: Path | list[Triple] | list[dict[str, Any]],
    output_path: Path | str,
    *,
    dark_mode: bool = False,
    date_field: str = "date",
    height: int = 600,
    **kwargs: Any
) -> Path:
    """Generate interactive timeline visualization.

    Args:
        data: GraphML path or list of triples with date attributes
        output_path: Output HTML file path
        dark_mode: Use dark color theme
        date_field: Attribute name containing dates
        height: Canvas height in pixels

    Returns:
        Path to created HTML file

    Raises:
        ValueError: If data format is invalid or dates missing
        FileNotFoundError: If GraphML path doesn't exist
    """
    output_path = Path(output_path)

    # 1. Load Data
    if isinstance(data, Path):
        if not data.exists():
            raise FileNotFoundError(f"GraphML file not found: {data}")
        G = nx.read_graphml(str(data))
        events = _extract_events_from_graph(G, date_field)
    elif isinstance(data, list):
        events = _extract_events_from_triples(data, date_field)
    else:
        raise ValueError(f"Unsupported data type: {type(data)}")

    if not events:
        raise ValueError(f"No events with '{date_field}' attribute found")

    # 2. Theme Configuration (follow graph_viz.py pattern)
    theme = {
        "bg": "#0f172a" if dark_mode else "#ffffff",
        "text": "#f1f5f9" if dark_mode else "#1e293b",
        "grid": "#334155" if dark_mode else "#e2e8f0",
        "accent": "#3b82f6",
    }

    # 3. Build Timeline Figure
    fig = go.Figure()

    sorted_events = sorted(events, key=lambda e: e["date"])
    dates = [e["date"] for e in sorted_events]
    labels = [e["label"] for e in sorted_events]
    hovers = [e["hover"] for e in sorted_events]

    fig.add_trace(go.Scatter(
        x=dates,
        y=[1] * len(dates),
        mode="markers+text",
        marker=dict(size=12, color=theme["accent"]),
        text=labels,
        textposition="top center",
        hovertext=hovers,
        hoverinfo="text"
    ))

    # 4. Apply Theme
    fig.update_layout(
        title="Knowledge Graph Timeline",
        height=height,
        paper_bgcolor=theme["bg"],
        plot_bgcolor=theme["bg"],
        font=dict(color=theme["text"]),
        xaxis=dict(showgrid=True, gridcolor=theme["grid"], title="Date"),
        yaxis=dict(visible=False),
        showlegend=False
    )

    # 5. Save HTML
    output_path.parent.mkdir(parents=True, exist_ok=True)
    fig.write_html(str(output_path))

    return output_path


def _extract_events_from_triples(triples, date_field):
    """Extract timeline events from triples."""
    events = []
    for t in triples:
        if isinstance(t, Triple):
            t = t.model_dump()

        date_str = t.get(date_field)
        if not date_str:
            continue

        try:
            date = datetime.fromisoformat(str(date_str))
        except ValueError:
            continue

        events.append({
            "date": date,
            "label": f"{t.get('head', '')} -> {t.get('tail', '')}",
            "hover": f"<b>{t.get('relation', '')}</b><br>{t.get('head')} -> {t.get('tail')}"
        })

    return events


def _extract_events_from_graph(G, date_field):
    """Extract timeline events from a NetworkX graph."""
    events = []
    for u, v, attrs in G.edges(data=True):
        date_str = attrs.get(date_field)
        if not date_str:
            continue
        try:
            date = datetime.fromisoformat(str(date_str))
        except ValueError:
            continue
        events.append({
            "date": date,
            "label": f"{u} -> {v}",
            "hover": f"<b>{attrs.get('relation', '')}</b><br>{u} -> {v}"
        })
    return events

Note: This timeline example uses Plotly (appropriate for time-series charts). The main graph visualization (graph_viz.py) uses Cytoscape.js. New visualizations can use any library.

Show full SKILL.md (177 more words)Show less

Step 3: Register in Module

Update kgb/visualization/__init__.py:

python
from .graph_viz import render_graph, batch_render_graphs
from .text_viz import TextVisualizer
from .timeline_viz import visualize_timeline  # Add this

__all__ = [
    "render_graph",
    "batch_render_graphs",
    "TextVisualizer",
    "visualize_timeline",  # Add this
]

Step 4: Add CLI Subcommand

Update kgb/__main__.py (follow the pattern of visualize_network and visualize_extraction):

python
@visualize_app.command("timeline")
def visualize_timeline_cmd(
    input_dir: Path = typer.Option(..., "--input", "-i", exists=True),
    output_dir: Optional[Path] = typer.Option(None, "--output", "-o"),
    dark_mode: bool = typer.Option(False, "--dark-mode"),
    date_field: str = typer.Option("date", "--date-field"),
    height: int = typer.Option(600, "--height"),
):
    """Create timeline visualization from extracted triples."""
    import json
    from .visualization import visualize_timeline

    viz_dir = output_dir or input_dir.parent / "visualizations_timeline"
    viz_dir.mkdir(parents=True, exist_ok=True)

    for json_file in input_dir.glob("*.json"):
        try:
            with open(json_file) as f:
                triples = json.load(f)

            output_path = viz_dir / f"{json_file.stem}.html"
            visualize_timeline(
                data=triples,
                output_path=output_path,
                dark_mode=dark_mode,
                date_field=date_field,
                height=height
            )
            console.print(f"Created: {output_path}")

        except ValueError as e:
            console.print(f"[yellow]Skipped {json_file.name}: {e}[/yellow]")
        except Exception as e:
            console.print(f"[red]Error {json_file.name}: {e}[/red]")

See existing visualize_network and visualize_extraction commands in kgb/__main__.py for complete reference.

Step 5: Verify

Check Import
bash
python -c "from kgb.visualization import visualize_timeline; print('OK')"
Unit Tests
python
def test_visualize_timeline_from_triples(tmp_path):
    from kgb.visualization.timeline_viz import visualize_timeline

    triples = [
        {"head": "EventA", "relation": "occurred", "tail": "LocationX",
         "inference": "explicit", "date": "2024-01-15"},
        {"head": "EventB", "relation": "happened", "tail": "LocationY",
         "inference": "explicit", "date": "2024-02-20"},
    ]

    output = tmp_path / "timeline.html"
    result = visualize_timeline(triples, output)

    assert result.exists()
    html = result.read_text()
    assert "plotly" in html.lower()


def test_timeline_no_dates(tmp_path):
    from kgb.visualization.timeline_viz import visualize_timeline
    import pytest

    triples = [{"head": "A", "relation": "r", "tail": "B", "inference": "explicit"}]

    with pytest.raises(ValueError, match="No events"):
        visualize_timeline(triples, tmp_path / "no_dates.html")


def test_timeline_dark_mode(tmp_path):
    from kgb.visualization.timeline_viz import visualize_timeline

    triples = [
        {"head": "A", "relation": "r", "tail": "B",
         "inference": "explicit", "date": "2024-01-01"},
    ]

    output = tmp_path / "dark.html"
    result = visualize_timeline(triples, output, dark_mode=True)
    assert result.exists()

Configuration Options

ParameterTypeDefaultDescription
dark_modeboolFalseUse dark color theme
date_fieldstr"date"Attribute name containing dates
heightint600Canvas height in pixels

Key Principles

PrincipleImplementation
Dark ModeUse theme dict with conditional colors (follow graph_viz.py pattern)
Type SafetyAccept Path | list[Triple] | list[dict] with isinstance checks
Self-ContainmentUse CDN scripts (cytoscape.js, dagre, cxtmenu) for portability
Error HandlingRaise ValueError for invalid inputs, FileNotFoundError for missing files
Inference AwarenessUse inference.value (not str(inference)) — "explicit" / "contextual"

Files to Create/Modify

FileAction
kgb/visualization/your_viz.pyCreate — visualization implementation
kgb/visualization/__init__.pyModify — add imports and exports
kgb/__main__.pyModify — add CLI subcommand

Verification Checklist

  • Implementation handles multiple input types (Path, list[Triple], list[dict])
  • Dark/light mode support via theme dict
  • Output directory created with mkdir(parents=True, exist_ok=True)
  • Registered in kgb/visualization/__init__.py
  • CLI subcommand added under visualize_app
  • Tests for happy path, error cases, and theme options

© FabioYanezRomero, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agent/skills/add-visualization of FabioYanezRomero/Knowledge-Graph-Builder.

Open the folder on GitHubat commit 588f0d9

Compare with similar skills

Add Visualization next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Add Visualization compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Add Visualization this skillFabioYanezRomero/Knowledge-Graph-Builder103—~3.3kAutomated safety check: PassMIT
Knowledge Graph ToolsDrugClaw/DrugClaw126—~1.7kAutomated safety check: PassApache-2.0
NetworkxzLanqing/codex-claude-academic-skills4.7k15 repos~3.2kAutomated safety check: PassBSD-3-Clause
Logseq Review Workflow Evallogseq/logseq45k—~1kAutomated safety check: PassAGPL-3.0
Baoyu URL To Markdownsdyckjq-lab/llm-wiki-skill2.5k2 repos~3.2kAutomated safety check: PassNone
Obsidian CLIAtmosphere/atmosphere3.8k13 repos~795Automated safety check: PassApache-2.0

Similar skills

  • Knowledge Graph Tools

    DrugClaw/DrugClaw

    Drug-discovery knowledge-graph workflow guide for assembling drug-target-disease-pathway relationship graphs from OpenTargets GraphQL, ChEMBL REST, STRING PPI, and Reactome pathway APIs, then…

    126 GitHub stars~1.7k tokensUpdated 6 mo ago
    Knowledge ManagementAuto-check passed
  • Networkx

    zLanqing/codex-claude-academic-skills

    Comprehensive toolkit for creating, analyzing, and visualizing complex networks and graphs in Python.

    4.7k GitHub starsUsed in 15 repos~3.2k tokens
    Research & ScienceAuto-check passed
  • Compare two revisions of the Logseq logseq-review-workflow skill by running the same review prompt against isolated before and after skill snapshots, collecting both outputs, and producing a…

    45k GitHub stars~1k tokensUpdated today
    Knowledge ManagementAuto-check passed
  • Baoyu URL To Markdown

    sdyckjq-lab/llm-wiki-skill

    Fetch any URL and convert to markdown using Chrome CDP. An agent skill from sdyckjq-lab/llm-wiki-skill.

    2.5k GitHub starsUsed in 2 repos~3.2k tokens
    Knowledge ManagementAuto-check passed
  • Obsidian CLI

    Atmosphere/atmosphere

    Interact with Obsidian vaults using the Obsidian CLI to read, create, search, and manage notes, tasks, properties, and more.

    3.8k GitHub starsUsed in 13 repos~795 tokens
    Knowledge ManagementAuto-check passed
  • Esm Cjs Risk Scan

    logseq/logseq

    Scan Logseq ClojureScript Node/Electron targets for npm module loading risks, especially ESM-only packages that may fail when loaded through js/require or shadow-cljs require-based shims.

    45k GitHub stars~3.3k tokensUpdated today
    Knowledge ManagementAuto-check passed

More from FabioYanezRomero/Knowledge-Graph-Builder

  • Add LLM Client

    FabioYanezRomero/Knowledge-Graph-Builder

    Adds a new LLM client provider to the clients module. An agent skill from FabioYanezRomero/Knowledge-Graph-Builder.

    103 GitHub stars~3.8k tokensUpdated 1 mo ago
    Auto-check passed
  • Add Augmentation Strategy

    FabioYanezRomero/Knowledge-Graph-Builder

    Adds a new iterative augmentation strategy (e.g., enrichment, summarization) to the builder module.

    103 GitHub stars~3.3k tokensUpdated 1 mo ago
    Auto-check passed
  • Add Converter

    FabioYanezRomero/Knowledge-Graph-Builder

    Adds a new output format converter (e.g., CSV, RDF) to the IO writers module.

    103 GitHub stars~2.6k tokensUpdated 1 mo ago
    Auto-check passed
  • Add Dataset Format

    FabioYanezRomero/Knowledge-Graph-Builder

    Adds a new input format loader (e.g., Parquet, Excel) to the IO readers module.

    103 GitHub stars~1.9k tokensUpdated 1 mo ago
    Auto-check passed
  • Add Domain

    FabioYanezRomero/Knowledge-Graph-Builder

    Manage knowledge domains (e.g., Medical, Finance). An agent skill from FabioYanezRomero/Knowledge-Graph-Builder.

    103 GitHub stars~3.1k tokensUpdated 1 mo ago
    Auto-check passed

Works with

Questions about Add Visualization

What does Add Visualization do?

Adds a new visualization engine or style to the visualization module. Add Visualization is an agent skill from FabioYanezRomero/Knowledge-Graph-Builder. Adds a new visualization engine or style to the visualization module.

When should I use Add Visualization?

Add Visualization fits situations like: knowledge Management work in your project.

How do I install Add Visualization in Claude Code?

Run `npx skills add FabioYanezRomero/Knowledge-Graph-Builder --skill add-visualization -a claude-code`. Or copy the skill folder (.agent/skills/add-visualization in FabioYanezRomero/Knowledge-Graph-Builder) into .claude/skills/add-visualization in your project. Claude Code loads it when a task matches its description.

How do I install Add Visualization in Codex?

Run `npx skills add FabioYanezRomero/Knowledge-Graph-Builder --skill add-visualization -a codex`. Or copy the skill folder (.agent/skills/add-visualization in FabioYanezRomero/Knowledge-Graph-Builder) into .agents/skills/add-visualization in your project. Codex loads it when a task matches its description.

Can I use Add Visualization in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add FabioYanezRomero/Knowledge-Graph-Builder --skill add-visualization -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/add-visualization, .gemini/skills/add-visualization, .github/skills/add-visualization and .opencode/skills/add-visualization in your project.

What does Add Visualization need to run?

Going by SKILL.md and its folder, Add Visualization needs the command-line tools its instructions call (python). Our summary lists: Python 3.

Does Add Visualization access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Add Visualization safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Add Visualization use?

Add Visualization is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Add Visualization use?

About 3.3k tokens (SKILL.md is roughly 13k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Add Visualization?

Skills that share tags, products or a category with Add Visualization: Knowledge Graph Tools (DrugClaw/DrugClaw, 126 stars), Networkx (zLanqing/codex-claude-academic-skills, 4.7k stars), Logseq Review Workflow Eval (logseq/logseq, 45k stars) and Baoyu URL To Markdown (sdyckjq-lab/llm-wiki-skill, 2.5k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Add Visualization?

FabioYanezRomero (a GitHub user) maintains it in FabioYanezRomero/Knowledge-Graph-Builder, which has 103 GitHub stars. The repository holds 6 skills in this directory. The repository was last updated on August 28, 2026.

Source: FabioYanezRomero/Knowledge-Graph-Builder on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.