跳到主要内容

dep-audit 标准

Cross-repository dependency audit. Scans package manifests for outdated packages, security advisories, version conflicts, and license issues. Produces a prioritized update plan. Supports Node.js, Python, Rust, and Go projects.

在 GitHub 打开

安装方式

cp -r skills/dep-audit ~/.claude/skills/dep-audit

把该 skill 目录放进客户端 skills 目录。不同客户端的目录可能不同,Claude Code 默认是 ~/.claude/skills/

整仓一次性获取:git clone --depth 1 https://github.com/thatrebeccarae/claude-marketing.git

依赖与权限

  • 无需 API Key
  • 需要联网访问外部服务
  • 依赖外部命令:git node npm pnpm yarn python pip uv
  • 以上为按正文与 frontmatter 自动推断的信号,仅供参考;安装前建议先阅读原文。

SKILL.md 正文

来源 thatrebeccarae/claude-marketing@a8a63ec · 许可 MIT · 内容未修改

Dependency Audit

Cross-repository dependency audit. Scans package manifests (package.json, pyproject.toml, Cargo.toml, go.mod) for outdated packages, security advisories, version conflicts between repos, and license compatibility issues. Produces a prioritized update plan.

Install

git clone https://github.com/thatrebeccarae/claude-marketing.git && cp -r claude-marketing/skills/dep-audit ~/.claude/skills/

When to Use

  • Monthly hygiene: Run on a cadence to catch dependency drift before it compounds
  • Before releases: Verify no known vulnerabilities ship to production
  • Security incidents: When a CVE drops, quickly assess exposure across all repos
  • Onboarding new repos: Baseline the dependency health of a repo you're inheriting or adopting

Usage

  • /dep-audit [repo-path] — audit a single repository
  • /dep-audit [repo-path1] [repo-path2] ... — cross-repo audit (enables version conflict detection)

Procedure

1. Detect Package Managers

Scan the target repo(s) for manifest files:

ManagerManifestLock File
npmpackage.jsonpackage-lock.json
yarnpackage.jsonyarn.lock
pnpmpackage.jsonpnpm-lock.yaml
piprequirements.txt, setup.py, setup.cfgrequirements.txt (pinned)
poetrypyproject.toml (has [tool.poetry])poetry.lock
uvpyproject.toml (has [tool.uv])uv.lock
cargoCargo.tomlCargo.lock
go modgo.modgo.sum
# Detect which manifests exist
ls package.json pyproject.toml Cargo.toml go.mod requirements.txt 2>/dev/null
# Detect lock files
ls package-lock.json yarn.lock pnpm-lock.yaml poetry.lock uv.lock Cargo.lock go.sum 2>/dev/null

If multiple ecosystems are present (e.g., a monorepo with Node.js frontend and Go backend), audit each independently and merge results.

2. Parse Manifests and Lock Files

Read the manifest to identify declared dependencies (direct) and the lock file for resolved versions (transitive). Distinguish between:

  • Production dependencies (dependencies, [dependencies], main requires)
  • Development dependencies (devDependencies, [dev-dependencies], extras)

3. Check for Outdated Packages

Query the registry for latest versions and categorize the delta:

# Node.js
npm outdated --json

# Python (pip)
pip list --outdated --format=json

# Python (poetry)
poetry show --outdated

# Rust
cargo outdated --format json  # requires cargo-outdated

# Go
go list -m -u all

Categorize each outdated package:

  • Patch update (e.g., 2.3.1 -> 2.3.4): Safe, usually bug fixes
  • Minor update (e.g., 2.3.1 -> 2.5.0): New features, should be backward-compatible
  • Major update (e.g., 2.3.1 -> 3.0.0): Breaking changes likely, needs migration review

4. Check for Security Advisories

Run ecosystem-native audit tools:

# Node.js
npm audit --json

# Python
pip-audit --format=json  # or: safety check

# Rust
cargo audit --json  # requires cargo-audit

# Go
govulncheck ./...

Parse severity from results:

  • Critical: Remote code execution, authentication bypass, data exfiltration
  • High: Privilege escalation, significant data exposure
  • Medium: DoS potential, limited data exposure
  • Low: Information disclosure, minor issues

5. Cross-Repo Analysis (Multiple Repos)

When auditing two or more repos, compare dependency versions:

  • Version conflicts: Same package at different versions across repos (e.g., axios@0.27.2 in repo A, axios@1.6.2 in repo B)
  • Shared dependencies: Packages used by multiple repos that could be aligned to a single version
  • Divergent major versions: Flag these as highest priority — they indicate repos drifting apart

Present a conflict table showing package, version per repo, and recommended target version.

6. License Scan

Check dependency licenses against compatibility rules:

# Node.js
npx license-checker --json

# Python
pip-licenses --format=json

# Rust
cargo license --json  # requires cargo-license

# Go
go-licenses report ./...  # requires go-licenses

Flag issues:

  • Copyleft in permissive projects: GPL/AGPL dependencies in MIT/Apache-licensed projects
  • Unknown or missing licenses: Dependencies with no license metadata
  • Non-OSI-approved licenses: Custom or restrictive licenses
  • License conflicts: Incompatible license combinations (e.g., GPLv2-only with Apache-2.0)

7. Generate Update Plan

Prioritize all findings into a single ordered list:

  1. Critical security advisories — fix immediately
  2. High security advisories — fix this sprint
  3. License violations — assess and remediate
  4. Major outdated (with known issues) — plan migration
  5. Cross-repo version conflicts — align versions
  6. Minor outdated — batch update
  7. Patch outdated — batch update

Group related updates together:

  • All @types/* packages in one PR
  • All packages from the same org (e.g., @babel/*)
  • Peer dependency chains that must move together

Note breaking change risks for any major update. Link to migration guides where available.

8. Report

Produce a severity-coded summary table:

PriorityPackageCurrentLatestTypeSeverityRepos AffectedAction
1lodash4.17.194.17.21patchCRITICAL (CVE-2021-23337)repo-a, repo-bUpdate immediately
2express4.17.14.21.2minorHIGH (CVE-2024-29041)repo-aUpdate this sprint
3webpack4.46.05.94.0majorMEDIUM (outdated)repo-aPlan migration
...

Follow with:

  • Total dependency count (direct / transitive) per repo
  • Security summary: X critical, Y high, Z medium, W low
  • Outdated summary: X major, Y minor, Z patch
  • License summary: X flagged, Y clean
  • Cross-repo conflicts: X packages with version divergence

Key Principles

  1. Never auto-update. This skill audits and recommends. The human decides what to update and when. Automated updates can introduce breaking changes, especially for major versions.
  2. Security first. Critical and high-severity vulnerabilities always top the priority list, regardless of how old other dependencies are.
  3. Group related updates. Updating react without updating react-dom creates version mismatches. Always identify peer dependency chains.
  4. Context matters. A major version bump on a dev-only dependency (e.g., eslint) is lower risk than a patch on a production runtime dependency with a CVE.
  5. Lock files are truth. Always read the lock file for actual resolved versions, not just the range specifier in the manifest.
  6. Don't chase latest for its own sake. If a dependency is working, stable, and has no advisories, "outdated" is not the same as "broken."

How to Use This Skill

Ask:

  • "Audit the dependencies in ~/Repos/my-app"
  • "Compare dependency versions across these three repos"
  • "Are there any security vulnerabilities in this project?"
  • "Check for license issues before we open-source this repo"
  • "Build me an update plan for everything that's behind"

For command reference, license compatibility details, and false positive handling, see [REFERENCE.md](REFERENCE.md).

For worked examples, see [EXAMPLES.md](EXAMPLES.md).

质量与来源

所属仓库
thatrebeccarae/claude-marketing
仓库星标
163
最近更新
5 个月前
采集时间
今天
commit
a8a63ec1341f
内容指纹
sha256:bd7f1f0cce22af7
文件路径
skills/dep-audit/SKILL.md

同仓库其它 Skill

查看全部 50 个
ab-testing-framework
A/B and multivariate testing methodology. Design experiments, calculate sample sizes, determine statistical significance, avoid common pitfalls, and interpret results. Platform-agnostic framework applicable to landing pages, emails, ads, pricing, and product features. Use when the user asks about A/B testing, split testing, experiment design, statistical significance, or conversion experiments.
thatrebeccarae/claude-marketing 163 原文
Claude CodeGemini CLIMCP 客户端
account-structure-review
Google and Meta paid media account structure evaluation. Audits campaign/ad set architecture against conversion volume minimums, budget thresholds, and targeting overlap. Identifies over-segmentation, under-segmentation, budget fragmentation, and structural anti-patterns blocking algorithmic learning. Provides consolidation roadmaps with migration plans. Use when inheriting accounts, quarterly health checks, or before scaling budgets.
thatrebeccarae/claude-marketing 163 原文
Claude CodeGemini CLIMCP 客户端
aeo-geo-optimizer
Answer Engine Optimization (AEO) and Generative Engine Optimization (GEO) specialist. Optimize content and websites to appear in AI-generated answers from ChatGPT, Perplexity, Claude, Google AI Overviews, and other LLM-powered search experiences. Use when the user asks about AI search optimization, AEO, GEO, AI Overviews, appearing in AI answers, LLM citations, or optimizing for generative search.
thatrebeccarae/claude-marketing 163 原文
Claude CodeGemini CLIMCP 客户端
brand-dna
Extract brand identity from a website URL — voice, colors, typography, imagery, values, and target audience — into a structured brand-profile.json. The profile feeds downstream skills (seo-content-writer, email-composer, frontend-design, pro-deck-builder, cross-platform-audit) for brand-consistent output. Use when the user says brand DNA, brand profile, extract brand, analyze brand, brand voice, brand identity, brand colors, or brand style guide.
thatrebeccarae/claude-marketing 163 原文
Claude CodeGemini CLIMCP 客户端
brand-voice-guidelines
Develop brand voice, tone matrices, messaging frameworks, and brand book documentation. Use when the user asks about brand voice, tone of voice, brand guidelines, messaging framework, or brand consistency.
thatrebeccarae/claude-marketing 163 原文
Claude CodeGemini CLIMCP 客户端
braze
Braze customer engagement platform expertise. Audit campaigns, Canvases, segments, messaging channels, and data architecture. Use when the user asks about Braze, customer engagement, push notifications, in-app messaging, cross-channel orchestration, or lifecycle marketing at scale.
thatrebeccarae/claude-marketing 163 原文
Claude CodeGemini CLIMCP 客户端