Token导航 LogoToken导航TokenDH.com
开发需要联网github未标认证来源可访问clear审计提醒

dev-dependency-management开发依赖管理

Agent Skill

dev-dependency-management 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

2,305

周安装

99

GitHub Stars

60

下载量

808
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/vasilyu1983/ai-agents-public --skill dev-dependency-management

简介

dev-dependency-management 提供现代依赖管理规范,涵盖锁文件策略、安全扫描、语义版本控制等内容。

  • 适用于添加新依赖、更新版本、解决冲突及审计供应链安全的场景。
  • 推荐采用 pnpm/Nx/Turborepo 等工具优化 monorepo 管理效率。
  • 使用前应评估项目规模和安全等级,选择匹配的自动化策略组合。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Dependency Management — Production Patterns

Modern Best Practices (January 2026): Lockfile-first workflows, automated security scanning (Dependabot, Snyk, Socket.dev), semantic versioning, minimal dependencies principle, monorepo workspaces (pnpm, Nx, Turborepo), supply chain security (SBOM, AI BOM, Sigstore), reproducible builds, and AI-generated code validation.


When to Use This Skill

The agent should invoke this skill when a user requests:

  • Adding new dependencies to a project
  • Updating existing dependencies safely
  • Resolving dependency conflicts or version mismatches
  • Auditing dependencies for security vulnerabilities
  • Understanding lockfile management and reproducible builds
  • Setting up monorepo workspaces (pnpm, npm, yarn)
  • Managing transitive dependencies and overrides
  • Choosing between similar packages (bundle size, maintenance, security)
  • Dependency version constraints and semantic versioning
  • Dependency security best practices and supply chain security
  • Troubleshooting "dependency hell" scenarios
  • Package manager configuration and optimization
  • Creating reproducible builds across environments

Quick Reference

TaskTool/CommandKey ActionWhen to Use
Install from lockfilenpm ci, poetry install, cargo buildClean install, reproducibleCI/CD, production deployments
Add dependencynpm install <pkg>, poetry add <pkg>Updates lockfile automaticallyNew feature needs library
Update dependenciesnpm update, poetry update, cargo updateUpdates within version constraintsMonthly/quarterly maintenance
Check for vulnerabilitiesnpm audit, pip-audit, cargo auditScans for known CVEsBefore releases, weekly
View dependency treenpm ls, pnpm why, pipdeptreeShows transitive dependenciesDebugging conflicts
Override transitive depoverrides (npm), pnpm.overridesForce specific versionSecurity patch, conflict resolution
Monorepo setuppnpm workspaces, npm workspacesShared dependencies, cross-linkingMulti-package projects
Check outdatednpm outdated, poetry show --outdatedLists available updatesPlanning update sprints

Decision Tree: Dependency Management

User needs: [Dependency Task]
    ├─ Adding new dependency?
    │   ├─ Check: Do I really need this? (Can implement in <100 LOC?)
    │   ├─ Check: Is it well-maintained? (Last commit <6 months, >10k downloads/week)
    │   ├─ Check: Bundle size impact? (Use Bundlephobia for JS)
    │   ├─ Check: Security risks? (`npm audit`, Snyk)
    │   └─ If all checks pass → Add with `npm install <pkg>` → Commit lockfile
    │
    ├─ Updating dependencies?
    │   ├─ Security vulnerability? → `npm audit fix` → Test → Deploy immediately
    │   ├─ Routine update?
    │       ├─ Patch versions → `npm update` → Safe, do frequently
    │       ├─ Minor/major → Check CHANGELOG → Test in staging → Update gradually
    │       └─ All at once → [FAIL] RISKY → Update in batches instead
    │
    ├─ Dependency conflict?
    │   ├─ Transitive dependency issue?
    │       ├─ View tree: `npm ls <package>`
    │       ├─ Use overrides sparingly: `overrides` in package.json
    │       └─ Document why override is needed
    │   └─ Peer dependency mismatch?
    │       └─ Check version compatibility → Update parent or child
    │
	├─ Monorepo project?
	│   ├─ Use pnpm workspaces (recommended default)
	│   ├─ Shared deps → Root package.json
	│   ├─ Package-specific → Package directories
	│   └─ Use Nx or Turborepo for task caching
	│
	└─ Choosing package manager?
	    ├─ New JS project → **pnpm** (recommended default) or **Bun** (often faster; verify ecosystem maturity)
	    ├─ Enterprise monorepo → **pnpm** (mature workspace support)
	    ├─ Speed-focused experimentation → **Bun** (verify ecosystem maturity)
	    ├─ Existing npm project → Migrate to pnpm or stay (check team preference)
	    ├─ Python → **uv** (fast), Poetry (mature), pip+venv (simple)
	    └─ Data science → **conda** or **uv** (faster environment setup)

Navigation: Core Patterns

Lockfile Management

references/lockfile-management.md

Lockfiles ensure reproducible builds by recording exact versions of all dependencies (direct + transitive). Essential for preventing "works on my machine" issues.

  • Golden rules (always commit, never edit manually, regenerate on changes)
  • Commands by ecosystem (npm ci, poetry install, cargo build)
  • Troubleshooting lockfile conflicts
  • CI/CD integration patterns

Semantic Versioning (SemVer)

references/semver-guide.md

Understanding version constraints (^, ~, exact) and how to specify dependency ranges safely.

  • SemVer format (MAJOR.MINOR.PATCH)
  • Version constraint syntax (caret, tilde, exact)
  • Recommended strategies by project type
  • Cross-ecosystem version management

Dependency Security Auditing

references/security-scanning.md

Automated security scanning, vulnerability management, and supply chain security best practices.

  • Automated tools (Dependabot, Snyk, GitHub Advanced Security)
  • Running audits (npm audit, pip-audit, cargo audit)
  • CI integration and alert configuration
  • Incident response workflows

Dependency Selection

references/dependency-selection-guide.md

Deciding whether to add a new dependency and choosing between similar packages.

  • Minimal dependencies principle (best dependency is the one you don't add)
  • Evaluation checklist (maintenance, bundle size, security, alternatives)
  • Choosing between similar packages (comparison matrix)
  • When to reject a dependency

Update Strategies

references/update-strategies.md

Keeping dependencies up to date safely while minimizing breaking changes and security risks.

  • Update strategies (continuous, scheduled, security-only)
  • Safe update workflow (check outdated, categorize risk, test, deploy)
  • Automated update tools (Dependabot, Renovate, npm-check-updates)
  • Handling breaking changes and rollback plans

Monorepo Management

references/monorepo-patterns.md

Managing multiple related packages in a single repository with shared dependencies.

  • Workspace tools (pnpm, npm, yarn workspaces)
  • Monorepo structure and organization
  • Build optimization (Nx, Turborepo)
  • Versioning and publishing strategies

Transitive Dependencies

references/transitive-dependencies.md

Dealing with dependencies of your dependencies (indirect dependencies).

  • Viewing dependency trees (npm ls, pnpm why, pipdeptree)
  • Resolving transitive conflicts (overrides, resolutions, constraints)
  • Security risks and version conflicts
  • Best practices (use sparingly, document, test)

Ecosystem-Specific Guides

references/ecosystem-guides.md

Language and package-manager-specific best practices.

  • Node.js (npm, yarn, pnpm comparison and best practices)
  • Python (pip, poetry, conda)
  • Rust (cargo), Go (go mod), Java (maven, gradle)
  • PHP (composer),.NET (nuget)

Anti-Patterns

references/anti-patterns.md

Common mistakes to avoid when managing dependencies.

  • Critical anti-patterns (not committing lockfiles, wildcards, ignoring audits)
  • Dangerous anti-patterns (never updating, deprecated packages)
  • Moderate anti-patterns (overusing overrides, ignoring peer deps)

Container Dependency Patterns

references/container-dependency-patterns.md

Managing dependencies in containerized environments (Docker, OCI).

  • Multi-stage builds, layer caching, base image selection
  • Runtime vs build dependencies, image scanning, reproducible images

Version Conflict Resolution

references/version-conflict-resolution.md

Systematic approaches to resolving dependency version conflicts.

  • Diamond dependency problems, resolution algorithms by ecosystem
  • Override strategies, compatibility matrices, migration paths

License Compliance

references/license-compliance.md

Open-source license management and compliance automation.

  • License compatibility matrix, copyleft vs permissive, SPDX identifiers
  • Automated scanning (FOSSA, license-checker), policy enforcement in CI

Navigation: Templates

Node.js

assets/nodejs/

Python

assets/python/

Automation

assets/automation/


Supply Chain Security

assets/automation/template-supply-chain-security.md — Production-grade dependency security covering SBOM generation (CycloneDX/SPDX), provenance and attestation (SLSA, Sigstore), vulnerability management SLAs, upgrade playbooks, and EU Cyber Resilience Act requirements.

Key rules: generate SBOM per release, sign artifacts (Sigstore/cosign), run audit scans in CI, fix critical CVEs within 24 hours, use npm ci (never npm install) in pipelines, batch non-security updates by risk level.

Related templates:


AI-Generated Dependency Risks

WARNING: AI coding agents can introduce vulnerable or non-existent packages at scale (Endor Labs, 2025).

The Problem

AI tools accelerate coding but introduce supply chain risks:

  • Hallucinated packages — AI suggests packages that don't exist (typosquatting vectors)
  • Vulnerable dependencies — AI recommends outdated or CVE-affected versions
  • Unnecessary dependencies — AI over-relies on packages for simple tasks

Best Practices

DoDon't
Treat AI-generated code as untrusted third-party inputBlindly accept AI dependency suggestions
Enforce same SAST/SCA scanning for AI-generated codeSkip security review for "AI-written" code
Verify all AI-suggested packages actually existTrust AI to know current package versions
Integrate security tools into AI workflows (MCP)Allow AI to add dependencies without review
Vet MCP servers as part of supply chainUse unvetted AI integrations

Validation Checklist

Before accepting AI-suggested dependencies:

  • Package exists on registry (npm, PyPI, crates.io)
  • Package name is spelled correctly (no typosquatting)
  • Version is current and maintained
  • npm audit / pip-audit shows no vulnerabilities
  • Weekly downloads >1000 (established package)
  • Last commit <6 months (actively maintained)

Optional: AI/Automation

Note: AI assists with triage but security decisions need human judgment.
  • Automated PR triage — Categorize dependency updates by risk
  • Changelog summarization — Summarize breaking changes in updates
  • Vulnerability correlation — Link CVEs to affected packages

Bounded Claims

  • AI cannot determine business risk acceptance
  • Automated fixes require security team review
  • Vulnerability severity context needs human validation

Quick Decision Matrix

ScenarioRecommendation
Adding new dependencyCheck Bundlephobia, npm audit, weekly downloads, last commit
Updating dependenciesUse npm outdated, update in batches, test in staging
Security vulnerability foundUse npm audit fix, review CHANGELOG, test, deploy immediately
Monorepo setupUse pnpm workspaces or Nx/Turborepo for build caching
Transitive conflictUse overrides sparingly, document why, test thoroughly
Choosing JS package managerpnpm (fastest, disk-efficient), Bun (7× faster), npm (most compatible)
Python environmentuv (10-100× faster), Poetry (mature), pip+venv (simple), conda (data science)

Core Principles

1. Always Commit Lockfiles

Lockfiles ensure reproducible builds across environments. Never add them to .gitignore.

Exception: Don't commit Cargo.lock for Rust libraries (only for applications).

2. Use Semantic Versioning

Use caret (^) for most dependencies, exact versions for mission-critical, avoid wildcards (*). See references/semver-guide.md for constraint syntax and strategies.

3. Audit Dependencies Regularly

Run npm audit / pip-audit / cargo audit weekly; fix critical vulnerabilities immediately. See references/security-scanning.md.

4. Minimize Dependencies

The best dependency is the one you don't add. Ask: Can I implement this in <100 LOC? See references/dependency-selection-guide.md.

5. Update Regularly

Update monthly or quarterly in batches — do not update all at once. See references/update-strategies.md.

6. Use Overrides Sparingly

Only override transitive dependencies for security patches or conflicts. Document why in a comment (// CVE-2023-xxxxx fix). See references/transitive-dependencies.md.


Related Skills

For complementary workflows and deeper dives:


External Resources

See data/sources.json for curated resources:

  • Package managers: npm, pnpm, Yarn, pip, Poetry, Cargo, Go modules, Maven, Composer
  • Semantic versioning: SemVer spec, version calculators, constraint references
  • Security tools: Snyk, Dependabot, GitHub Advanced Security, OWASP Dependency-Check, pip-audit, cargo-audit, Socket.dev, Renovate
  • Lockfile management: Official docs for package-lock.json, poetry.lock, Cargo.lock, pnpm-lock.yaml
  • Monorepo tools: pnpm workspaces, npm workspaces, Yarn workspaces, Nx, Turborepo, Lerna, Bazel
  • Analysis tools: Bundlephobia, npm-check-updates, depcheck, pipdeptree, cargo tree
  • Supply chain security: SLSA framework, SBOM (CISA), Sigstore, npm provenance, OpenSSF Scorecard
  • Best practices: npm/Poetry/Cargo guides, ACM Queue articles, dependency hell references
  • Version management: nvm, pyenv, rustup, asdf
  • Learning resources: npm guides, Python Packaging User Guide, Rust Book, Monorepo.tools

Usage Notes

For Codex / Claude Code:

  • Use this skill when users need dependency management guidance
  • Reference specific resources based on the task (lockfiles, security, updates)
  • Provide ecosystem-specific guidance (Node.js, Python, Rust)
  • Always recommend security audits and reproducible builds
  • Encourage minimal dependencies and regular updates
  • Link to templates for common configurations

Best Practices:

  • Always commit lockfiles (except Cargo.lock for libraries)
  • Use semantic versioning (caret for most deps, exact for critical)
  • Audit dependencies weekly (npm audit, pip-audit, cargo audit)
  • Update dependencies monthly or quarterly (not all at once)
  • Choose package manager based on project needs (pnpm for speed, Poetry for Python apps)
  • Document dependency choices in ADRs (Architecture Decision Records)

Success Criteria: Dependencies are minimal, well-maintained, secure, reproducible across environments, and regularly audited for vulnerabilities.

Trend Awareness Protocol

IMPORTANT: When users ask recommendation questions about package managers, dependency tools, or supply chain security, you MUST use WebSearch to check current trends before answering.

Trigger Conditions

  • "What's the best package manager for [ecosystem]?"
  • "What should I use for [dependency management/security]?"
  • "What's the latest in dependency management?"
  • "Current best practices for [npm/pnpm/Poetry]?"
  • "Is [tool/approach] still relevant in 2026?"
  • "[pnpm] vs [npm] vs [yarn]?"
  • "Best dependency security scanner?"

Required Searches

  1. Search: "dependency management best practices 2026"
  2. Search: "[specific tool] vs alternatives 2026"
  3. Search: "supply chain security trends January 2026"
  4. Search: "[package manager] features 2026"

What to Report

After searching, provide:

  • Current landscape: What dependency tools are popular NOW
  • Emerging trends: New package managers, security tools, or patterns gaining traction
  • Deprecated/declining: Tools/approaches losing relevance or support
  • Recommendation: Based on fresh data, not just static knowledge

Example Topics (verify with fresh search)

  • Package managers (pnpm, npm, yarn, Poetry, uv for Python)
  • Security scanning (Snyk, Dependabot, Socket.dev)
  • Supply chain security (SBOM, Sigstore, SLSA)
  • Monorepo tools (Nx, Turborepo, Bazel)
  • Lockfile and reproducibility patterns
  • Automated dependency updates (Renovate, Dependabot)

Ops Preflight: Dependency and Toolchain Health (for LLM Agents)

Run this before build/test/edit loops to prevent avoidable churn such as next: command not found.

# 1) Runtime + package manager sanity
node -v
npm -v

# 2) Lockfile and install mode
ls -1 package-lock.json pnpm-lock.yaml yarn.lock 2>/dev/null
test -d node_modules || npm ci

# 3) Verify framework binaries resolve
npx next --version 2>/dev/null || echo "next missing"
npx eslint --version 2>/dev/null || echo "eslint missing"

# 4) Surface dependency graph issues early
npm ls --depth=0

Remediation Rules

  • If binary missing: install from lockfile, do not ad-hoc install random versions.
  • If lockfile drift detected: re-install using project standard tool (npm ci, pnpm install --frozen-lockfile, etc).
  • If peer dependency conflict appears, fix root cause before continuing broad edits.
  • Cache these checks at session start for long agent runs.

Fact-Checking

  • Use web search/web fetch to verify current external facts, versions, pricing, deadlines, regulations, or platform behavior before final answers.
  • Prefer primary sources; report source links and dates for volatile information.
  • If web access is unavailable, state the limitation and mark guidance as unverified.

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

04

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

能力 5

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

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

平台分布

Claude Code

30.28%
按下载量换算245

Cursor

22.58%
按下载量换算182

Gemini CLI

16.96%
按下载量换算137

Antigravity

12.29%
按下载量换算99

Codex

8.63%
按下载量换算70

trae

3.28%
按下载量换算27

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。

来源信息

继续浏览同类 Skills