dep-graph

Detect circular dependencies and high-coupling modules in TypeScript/JavaScript import graphs.

11|Updated Apr 16, 2026
One-click install
npx skills add https://github.com/berkcangumusisik/claude-code-practices --skill dep-graph
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dep-graph
Source: https://github.com/berkcangumusisik/claude-code-practices/tree/main/skills/dep-graph
Command: npx skills add https://github.com/berkcangumusisik/claude-code-practices --skill dep-graph

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The dep-graph skill helps developers quickly identify circular dependencies and high-coupling modules in a codebase, enabling safer refactoring and better modular design.

Core Features & Use Cases

  • Circular dependency detection: Find cycles in import graphs across modules and suggest breakpoints.
  • Coupling analysis: Highlight modules with high fan-in/fan-out to locate risky design cells.
  • Use Case: When adding a new feature, scan the codebase to ensure new dependencies won't introduce cycles and to plan safe module boundaries.

Quick Start

Run the skill with an entry file, for example src/index.ts, to generate a dependency graph and report circular imports.

Frequently Asked Questions about dep-graph

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

FAQPage Schema
How do I find circular imports in a TypeScript project?

Finding circular imports in a TypeScript project requires analyzing the module dependency graph to detect cycles. This involves scanning import statements across your codebase to identify interdependent modules and providing actionable refactor guidance to break those cycles.

What is module coupling analysis and when do I need it?

Module coupling analysis identifies high fan-in and fan-out dependencies to locate risky design cells in your codebase. You need this when adding new features or planning refactoring to ensure new dependencies do not introduce cycles and to help establish safe module boundaries.

Can I analyze JavaScript dependencies across different build tools and frameworks?

Yes, you can analyze JavaScript dependencies across different build tools and frameworks. The analysis applies to projects with multiple interdependent modules, enabling quick discovery of problematic import graphs regardless of the specific build setup used.

How do I generate a dependency graph for a JavaScript codebase?

To generate a dependency graph for a JavaScript codebase, run an analysis targeting an entry file like src/index.ts. This produces an actionable visualization of import relationships and reports circular imports to help plan safe module boundaries.

How do I locate high-coupling modules for safer refactoring?

To locate high-coupling modules for safer refactoring, perform a coupling analysis to highlight modules with high fan-in and fan-out. This identifies risky design cells in your import graph, enabling you to plan safe module boundaries and avoid introducing cycles.