跳到主要内容
知仓学习社ZHICANG

dependency-conflict-resolver

Resolve a dependency or version conflict (npm, pip, yarn, pnpm, Maven, Go modules) step by step. Use when an install fails with peer-dependency or v…

不碰外部(只输出文字)无严重或高危命中mohitagw15856/pm-claude-skills

它会碰到什么

扫了多少1 个文本文件,3 KB
它会碰到什么不碰外部(只输出文字)
命中总数0 处
命中统计严重 0 · 高 0 · 中 0 · 低 0

这一栏是扫描器报的事实,不是结论。命中多不等于有毒(安全工具、规则库、示例脚本本来就会包含危险写法),命中少也不等于干净。它和你手上的凭据、文件、网络有什么关系,需要你自己看。

技能内容

Dependency Conflict Resolver Skill

Untangle "could not resolve dependency" hell into a clear, ranked plan.

Working from a brief

Infer the package manager and ecosystem from the error or files mentioned; label assumptions (assumed — confirm). Always deliver a concrete resolution path even from just the error text.

Input

Ask for these if not provided:

  • The install error — the conflict output exactly as the tool printed it
  • The manifest — package.json, requirements.txt, go.mod, pom.xml, whichever applies
  • The lockfile — if one exists, since it is usually where the conflict is pinned
  • The package manager — npm, pnpm, yarn, pip, Maven, Go modules; infer what's missing

Output Structure

The conflict

Plain-English: package A needs X of C, package B needs Y of C, and they can't both be satisfied (name the actual packages/versions from the input).

Options (ranked by safety)

  1. Safest — e.g. align versions, upgrade the constrained package, or find a compatible range. Exact command.
  2. Pragmatic — e.g. an override/resolution (overrides, resolutions, constraints file) with the exact snippet — and the risk it carries.
  3. Last resort — e.g. --legacy-peer-deps / --force — clearly flagged as masking the problem, not fixing it.

Give the exact commands/edits for each, and a recommendation of which to pick and why.

Verify & prevent

How to confirm the fix (npm ls <pkg>, a clean reinstall, the build), and one habit to avoid recurrence (lockfile committed, renovate/dependabot, version pinning policy).

Quality Checks

  • [ ] Names the actual conflicting packages and versions from the input
  • [ ] Options are ranked by safety with the trade-off of each stated
  • [ ] --force/--legacy-peer-deps-style escapes are flagged as masking, not fixing
  • [ ] Includes a verification step

Anti-Patterns

  • [ ] Do not lead with --force / --legacy-peer-deps — it hides the conflict and breaks later
  • [ ] Do not delete the lockfile as the first move — explain what that actually does
  • [ ] Do not give a single fix when several are viable — rank them with trade-offs
  • [ ] Do not skip verifying the resolution actually installs/builds

想直接用这个技能?

本站把开放许可(MIT / Apache 等)的技能按仓库打包整理到网盘,点一下转存到你自己的网盘,不用一个个从 GitHub 拉。许可未声明的技能只给原始仓库链接,不打包。

同名技能的其他版本

有 3 个不同仓库或目录里都有叫 dependency-conflict-resolver 的技能。它们内容并不相同,别混用: