# Dependency Tree Mapping

> Generate comprehensive dependency graphs to identify "single-points-of-failure" and impact analysis chains.

- **Type:** Skill
- **Install:** `agentstack add skill-sounder25-foundational-agent-skills-12-dependency-tree-mapping`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [Sounder25](https://agentstack.voostack.com/s/sounder25)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** Apache-2.0
- **Upstream author:** [Sounder25](https://github.com/Sounder25)
- **Source:** https://github.com/Sounder25/Foundational-Agent-Skills/tree/main/12_dependency_tree_mapping

## Install

```sh
agentstack add skill-sounder25-foundational-agent-skills-12-dependency-tree-mapping
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# 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

- `map dependencies`
- `show dependency tree`
- `check impact of `
- `find point of failure`

## 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:
```mermaid
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:
- **Critical Nodes:** Libraries that >50% of the project depends on.
- **Cycle Detection:** Circular dependencies that might cause build failures.
- **Version Conflicts:** Multiple versions of the same library requested.

## 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:**
   - **Node.js**: `npm list --json`
   - **.NET**: `dotnet list package --include-transitive` (parsed)
   - **Python**: `pipdeptree --json` (if installed)
3. **Generates Mermaid:** Transforms raw data into Mermaid syntax.
4. **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".

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [Sounder25](https://github.com/Sounder25)
- **Source:** [Sounder25/Foundational-Agent-Skills](https://github.com/Sounder25/Foundational-Agent-Skills)
- **License:** Apache-2.0

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-sounder25-foundational-agent-skills-12-dependency-tree-mapping
- Seller: https://agentstack.voostack.com/s/sounder25
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
