360 Secure SkillHub
360 安全技能中心

Dep Graph

核心功能:自动识别Node.js、Python等6类多语言项目的依赖配置文件,分析依赖关系,支持按生产/开发等分组展示,可控制版本显示。典型场景:查看项目依赖列表、对比不同类型依赖、审计依赖数量。输入支持指定项目路径、类型、输出格式等参数;输出可选树状视图、统计摘要或JSON,适配人工查看或程序处理。基于Python3.8+,无需额外依赖。

johnnywang2001
johnnywang2001
热度 41.77
最近更新 2026-05-11 17:35:58
分类:开发依赖:代码执行 / 读写文件应用场景:DevOps / 数据处理

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add dep-graph
Metadata
name
dep-graph
description
Analyze and visualize project dependency trees from manifest files. Supports Node.js (package.json), Python (requirements.txt, pyproject.toml), Go (go.mod), Rust (Cargo.toml), Ruby (Gemfile), and PHP (composer.json). Use when asked to list dependencies, show a dependency tree, check what packages a project uses, compare prod vs dev deps, or audit dependency counts.

Dep Graph

Parse and display project dependency trees from manifest files. Auto-detects project type.

Quick Start

# Analyze current project
python3 scripts/dep_graph.py

# Analyze specific directory
python3 scripts/dep_graph.py /path/to/project

# JSON output
python3 scripts/dep_graph.py --json

# Summary only (just counts)
python3 scripts/dep_graph.py --summary

# Force project type
python3 scripts/dep_graph.py --type node

# Hide version constraints
python3 scripts/dep_graph.py --no-versions

Supported Project Types

Type Manifest File Groups
Node.js package.json production, dev, peer
Python requirements.txt production
Python pyproject.toml production
Go go.mod production, indirect
Rust Cargo.toml production, dev
Ruby Gemfile production, dev
PHP composer.json production, dev

Auto-detects multiple manifest files in the same project and reports all.

Output

Tree view shows dependencies grouped by type (production/dev/peer) with version constraints. Use --json for programmatic processing or --summary for quick counts.

Dependencies

  • Python 3.8+ (stdlib only, no pip packages needed)