Refactor high-complexity React components in Dify frontend. Use when `pnpm analyze-component...
npx skills add Sounder25/Google-Antigravity-Skills-Library --skill "Dependency Tree Mapping"
Install specific skill from multi-skill repository
# Description
Generate comprehensive dependency graphs to identify "single-points-of-failure" and impact analysis chains.
# SKILL.md
name: Dependency Tree Mapping
description: Generate comprehensive dependency graphs to identify "single-points-of-failure" and impact analysis chains.
version: 1.0.0
author: Antigravity Skills Library
created: 2026-01-16
leverage_score: 5/5
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 dependenciesshow dependency treecheck impact of <library>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:
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
- Build files must exist (package.json, *.csproj, pyproject.toml).
- Dependencies must be resolvable (e.g.,
npm listworks).
Implementation
Script: map_dependencies.ps1
- Detects Tech Stack: (Uses
WORKSPACE_PROFILE.jsonif available). - Extracts Graph:
- Node.js:
npm list --json - .NET:
dotnet list package --include-transitive(parsed) - Python:
pipdeptree --json(if installed) - Generates Mermaid: Transforms raw data into Mermaid syntax.
- Analyzes Risk: Calculates centrality of nodes to identify critical points.
Use Cases
- QA Auditing: Identifying "single-points-of-failure" where a single library version mismatch could crash the system.
- Refactoring: Knowing that changing "AuthService" impacts "UserDashboard", "AdminPanel", and "ReportingJob".
# Supported AI Coding Agents
This skill is compatible with the SKILL.md standard and works with all major AI coding agents:
Learn more about the SKILL.md standard and how to use these skills with your preferred AI coding agent.