home / skills / mhylle / claude-skills-collection / skill-visualizer

skill-visualizer skill

/skills/skill-visualizer

This skill generates interactive HTML visualizations for skills, codebase, and dependencies, helping you explore structure and relationships quickly.

npx playbooks add skill mhylle/claude-skills-collection --skill skill-visualizer

Review the files below or copy the command above to add this skill to your agents.

Files (2)
SKILL.md
2.9 KB
---
name: skill-visualizer
description: Generate interactive HTML visualizations of the skills collection, codebase structure, or dependency graphs. Uses D3.js for interactive visualization with collapsible nodes, color-coded categories, and hover details. Triggers on "visualize skills", "generate skill map", "codebase visualization", or "show skill dependencies".
allowed-tools: Bash(python *), Read, Glob, Write
argument-hint: "[type: skills|codebase|deps]"
---

# Skill Visualizer

Generate interactive HTML visualizations for exploring skills, codebase structure, and dependencies.

## Overview

This skill creates browser-viewable HTML files with interactive diagrams. It supports multiple visualization types and outputs self-contained HTML files that open directly in any browser.

## Arguments

- `$0`: Output type - `skills`, `codebase`, or `deps` (default: skills)

Examples:
- `/skill-visualizer` - Generate skills collection map
- `/skill-visualizer skills` - Generate skills collection map
- `/skill-visualizer codebase` - Generate codebase structure visualization
- `/skill-visualizer deps` - Generate skill dependency graph

## Visualization Types

### Skills Map (`skills`)

Generates an interactive force-directed graph of all skills showing:
- Skill nodes with name and type indicator
- Color coding by skill type:
  - **Green**: Orchestrators (context: fork)
  - **Blue**: Read-only (allowed-tools restrictions)
  - **Orange**: Hybrid (standard skills)
- Hover tooltips with skill descriptions
- Drag to reposition nodes

### Codebase Structure (`codebase`)

Generates a treemap visualization of the project structure:
- Directory hierarchy with expandable nodes
- File type distribution by color
- Size indicators for each file/directory

### Dependency Graph (`deps`)

Generates a directed graph showing skill dependencies:
- Which skills invoke other skills
- Integration points between skills
- Visual workflow representation

## Usage

1. Invoke the skill with desired output type
2. The skill runs Python scripts to analyze the codebase
3. Generates self-contained HTML with embedded CSS/JS
4. Opens in default browser automatically

```bash
# Run directly
python ~/.claude/skills/skill-visualizer/scripts/visualize.py skills

# Output location
docs/visualizations/skills-map-YYYY-MM-DD.html
```

## Output

All visualizations are saved to `docs/visualizations/`:
- `skills-map-YYYY-MM-DD.html`
- `codebase-structure-YYYY-MM-DD.html`
- `skill-deps-YYYY-MM-DD.html`

## HTML Features

- **Self-contained**: No external dependencies (D3.js embedded)
- **Responsive design**: Works on any screen size
- **Interactive**: Pan, zoom, drag nodes
- **Tooltips**: Hover for details
- **Dark theme**: Easy on the eyes
- **Export-ready**: Can screenshot for documentation

## Python Scripts

The skill uses Python scripts in `scripts/` directory:
- `visualize.py` - Main visualization generator
- Requires only standard library (no pip install needed)

Overview

This skill generates interactive, self-contained HTML visualizations to explore a skills collection, the codebase structure, or dependency relationships. It produces responsive D3.js diagrams with collapsible nodes, color-coded categories, and hover tooltips. Output files are saved to docs/visualizations/ and open directly in a browser for quick inspection.

How this skill works

The skill runs a Python script that inspects the codebase and extracts metadata about skills, files, and invocation links. It then emits a single-file HTML bundle with embedded D3.js, CSS, and data to render force-directed graphs, treemaps, or directed dependency graphs. The visuals support pan/zoom, drag, collapse/expand, hover details, and a dark theme for comfortable viewing.

When to use it

  • Map and explore all available skills and their types quickly.
  • Visualize project directory layout and file-size distribution for architecture reviews.
  • Reveal invocation patterns and dependencies between skills before refactors.
  • Generate visual artifacts for documentation or stakeholder demos.
  • Diagnose unexpected coupling or orphaned code in the skills collection.

Best practices

  • Run the visualizer from the project root so file paths and sizes are accurate.
  • Use the 'skills' view for logical grouping, 'codebase' for file layout, and 'deps' for call relationships.
  • Open generated HTML in a modern browser for full interactive features and smooth pan/zoom.
  • Regenerate visuals after code changes to keep maps and dependency graphs up to date.
  • Limit very large repositories by filtering or sampling before visualizing to maintain interactivity.

Example use cases

  • Generate a skills map to find which skills are orchestrators, read-only, or hybrid and inspect their descriptions via tooltips.
  • Produce a treemap of the codebase to spot large files or deeply nested directories impacting maintenance.
  • Create a dependency graph to identify which skills call a deprecated utility before removal.
  • Embed a generated HTML visualization in docs to illustrate system architecture during design reviews.
  • Quickly export a visualization screenshot for a project status update or pull request.

FAQ

What output types are supported?

Three types: 'skills' (force-directed skill map), 'codebase' (treemap of directories and files), and 'deps' (directed dependency graph).

Do I need to install third-party packages?

No. The included Python script uses only the standard library and produces a self-contained HTML file with embedded D3.js.

Where are the files saved?

All visualizations are saved under docs/visualizations/ with names like skills-map-YYYY-MM-DD.html.