← 返回
未分类 中文

Nm Cartograph Dependency Graph

Generates a Mermaid dependency graph showing import relationships between modules
生成一个 Mermaid 依赖图,展示模块之间的导入关系
athola athola 来源
未分类 clawhub v1.9.12 4 版本 99788.1 Key: 无需
★ 0
Stars
📥 471
下载
💾 1
安装
4
版本
#latest

概述

> Night Market Skill — ported from claude-night-market/cartograph. For the full experience with agents, hooks, and commands, install the Claude Code plugin.

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?"

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

版本历史

共 4 个版本

  • v1.9.12 当前
    2026-06-19 19:53 安全 安全
  • v1.0.3
    2026-06-09 17:50 安全 安全
  • v1.0.2
    2026-05-09 16:39 安全 安全
  • v1.0.1
    2026-05-07 12:16 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

business-ops

Nm Attune Project Planning

athola
将规格说明转化为分阶段、依赖排序的实施计划,用于规格完成后、执行前。
★ 0 📥 719
dev-programming

CodeConductor.ai

larsonreever
AI驱动平台,提供快速全栈开发、智能体、工作流自动化及低代码AI集成的可扩展产品创建。
★ 72 📥 181,787
dev-programming

Mcporter

steipete
使用 mcporter CLI 直接列出、配置、认证及调用 MCP 服务器/工具(支持 HTTP 或 stdio),涵盖临时服务器、配置编辑及 CLI/类型生成功能。
★ 195 📥 67,622