arch-lens-module-dependency

Analyze module import relationships and generate a Mermaid dependency diagram.

1|Updated Feb 14, 2026
One-click install
npx skills add https://github.com/Trecek/useful-claude-skills --skill arch-lens-module-dependency
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: arch-lens-module-dependency
Source: https://github.com/Trecek/useful-claude-skills/tree/main/.claude/skills/arch-lens-module-dependency
Command: npx skills add https://github.com/Trecek/useful-claude-skills --skill arch-lens-module-dependency

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Visualize and analyze module dependencies to reveal coupling patterns, layering, and fan-in/fan-out for a software project.

Core Features & Use Cases

  • Analyze import relationships across modules to identify valid vs. cross-layer dependencies.
  • Generate a Mermaid diagram representing the module dependency graph and highlight high fan-in modules.
  • Detect circular dependencies and layering violations to inform safe refactoring.

Quick Start

Invoke this skill to generate a module-dependency diagram for your project, focusing on import relationships and layering.

Frequently Asked Questions about arch-lens-module-dependency

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I visualize circular dependencies and module coupling in my project?

To visualize circular dependencies and module coupling, analyze import relationships across top-level modules to generate a Mermaid diagram. This diagram maps fan-in and fan-out patterns, highlighting structural violations for refactoring.

How do I detect layering violations using import relationships?

Detect layering violations by analyzing import relationships across top-level modules to identify cross-layer dependencies. The process enforces layering rules and flags invalid imports, enabling safe architectural refactoring.

Can I generate a Mermaid diagram to map top-level module dependencies?

Yes, you can generate a Mermaid diagram to map top-level module dependencies. It analyzes import relationships and computes fan-in and fan-out to output a visual representation of your software project's coupling patterns.

What is the best way to identify high fan-in modules for refactoring?

Identifying high fan-in modules requires analyzing import relationships to compute fan-in and fan-out across your architecture. The resulting Mermaid diagram highlights these heavily coupled modules to inform safe refactoring.

Why does my software project have circular dependencies and how can I map them?

Circular dependencies arise from recursive import relationships between modules. You can map them by analyzing top-level module imports to detect circular dependencies, outputting a Mermaid diagram that reveals these coupling patterns.