agentleFS
nisarthnisarth/claude-skills-store/skills/engineering/dependency-audit/SKILL.md

dependency-audit

Skill1 starsChanged 7 months agoMITView on GitHub

Audit project dependencies: outdated packages, security vulnerabilities, license compliance, bundle size impact, and unused dependencies. Trigger with "audit dependencies", "check for vulnerabilities", "outdated packages", "license check", "reduce bundle size", "unused dependencies", or when the user needs help managing third-party dependencies.

42 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use api-audit, container-audit and 6 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • gmanch94Skill

    api-audit

    Guides a structured API portfolio audit — from discovery through primary-source-verified inventory, shortcomings analysis, prioritized recommendations, executive summary, and options analysis. Enforces primary-source discipline, cross-file consistency, and advisor review gates. Use when auditing an API portfolio, evaluating a vendor's developer ecosystem, or producing defensible technical analysis of an API set.

    Also in 3 projects that use this

  • grichaSkill

    container-audit

    Audit local Docker images and running containers for hardening issues before deploy — privileged flags, root users, stale base images, missing resource limits. Use for pre-deploy container review.

    Also in 3 projects that use this

  • conorluddySkill

    performance-profiling

    Instruments integration and performance analysis workflows for iOS apps. Use when profiling CPU usage, memory allocation, network activity, or energy consumption. Covers Time Profiler, Allocations, Leaks, Network instruments, and performance optimization strategies.

    Also in 3 projects that use this

  • OpenAISkill

    threat-model

    Use when Codex is already in the threat-modeling phase of a security scan, the user explicitly invokes $threat-model, or the user explicitly asks to create, update, or persist a repository threat model. Do not use as the primary trigger for full PR, commit, branch, patch, or repository scans.

    Also in 4 projects that use this

  • renfei-designSkill

    a11y-audit

    Audit Figma designs for WCAG accessibility issues — color contrast, minimum font size, touch target sizing, and missing text alternatives. Use when asked to check accessibility, audit contrast ratios, find a11y issues, verify WCAG compliance, or review designs for accessibility problems. Scans nodes, analyzes offline, and annotates issues in Figma.

    Also in 3 projects that use this

  • OpenAISkill

    security-scan

    Use for a standard, single-pass security audit of an entire repository or a scoped path, package, folder, or submodule with no diff to review. This is the default repository scan. Do not use for PR, commit, branch, or working-tree diffs, or for deep, multi-pass scans.

    Also in 4 projects that use this

The file

We split this skill into the rules it gives an agent

12 rules. 0 are common, 9 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 39 edited versions we read keep these.

  • 9

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read the primary dependency file to understand direct vs.

    line 42
  2. Distinctive:

    Run ecosystem-specific audit tools:

    line 46
  3. Distinctive:

    Check for outdated dependencies:

    line 84
  4. Distinctive:

    Check dependency licenses for compatibility:

    line 116
  5. Distinctive:

    Only recommend removing dependencies that are truly unused after this verification.

    line 198
  6. Very specific:

    Action: Run npm audit or equivalent, categorize findings by severity, check if vulnerable code paths are reachable, provide fix commands.

    line 267
  7. Distinctive:

    Action: Run license checker on production dependencies, flag any copyleft licenses, identify license conflicts, recommend alternatives for …

    line 270
  8. Very specific:

    Run dependency audits in CI on every PR, not just occasionally.

    line 277
  9. Distinctive:

    Prefer packages with active maintenance, a large user base, and a clear license.

    line 281
  10. Distinctive:

    Keep a dependency policy document that specifies allowed licenses, blocked packages, and approval process for new dependencies.

    line 283
  11. Distinctive:

    Consider vendoring critical dependencies if they are small and maintenance is uncertain.

    line 284
  12. Very specific:

    Use npm ls <package> or pnpm why <package> to understand why a transitive dependency is present before trying to remove it.

    line 285

“Common” is measured: kept by at least 6 in 10 of the 39 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Dependency Audit

Audit project dependencies for security vulnerabilities, outdated packages, license compliance, bundle size impact, and unused packages. Produce an actionable report with prioritized upgrade recommendations.

Workflow

Step 1: Detect the Ecosystem

Identify the package manager and dependency files:

  • Node.js: package.json, package-lock.json, yarn.lock, pnpm-lock.yaml
  • Python: requirements.txt, Pipfile, pyproject.toml, poetry.lock
  • Rust: Cargo.toml, Cargo.lock
  • Go: go.mod, go.sum
  • Java/Kotlin: pom.xml, build.gradle, build.gradle.kts
  • Ruby: Gemfile, Gemfile.lock

Read the primary dependency file to understand direct vs. transitive dependencies.

Step 2: Security Vulnerability Scan

Run ecosystem-specific audit tools:

Node.js:

npm audit --json
# or
pnpm audit --json
# or for more detailed analysis
npx audit-ci --config audit-ci.json

Python:

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

Rust:

cargo audit --json

Go:

govulncheck ./...

For each vulnerability found, document:

  • Package name and installed version
  • Vulnerability ID (CVE, GHSA)
  • Severity (Critical, High, Medium, Low)
  • Fixed version (if available)
  • Whether it is a direct or transitive dependency
  • Whether the vulnerable code path is actually reachable in the project

Step 3: Outdated Package Analysis

Check for outdated dependencies:

Node.js:

npm outdated --json
# or
npx npm-check-updates --format group

Python:

pip list --outdated --format=json

Rust:

cargo outdated --format json

Categorize updates by risk:

  • Patch updates (1.2.3 -> 1.2.4): Bug fixes, safe to update.
  • Minor updates (1.2.3 -> 1.3.0): New features, backward compatible. Review changelog.
  • Major updates (1.2.3 -> 2.0.0): Breaking changes. Requires migration planning.

Flag packages that are:

  • Multiple major versions behind (high risk of security issues).
  • Unmaintained (no commits in 12+ months, no response to issues).
  • Deprecated (package author has published a successor).

Step 4: License Compliance

Check dependency licenses for compatibility:

Node.js:

npx license-checker --json --production
# or
npx license-report --output=json

License categories:

LicenseCategoryCommercial UseNotes
MITPermissiveYesMost common, no restrictions
Apache-2.0PermissiveYesPatent grant included
BSD-2/3PermissiveYesMinimal restrictions
ISCPermissiveYesSimplified MIT
GPL-2.0/3.0CopyleftRestrictedMust open-source derivative works
LGPL-2.1/3.0Weak CopyleftYes (with conditions)Dynamic linking usually OK
AGPL-3.0Strong CopyleftRestrictedNetwork use triggers copyleft
MPL-2.0Weak CopyleftYes (with conditions)File-level copyleft
UNLICENSEDUnknownRiskyNo license = all rights reserved

Flag:

  • Any GPL/AGPL dependencies in proprietary projects.
  • Dependencies with no license specified (legally risky).
  • License conflicts between dependencies.
  • Dependencies with custom or unusual licenses requiring legal review.

Step 5: Bundle Size Impact

For frontend projects, analyze the bundle size contribution of each dependency:

Node.js/Frontend:

# Check individual package sizes
npx bundle-phobia <package-name>

# Analyze the full bundle
npx source-map-explorer dist/main.js
# or
npx webpack-bundle-analyzer dist/stats.json

Identify:

  • Large dependencies that could be replaced with smaller alternatives.
  • Dependencies imported for a single function (lodash vs. lodash-es, moment vs. date-fns).
  • Duplicate packages at different versions in the bundle.
  • Dependencies that should be dynamically imported (code-split).

Common replacements for bundle size reduction:

Heavy PackageLighter AlternativeSize Reduction
momentdate-fns or dayjs~90% smaller
lodashlodash-es (tree-shakable)~70% smaller
uuidcrypto.randomUUID() (built-in)100% removed
axiosfetch (built-in)100% removed
classnamesclsx~50% smaller

Step 6: Unused Dependency Detection

Find dependencies that are installed but never imported:

Node.js:

npx depcheck
# or
npx knip

Python:

# Check for unused imports that may indicate unused dependencies
pylint --disable=all --enable=W0611 .

For each unused dependency, verify:

  • Is it a CLI tool used in scripts (not imported in code)?
  • Is it a type-only dependency (@types/* packages)?
  • Is it used in configuration files (plugins for ESLint, Babel, PostCSS)?
  • Is it a peer dependency required by another package?

Only recommend removing dependencies that are truly unused after this verification.

Step 7: Produce the Report

Compile all findings into a prioritized report.

Output Format

## Dependency Audit Report

**Project**: <name>
**Ecosystem**: <npm/pip/cargo/etc>
**Total dependencies**: <direct> direct, <transitive> transitive
**Date**: <date>

### Security Vulnerabilities

| Severity | Package | Version | CVE/GHSA | Fixed In | Direct? |
|----------|---------|---------|----------|----------|---------|
| CRITICAL | <name> | <ver> | <id> | <ver> | Yes/No |
| HIGH | <name> | <ver> | <id> | <ver> | Yes/No |

**Action required**: <count> critical, <count> high severity issues need immediate attention.

### Outdated Packages

#### Major Updates (breaking changes)
| Package | Current | Latest | Age Behind | Migration Notes |
|---------|---------|--------|------------|-----------------|

#### Minor Updates (features, backward compatible)
| Package | Current | Latest |
|---------|---------|--------|

#### Patch Updates (bug fixes, safe)
| Package | Current | Latest |
|---------|---------|--------|

### License Compliance

**Status**: PASS / FAIL / REVIEW NEEDED

| Package | License | Risk Level | Notes |
|---------|---------|------------|-------|

### Bundle Size Analysis

**Total bundle**: <size>
**Top 5 heaviest dependencies**:
| Package | Size (gzipped) | % of Bundle | Alternative |
|---------|---------------|-------------|-------------|

### Unused Dependencies
| Package | Type | Recommendation |
|---------|------|----------------|

### Recommended Actions (priority order)
1. **[Critical]** <action>
2. **[High]** <action>
3. **[Medium]** <action>

Examples

User: "Audit my project dependencies" Action: Detect the ecosystem, run security audit, check for outdated packages, verify licenses, detect unused dependencies, produce a comprehensive report.

User: "Are there any security vulnerabilities in our dependencies?" Action: Run npm audit or equivalent, categorize findings by severity, check if vulnerable code paths are reachable, provide fix commands.

User: "Check our licenses for GPL contamination" Action: Run license checker on production dependencies, flag any copyleft licenses, identify license conflicts, recommend alternatives for problematic dependencies.

User: "Our bundle is 2MB, what can we trim?" Action: Analyze bundle composition, identify heavy dependencies, suggest lighter alternatives, recommend code-splitting strategies, estimate savings.

Best Practices

  • Run dependency audits in CI on every PR, not just occasionally. Use npm audit --audit-level=high as a gate.
  • Separate production and dev dependencies strictly. Dev dependencies should never be in the production bundle.
  • Pin exact versions in lock files (default behavior) but use ranges in package.json for libraries.
  • Review changelogs before major version upgrades. Automated tools like Dependabot or Renovate can help, but a human should review breaking changes.
  • Prefer packages with active maintenance, a large user base, and a clear license. Check the package's GitHub for open issues, last commit date, and bus factor.
  • For license compliance, audit production dependencies separately from dev dependencies. Dev-only tools with GPL licenses are usually acceptable.
  • Keep a dependency policy document that specifies allowed licenses, blocked packages, and approval process for new dependencies.
  • Consider vendoring critical dependencies if they are small and maintenance is uncertain.
  • Use npm ls <package> or pnpm why <package> to understand why a transitive dependency is present before trying to remove it.
  • Set up automated dependency update PRs (Renovate or Dependabot) with auto-merge for patch versions that pass CI.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.