build-dependency-graph

Build module-level dependency graphs with cycle and hub detection.

3|Updated Jan 25, 2026
One-click install
npx skills add https://github.com/kapilvirenahuja/garura --skill build-dependency-graph
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: build-dependency-graph
Source: https://github.com/kapilvirenahuja/garura/tree/main/core/components/skills/build-dependency-graph
Command: npx skills add https://github.com/kapilvirenahuja/garura --skill build-dependency-graph

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It solves the problem of not knowing how modules depend on each other and where cycles or hub modules create maintainability and delivery risks.

Core Features & Use Cases

  • Dependency graph generation: Systematically enumerate imports and build module-level edges for architectural visibility.
  • Cycle detection and hub identification: Detect strongly connected components and highlight modules with unusually high fan-in or fan-out.
  • Dual artifact emission: Produce both dependency-graph.yaml (structured data) and dependency-graph.md (Mermaid diagrams + module clusters) for sharing and review.

Quick Start

Use the build-dependency-graph skill to generate dependency-graph.yaml and dependency-graph.md for your repository into an output directory.

Frequently Asked Questions about build-dependency-graph

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

FAQPage Schema
How do I generate a module-level dependency graph for my codebase?

To generate a module-level dependency graph, this skill enumerates import and call relationships across source files, collapses file edges into module edges, and outputs structured YAML data alongside Mermaid-renderable Markdown diagrams.

How does cycle detection work for code dependencies and module clustering?

Cycle detection for code dependencies works by identifying strongly connected components within the module-level graph, highlighting circular dependencies and high fan-in or fan-out modules that create maintainability risks.

Can I visualize code imports as Mermaid diagrams for architectural reviews?

Yes, you can visualize code imports as Mermaid diagrams because the skill automatically generates a Markdown file containing Mermaid-renderable module clusters and dependency edges suitable for architectural reviews and sharing.

Does dependency graph generation work with multiple programming languages?

Yes, dependency graph generation applies to projects spanning multiple languages and code organization styles by reading source files to extract imports regardless of the specific programming language used.

What is the best way to plan refactoring using a dependency graph?

The best way to plan refactoring using a dependency graph is to leverage the generated structured YAML data to identify module hubs and cycles, enabling targeted impact analysis for architectural improvements.

What output files do I get when mapping codebase dependencies?

When mapping codebase dependencies, you receive two output files: dependency-graph.yaml containing structured module edge data, and dependency-graph.md containing Mermaid diagrams and module clusters for review.