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
- michelve/hugin-coworkedited, first seen Mar 16, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 1
- michelve/hugin-cowork★ 187% same
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository30 other files it gives its agents.
- skills/react-best-practices/AGENTS.mdAGENTS.md
- accessibilitySkill
- adr-writerSkill
- automatic-code-reviewSkill
- create-tasksSkill
- dsai-componentsSkill
- dsai-figmaSkill
- dsai-stylingSkill
- dsai-toolsSkill
- figma-code-connect-componentsSkill
- figma-create-design-system-rulesSkill
- figma-create-new-fileSkill
- figma-generate-designSkill
- figma-generate-librarySkill
- figma-implement-designSkill
- figma-useSkill
- miro-mcpSkill
- nodejsSkill
- playwright-skillSkill
- prismaSkill
- react-best-practicesSkill
- reactSkill
- route-testerSkill
- setupSkill
- skill-creatorSkill
- skill-developerSkill
- sync-schemasSkill
- task-checkSkill
- web-design-guidelinesSkill
- writing-testsSkill
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
- Distinctive: line 24
Run the visualization script from the project root:
- Very specific: line 88
Does not parse re-exports from barrel files (index.ts)
≈ “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.
Files
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.htmlGraph 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
- Blue: Route 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
| Directory | Category | Purpose |
src/client/components/ui/ | UI (DSAI) | DSAI components (installed via dsai add) |
src/client/components/ | Component | Project feature components |
src/client/routes/ | Route | TanStack 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)
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
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.

