audit-dependencies
БесплатноБез исполняемых скриптовНе проверенUse when fixing dependency vulnerabilities, running pnpm audit, or when the audit-dependencies CI check fails
от payloadcms★ 46 079 звёзд на GitHubОб этом скилле
Audit Dependencies
Overview
Fix dependency vulnerabilities reported by .github/workflows/audit-dependencies.sh. Prefer fixes in this order: direct dependency bump > lockfile update > pnpm override. Every override requires justification for why simpler approaches aren't feasible.
Core Workflow
digraph audit {
"Run audit script" [shape=box];
"Group by package" [shape=box];
"Trace dependency chain" [shape=box];
"Can bump direct dep?" [shape=diamond];
"Research breaking changes" [shape=box];
"Breaking changes acceptable?" [shape=diamond];
"Apply direct bump" [shape=box];
"Is version pinned or ranged?" [shape=diamond];
"Lockfile update" [shape=box];
"Apply pnpm override" [shape=box];
"More packages?" [shape=diamond];
"Present plan to user" [shape=box];
"Install and verify" [shape=box];
"Build and verify" [shape=box];
"Commit and create PR" [shape=box];
"Run audit script" -> "Group by package";
"Group by package" -> "Trace dependency chain";
"Trace dependency chain" -> "Can bump direct dep?";
"Can bump direct dep?" -> "Research breaking changes" [label="yes"];
"Can bump direct dep?" -> "Is version pinned or ranged?" [label="no"];
"Research breaking changes" -> "Breaking changes acceptable?";
"Breaking changes acceptable?" -> "Apply direct bump" [label="yes"];
"Breaking changes acceptable?" -> "Is version pinned or ranged?" [label="no"];
"Is version pinned or ranged?" -> "Lockfile update" [label="ranged - fix is in range"];
"Is version pinned or ranged?" -> "Apply pnpm override" [label="pinned - explain why"];
"Apply direct bump" -> "More packages?";
"Lockfile update" -> "More packages?";
"Apply pnpm override" -> "More packages?";
"More packages?" -> "Trace dependency chain" [label="yes"];
"More packages?" -> "Present plan to user" [label="no"];
"Present plan to user" -> "Install and verify";
"Install and verify" -> "Build and verify";
"Build and verify" -> "Commit and create PR";
}
Step-by-Step
1. Run the Audit Script
./.github/workflows/audit-dependencies.sh $ARGUMENTS
$ARGUMENTS is the severity passed to the skill (defaults to high if omitted). The script runs pnpm audit --prod --json and filters for actionable vulnerabilities (those with a patched version available). high includes critical.
Parse the output to build a deduplicated list of vulnerable packages with:
- Package name and current version
- Fixed version requirement
- Full dependency chain (e.g.,
packages/plugin-sentry > @sentry/nextjs > rollup)
2. For Each Vulnerable Package
Trace the dependency chain
Identify whether the vulnerable package is:
- Direct dependency: Listed in a workspace package's
package.json - Transitive dependency: Pulled in by another package
Try direct bump first
For transitive deps, walk up the chain to find the nearest package you control:
- Check if bumping the parent package resolves the vulnerability
pnpm view <parent>@latest dependencies.<vulnerable-pkg>- Check intermediate versions too (the fix may exist in a minor bump)
- If the parent bump resolves it, research breaking changes:
- Check changelogs/release notes
- Search GitHub issues for compatibility problems
- Review the API surface used in this repo (read the source files)
- Check if the version range crosses a major version boundary
- Present findings to user with risk assessment
Parallelize research: When multiple packages need breaking change analysis, dispatch parallel agents (one per package) to research simultaneously.
Check if a lockfile update is sufficient
Before reaching for an override, check whether the parent's version specifier is pinned (exact version like 3.10.3) or ranged (like ^2.3.1, ~4.0.3):
pnpm view <parent> dependencies.<vulnerable-pkg>
If the range already includes the fixed version, a lockfile update is all that's needed:
pnpm update <vulnerable-pkg> --recursive
No package.json changes required — the lockfile was just stale.
Fall back to override only when justified
Add a pnpm override in root package.json only when:
- The parent pins an exact version that doesn't satisfy the fix
- No version of the parent package fixes the vulnerability
- The parent bump has high breaking change risk (major API changes, no test coverage, requires code changes across many files)
- The user explicitly decides to defer the parent bump to a separate PR
Override format: "<parent>><vulnerable-pkg>": "^<fixed-version>"
Override syntax rules:
- Use
^ranges, not>=.>=can cross major versions and cause unexpected resolutions (e.g.,"picomatch": ">=2.3.2"can resolve to 4.x). - pnpm only supports single-level parent scoping:
"parent>pkg"works,"grandparent>parent>pkg"does not. - pnpm does not support version selectors in overri
Установить audit-dependencies в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл audit-dependencies?
Use when fixing dependency vulnerabilities, running pnpm audit, or when the audit-dependencies CI check fails
Как установить скилл audit-dependencies?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл audit-dependencies запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
ci-review
The scan that the plugin's GitHub Action runs.
от Anthropicazure-static-web-apps
Helps create, configure, and deploy Azure Static Web Apps using the SWA CLI. Use when deploying static sites to Azure, setting up SWA local development…
от GitHubai-ready
Make any repo AI-ready — analyzes your codebase and generates AGENTS.md, copilot-instructions.md, CI workflows, issue templates, and more. Mines your PR…
от GitHubaws-cdk-python-setup
Setup and initialization guide for developing AWS CDK (Cloud Development Kit) applications in Python. This skill enables users to configure environment…
от GitHub