An interactive HTML node-graph viewer skill that visualizes codebase structure, entry-point call chains, and data type flows.
Example — AuroraView Analysis
Below are screenshots from analyzing the AuroraView Rust WebView project:
Complete AuroraView::new() call chain with all modules, IPC handlers, lifecycle management, and WebView builder — right-side panel shows the interactive call chain detail.
Hover over any function to see its full signature and source location. Click to highlight all connected relationships.
Click show_embedded() to trace the DCC embedded entry flow — the viewer highlights the active path and dims unrelated nodes.
Interactive widget hierarchy viewer — nested layout boxes with color-coded widget types, resize handles on hover, stack/tab switching, and Ctrl+Z undo. Sidebar shows "🖼️ UI 布局" section for layout views.
- Interactive Node Graph — Draggable nodes with bezier-curve connections, pan & zoom
- UI Layout Visualization — Interactive widget hierarchy viewer for UI projects (Qt, React, etc.); nested layout boxes with resize handles, Ctrl+Z undo, and hover tooltips showing widget class/properties
- Call Chain Detail Panel — Click entry-point functions to explore the complete call tree in a right-side panel; each item shows a description explaining what the function does
- Global Search (Ctrl+K) — Fuzzy search across ALL diagram pages with cross-diagram navigation
- Multi-Diagram Support — Organize views by entry-point call chains, UI layers, data types, and overview
- Smart Highlighting — Click any function to highlight its node + all connected relationships; dim everything else
- Collapsible Children — Sub-functions collapse/expand with connection redirect to parent
- Signature Tooltips — Hover functions to see full signatures, descriptions, detailed explanations, and I/O
- Click to Copy — Click any function attr to copy the function name to clipboard with toast notification
- Undo Layout Moves (Ctrl+Z) — Undo the last node/group drag operation (up to 50 steps)
- Position Persistence — Node positions saved to localStorage per diagram; "Reset Layout" restores defaults
- Catppuccin Mocha Dark Theme — Beautiful dark color scheme with type-based semantic colors
- Group Boxes — Dashed-border groups with auto-sizing to enclose member nodes; draggable as a unit
The viewer renders two files together:
| File | Purpose |
|---|---|
code_flow_graph.html |
Rendering engine (do not modify) |
code_flow_graph_data.js |
Diagram data (generated per-project by your AI assistant) |
Simply place both files in the same directory and open the HTML in a browser.
Copy the entire repository into your AI agent's skills directory:
<project>/.skills/code_flow_graph/
SKILL.md # Main skill instructions (~150 lines: when/what/gotchas/workflow)
config.json # User preferences (output path, language, thresholds)
example/ # HTML template + example data
references/ # Data format spec + deep-dive types + analysis strategy
templates/ # Composable code patterns (node types, skeleton)
scripts/ # Validation helpers (5-point verification)
state/ # Cross-session persistence (gitignored)
Then ask your AI: "Visualize the code architecture of this project" or "Generate a code graph for this module".
The AI will:
- Analyze the project structure and discover entry points
- Generate an Overview diagram immediately (no scoping questions)
- Offer deep-dive options for specific call chains, UI layers, or data types
- Generate selected deep-dive diagrams using composable templates
- Validate output with
scripts/validate_data.js - Incrementally append new diagram pages as you select options; track progress across sessions
Edit config.json to customize behavior:
{
"output_path": "docs/code_graph",
"language": "zh",
"default_scope": "project",
"include_external_deps": true,
"max_call_depth": 4,
"fan_out_threshold": 2,
"fan_in_threshold": 3
}You can also use the viewer independently:
- Copy
example/code_flow_graph.htmlto your project - Create a
code_flow_graph_data.jsfile following the format inreferences/data_format.md - Open the HTML file in a browser
Use the included validation script to check generated data files:
node scripts/validate_data.js path/to/code_flow_graph_data.jsSee references/data_format.md for the complete data format specification.
A module-level dependency graph showing one node per major module/class, entry points highlighted with type: 'entry', cross-module connections, and package groups. Always generated first.
Traces the complete call chain of one entry function. Nodes are organized left-to-right following execution order. Each function attr includes sig (signature tooltip), desc (one-line summary), and detail (multi-line explanation). The entry function attr includes a callChain array for the interactive detail panel.
For UI projects (Qt, React, Web, etc.). Uses widget type nodes with sections for Widgets, Event Handlers, and Slots. Dashed pink connections link event handlers to business logic.
Interactive nested widget-box tree for UI projects. Uses UI_LAYOUT_VIEWS data structure. Appears in sidebar under "🖼️ UI 布局" separator.
Each dataclass/type definition → node with type: 'data' (peach color). Fields listed as attrs with type in the val field. fieldDetail enables a right-sidebar computation panel showing how each field gets its value.
See references/deep_dive_types.md for generation details.
Uses Catppuccin Mocha palette. Color is automatically assigned by node type:
| Type | Color | Badge |
|---|---|---|
entry |
Yellow (#f9e2af) |
ENTRY |
class |
Blue (#89b4fa) |
CLASS |
module |
Green (#a6e3a1) |
MODULE |
function |
Mauve (#cba6f7) |
FUNC |
data |
Peach (#fab387) |
DATA |
widget / QDialog |
Sapphire (#74c7ec) |
UI CLASS |
slots |
Pink (#f5c2e7) |
SLOTS |
Nodes with
external: trueare rendered with dashed borders and anEXTtag to indicate third-party dependencies.
All connections render with a gradient stroke from transparent at source to full opacity at target, indicating flow direction.
| Color | Style | Meaning |
|---|---|---|
Green (#a6e3a1) |
Solid | Direct function call |
Red (#f38ba8) |
Solid | Inheritance / override |
Blue (#89b4fa) |
Solid | Data flow / return value |
Pink (#f5c2e7) |
Dashed | Signal / event / callback |
Peach (#fab387) |
Solid | External dependency call |
Overlay (#6c7086) |
Solid | Weak reference / optional |
| Key | Action |
|---|---|
Ctrl+K |
Open global search |
Ctrl+Z |
Undo last layout move (up to 50 steps) |
Space + Drag |
Pan the viewport |
Scroll |
Zoom in / out |
Escape |
Close search / detail panel |
| Click function | Copy function name + highlight connections |
| Click blank area | Clear all highlights |
MIT



