Skip to content
Development
Skill

/dependency-graph

Generates a Mermaid dependency graph showing import relationships between modules. Use when analyzing coupling, finding circular deps, or planning refactors.

From plugin
claude-night-market
343200 skills60 agents162 commands1 MCP

Claude Code

$ npx -y skills add athola/claude-night-market --skill dependency-graph --agent claude-code

SKILL.md

dependency-graph.SKILL.md
name: dependency-graph
description: Generates a Mermaid dependency graph showing import relationships between modules. Use when analyzing coupling, finding circular deps, or planning refactors.

Dependency Graph

Generate a Mermaid flowchart showing import and dependency relationships between modules, packages, or plugins.

When To Use

  • Understanding what depends on what
  • Finding circular dependencies
  • Analyzing coupling between modules
  • Planning refactoring by seeing dependency impact
  • Answering "what breaks if I change this?"

When NOT To Use

  • Runtime call paths (use `cartograph:call-chain`)
  • Type hierarchies (use `cartograph:class-diagram`)

Workflow

Step 1: Explore the Codebase

Dispatch the codebase explorer agent:

Agent(cartograph:codebase-explorer)
Prompt: Explore [scope] and return a structural model.
Focus on import statements and cross-module dependencies
for a dependency graph. Track both internal and external
imports.

Step 2: Generate Mermaid Syntax

Transform the structural model into a Mermaid flowchart with directed edges representing dependencies.

**Rules for dependency graphs**:

  • Use `flowchart LR` (left-right) for dependency direction
  • Each node is a module or package
  • Edges point from dependent to dependency (A --> B means

"A depends on B")

  • Color-code by dependency type:
  • Default arrows for internal dependencies
  • Dotted arrows (`-.->`) for external/optional deps
  • Thick arrows (`==>`) for critical path dependencies
  • Group into subgraphs by package/plugin
  • If depth parameter given, limit transitive dependencies
  • Highlight circular dependencies with red styling

**Example output**:

flowchart LR
    subgraph sanctum[Sanctum]
        commit[commit]
        pr_prep[pr_prep]
        workspace[workspace]
    end

    subgraph leyline[Leyline]
        git[git_platform]
        errors[error_patterns]
    end

    subgraph external[External]
        subprocess[subprocess]
        json[json]
    end

    commit --> git
    commit --> json
    pr_prep --> workspace
    pr_prep --> git
    workspace --> errors
    workspace -.-> subprocess

Step 3: Render via MCP

Call the Mermaid Chart MCP to render:

mcp__claude_ai_Mermaid_Chart__validate_and_render_mermaid_diagram
  prompt: "Dependency graph of [scope]"
  mermaidCode: [generated syntax]
  diagramType: "flowchart"
  clientName: "claude-code"

If rendering fails, fix syntax and retry (max 2 retries).

Step 4: Present Results

Show the rendered diagram with analysis notes:

  • Total modules and dependency count
  • Most-depended-on modules (high fan-in)
  • Modules with most dependencies (high fan-out)
  • Circular dependencies if any detected

Exit Criteria

  • [ ] Mermaid `flowchart LR` syntax generated with directed edges

from dependent to dependency (A --> B means "A depends on B")

  • [ ] `mcp__claude_ai_Mermaid_Chart__validate_and_render_mermaid_diagram`

called and returns without error

  • [ ] Analysis notes include total module count, highest fan-in modules,

and highest fan-out modules

  • [ ] Circular dependencies, if detected, are highlighted with red

styling and listed explicitly in the analysis notes

  • [ ] External dependencies use dotted arrows (`-.->`) distinct from

internal dependency arrows

Read more
@athola
Ships withclaude-night-market

A plugin marketplace for Claude Code. Install only the plugins you need to run git workflows, code review, spec-driven development, and autonomous agents from inside your Claude Code session.

343200 skills60 agents1 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
343
Star history of athola/claude-night-market on GitHub, a chart by star-history.com

Other skills on claude-night-market.

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills10d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc12d293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react1d252k
@facebook@facebookInstall Skill

Questions about dependency-graph.

Which coding agents can use dependency-graph?
dependency-graph installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.