Token导航 LogoToken导航TokenDH.com
研究检索操作浏览器github未标认证来源可访问clear审计通过

pnpm-dependency-analysispnpm 依赖分析

Agent Skill

pnpm-dependency-analysis 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

832

周安装

34

GitHub Stars

9

下载量

267
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:pnpm-dependency-analysis(pnpm 依赖分析)
来源仓库:https://github.com/equinor/fusion-framework
仓库路径:skills/pnpm-dependency-analysis
安装命令:
npx skills add https://github.com/equinor/fusion-framework --skill pnpm-dependency-analysis
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/equinor/fusion-framework --skill pnpm-dependency-analysis

简介

pnpm-dependency-analysis 用于查找、检索和筛选相关信息。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中根据关键词、任务场景或来源线索快速定位候选结果。
  • 通过 npx skills add 命令从指定 GitHub 仓库安装并使用该技能。
  • 安装前需确认权限范围和维护状态,注意可能触发的联网、命令执行或文件读写操作。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

pnpm Dependency Analysis Skill (Fusion Framework)

Helps answer:

  • Where is PACKAGE used (direct & transitive)?
  • What real versions are resolved across workspaces?
  • Which workspaces depend on each other (forward/reverse graph)?
  • What's the blast radius / risk level for an upgrade or patch?

All commands run from the root of the repository. Replace PACKAGE with the real name (e.g., lodash, zod, @tanstack/react-query, eslint).

1. Core: Where is this package used?

Direct usages only (fastest & cleanest)

pnpm why PACKAGE --recursive --depth=0

Shows only workspaces that list PACKAGE in dependencies, devDependencies, peerDependencies, or optionalDependencies.

Full dependency tree (transitive paths)

pnpm why PACKAGE --recursive --long

Shows how PACKAGE gets pulled in indirectly through other dependencies.

Resolved versions per workspace (critical for upgrades)

pnpm why PACKAGE --recursive --json \
  | jq -r '.[] | "\(.workspace)\t→ \(.version)\t\(.dependencyType // "unknown")\t\(.from // "-")"'

Why this matters:

  • See all versions resolved across workspaces (handles overrides, workspace:*, catalog)
  • Identify version inconsistencies or conflicts
  • Understand if workspace protocol controls the version

2. Workspace → Workspace Dependency Graph

Which workspaces depend on each other (direct only)

pnpm recursive list --depth=0 --json --only-projects \
  | jq 'to_entries[]
      | {from: .key, to: (.value.dependencies // {} | keys + (.value.devDependencies // {} | keys) + (.value.peerDependencies // {} | keys))}
      | select(.to | length > 0)'

Shows the project-level dependency structure (e.g., which @equinor/fusion-framework-* packages depend on others).

Generate Mermaid-compatible edges (paste into GitHub PR/comments)

pnpm -r exec -- jq -r 'select(.dependencies != null or .devDependencies != null or .peerDependencies != null)
  | .name as $self
  | (.dependencies // {} | keys) + (.devDependencies // {} | keys) + (.peerDependencies // {} | keys)
  | .[] as $dep
  | "\($self) --> \($dep)"' | sort | uniq

Example Mermaid output (copy the edges into a code block with ``` `mermaid ```):

graph LR
  @equinor/fusion-framework-cli --> @equinor/fusion-framework-utils
  @equinor/fusion-framework-react --> @equinor/fusion-framework-core
  @equinor/fusion-framework-react --> @equinor/fusion-framework-utils

Paste into GitHub issue, PR description, or mermaid.live for interactive view.

3. One-liner investigation report

PACKAGE=some-package

echo "=== Direct usages ==="
pnpm why "$PACKAGE" --recursive --depth=0

echo -e "\n=== Resolved versions ==="
pnpm why "$PACKAGE" --recursive --json \
  | jq -r '.[] | "\(.workspace)\t→ \(.version)\t\(.dependencyType)"'

echo -e "\n=== package.json mentions ==="
grep -rl "$PACKAGE" packages/ apps/ || echo "None"

echo -e "\n=== Config/tooling mentions (eslint/vite/vitest/storybook/etc) ==="
find . -type f \( -name 'eslint.*' -o -name 'vite.*' -o -name 'vitest.*' \
  -o -name 'playwright.*' -o -name 'storybook.*' -o -name 'tsconfig*.json' \
  -o -name 'next.config.*' \) \
  -exec grep -l "$PACKAGE" {} \; | grep -vE 'node_modules|dist|build|.turbo|.cache' || echo "None"

Produces a clean summary of where the package appears across the monorepo.

4. Risk / Blast Radius Reference Table

IndicatorRisk LevelNotes
1–2 workspaces onlyLowLimited scope
≥ 6–8 workspacesHighWidespread impact
Only in devDependenciesLowerUnless tooling: eslint, typescript, vite, vitest, jest, rollup, playwright, storybook
Uses workspace:* or workspace:^x.y.zVery LowControlled at workspace root
Many different resolved versionsMediumMay need pnpm.overrides or .npmrc resolutions
Hub node (many packages → it)HighCore shared dependency
Deep/long chains in pnpm whyMedium–HighTransitive dependency risks
Appears in multiple config filesMediumTooling change affects lint/format/build

5. Narrowing search with --filter

Scope down large investigations by focusing on specific package groups:

# Only check /packages/* (not cookbooks, etc)
pnpm why PACKAGE --recursive --filter="./packages/*"

# Only check /apps/*
pnpm why PACKAGE --recursive --filter="./apps/*"

# Only check React packages
pnpm why PACKAGE --recursive --filter="@equinor/fusion-framework-react"

Tips & Notes

  • Prerequisites: jq (recommended, for JSON parsing). Built-in tools (grep, find) are used for file searches
  • Faster searches: Install rg (ripgrep) to speed up searches: brew install ripgrep (optional, not required)
  • Mermaid visualization: If you have many edges, ask Copilot to clean up the output or use mermaid.live with an interactive filter
  • Interactive workspace graph: pnpm install -g pnpm-workspace-graph → run pnpm-workspace-graph to open an interactive browser view
  • For Dependabot PRs: Run this skill *before* merging to gauge impact and gather context for your review
  • Pair with other skills: Combine with security-audit, changelog-lookup, or version-compatibility checks for full triage

Common Dependabot Scenarios

"Should I merge this React upgrade?"

  1. Run: pnpm why @latest/react --recursive --depth=0
  2. Check if versions are consistent across workspaces
  3. Look at packages/react/ CHANGELOG for breaking changes
  4. If only in devDependencies or 1–2 packages, lower risk

"Can I upgrade this shared utility?"

  1. Run: pnpm why @equinor/fusion-framework-utils --recursive
  2. Count affected workspaces
  3. Check if workspace protocol is used (workspace:*)
  4. If yes and ≤3 packages depend on it: safe
  5. If no and >5 packages: run tests before merge

"What about this obscure transitive dep?"

  1. Run: pnpm why some-obscure-package --recursive --long
  2. Look at (.from) field to see which package pulled it in
  3. Check if it appears in only one place in the tree
  4. If it's behind a single package, upgrading that package is safe

For questions or improvements: Refer to pnpm docs or the Fusion Framework contributing guide.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenCode

30.6%
按下载量换算82

Gemini CLI

24.9%
按下载量换算66

Antigravity

17.1%
按下载量换算46

Claude Code

11.86%
按下载量换算32

Codex

6.91%
按下载量换算18

windsurf

3.71%
按下载量换算10

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills