12 dependency tree mapping

From Sounder25/Foundational-Agent-Skills · View interactive version

12 dependency tree mapping is an AI agent skill from the GitHub repository Sounder25/Foundational-Agent-Skills. Generate comprehensive dependency graphs to identify "single-points-of-failure" and impact analysis chains.

How to use this skill

Skill file

SKILL-012: Dependency Tree Mapping

Overview

Executes "Structural Awareness" by building a map of how different parts of the project rely on each other. It uses language-specific tools (nuget, pip, npm, cargo) to extract the graph and visualize it.

Trigger Phrases

Inputs

| Parameter | Type | Required | Default | Description |

|-----------|------|----------|---------|-------------|

| --workspace-path | string | No | Current directory | Root of the project |

| --depth | int | No | 3 | Depth of dependency recursion |

| --format | string | No | mermaid | Output format: mermaid, json, text |

Outputs

1. DEPENDENCY_GRAPH.mmd (Mermaid)

Visual graph ready for rendering:

graph TD
    A[Core.Engine] --> B[Utils.Math]
    A --> C[Utils.Logging]
    B --> D[External.NumPy]
    C --> E[External.Serilog]

2. RISK_REPORT.md

Analysis of the graph:

Preconditions

  1. Build files must exist (package.json, *.csproj, pyproject.toml).
  2. Dependencies must be resolvable (e.g., npm list works).

Implementation

Script: map_dependencies.ps1

  1. Detects Tech Stack: (Uses WORKSPACE_PROFILE.json if available).
  2. Extracts Graph:
  1. Generates Mermaid: Transforms raw data into Mermaid syntax.
  2. Analyzes Risk: Calculates centrality of nodes to identify critical points.

Use Cases

  1. QA Auditing: Identifying "single-points-of-failure" where a single library version mismatch could crash the system.
  2. Refactoring: Knowing that changing "AuthService" impacts "UserDashboard", "AdminPanel", and "ReportingJob".
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.