agentleFS
michelvemichelve/hugin-v0/skills/component-visualizer/SKILL.md

component-visualizer

Skill0 starsChanged 8 months agoMITView on GitHub

Generate interactive HTML dependency graphs for React components. Use when asked to "visualize components", "show component dependencies", "dependency graph", "component map", or "what depends on what".

1 other project uses a version of this, 1 of them edited.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run the visualization script from the project root:

    line 24
  2. Very specific:

    Does not parse re-exports from barrel files (index.ts)

    line 88

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Component Visualizer

Generate an interactive force-directed dependency graph of React components as a standalone HTML file. Scans src/client/components/ and src/client/routes/ for import relationships and produces a browser-ready visualization.

When to Use

  • Understanding component relationships before refactoring
  • Identifying tightly coupled or orphaned components
  • Onboarding to understand component architecture
  • Reviewing impact of changes across the component tree

Quick Start

Run the visualization script from the project root:

python3 "${CLAUDE_SKILL_DIR}/scripts/visualize-components.py"

This outputs component-graph.html in the project root. Open it in a browser.

To specify a custom output path:

python3 "${CLAUDE_SKILL_DIR}/scripts/visualize-components.py" /tmp/graph.html

Graph Features

  • Force-directed layout — nodes self-organize by dependency proximity
  • Color-coded categories:
    • Blue: Route files (src/client/routes/)
    • Green: Feature components (src/client/components/)
    • Purple: UI components (src/client/components/ui/ — DSAI)
    • Gray: Other files
  • Interactive — drag nodes, scroll to zoom, click for file details
  • Filterable — toggle category visibility with checkboxes
  • Hover highlighting — shows direct dependency edges for any node
  • Zero dependencies — standalone HTML with embedded CSS/JS, no CDN

What It Scans

DirectoryCategoryPurpose
src/client/components/ui/UI (DSAI)DSAI components (installed via dsai add)
src/client/components/ComponentProject feature components
src/client/routes/RouteTanStack Router page files

Import Resolution

The script resolves these import patterns:

  • @/components/ui/button → src/client/components/ui/button.tsx
  • @/components/app-sidebar → src/client/components/app-sidebar.tsx
  • ../components/header → relative path resolution
  • ./sub-component → same-directory resolution

Node module imports (e.g., react, @tanstack/router) are excluded.

Interpreting the Graph

Healthy patterns:

  • Routes (blue) connect to components (green), which compose DSAI UI (purple)
  • Clusters indicate feature groupings
  • DSAI UI nodes have many incoming edges (high reuse)

Warning signs:

  • Components with no incoming edges may be dead code
  • Circular dependency clusters (tight bidirectional edges)
  • Routes importing directly from ui/ (skipping feature abstraction layer)
  • Single components with excessive outgoing edges (doing too much)

Limitations

  • Static analysis only — does not resolve dynamic imports or React.lazy() paths
  • Does not parse re-exports from barrel files (index.ts)
  • TypeScript path aliases other than @/ are not resolved
  • File must exist on disk (does not resolve virtual modules)

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.