Nm Cartograph Dependency Graph

v1.0.0

Generate dependency graphs showing import relationships between modules or plugins

0· 64·1 current·1 all-time
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
The name/description (dependency graph) match the instructions: explore a codebase, extract imports, generate Mermaid syntax, and render via a Mermaid renderer. No unrelated binaries, env vars, or config paths are requested.
Instruction Scope
Instructions call a codebase-explorer agent to 'Explore [scope]' and to track internal/external imports — this necessarily requires reading repository files within the provided scope (expected). The SKILL.md does not instruct reading unrelated system files or credentials. Caution: the explorer will access all files in the given scope and could surface secrets present in the repo if they exist.
Install Mechanism
Instruction-only skill with no install spec and no code files, so nothing is written to disk or downloaded during install — minimal install risk.
Credentials
No environment variables, credentials, or config paths are required. Requested resources are proportionate to the stated purpose.
Persistence & Privilege
always:false and default model invocation are used. The skill can be invoked autonomously (platform default) but it does not request elevated or persistent privileges.
Assessment
This skill appears coherent and low-risk: it only needs access to the code you tell it to analyze and does not request credentials or install software. Before running, limit the 'scope' you pass to the codebase-explorer to the repository paths you want analyzed (avoid giving it a workspace that contains secrets or unrelated projects). Confirm the Mermaid renderer (MCP) is a trusted/rendering endpoint in your environment if you care about remote rendering. If you prefer extra safety, run the analysis on a sanitized copy of the repo or a sample project first.

Like a lobster shell, security has layers — review code before you run it.

Runtime requirements

🦞 Clawdis
latestvk97ck9wjrpcf68ytc4nf443g9n84m6xc
64downloads
0stars
1versions
Updated 1w ago
v1.0.0
MIT-0

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

Comments

Loading comments...