analyzing-dependencies

Analyze dependencies for known security vulnerabilities and outdated versions. Use when auditing third-party libraries. Trigger with 'check dependencies', 'scan for vulnerabilities', or 'audit packages'.

1,868 stars

Best use case

analyzing-dependencies is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Analyze dependencies for known security vulnerabilities and outdated versions. Use when auditing third-party libraries. Trigger with 'check dependencies', 'scan for vulnerabilities', or 'audit packages'.

Teams using analyzing-dependencies should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/analyzing-dependencies/SKILL.md --create-dirs "https://raw.githubusercontent.com/jeremylongshore/claude-code-plugins-plus-skills/main/plugins/security/dependency-checker/skills/analyzing-dependencies/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/analyzing-dependencies/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How analyzing-dependencies Compares

Feature / Agentanalyzing-dependenciesStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Analyze dependencies for known security vulnerabilities and outdated versions. Use when auditing third-party libraries. Trigger with 'check dependencies', 'scan for vulnerabilities', or 'audit packages'.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# Analyzing Dependencies

## Overview

Analyze project dependencies for known security vulnerabilities, outdated
versions, and license compliance issues across multiple package ecosystems.
This skill inspects npm, pip, Composer, Gem, Go module, and Cargo manifests
and lock files, cross-references findings against CVE databases, and produces
actionable remediation guidance with upgrade paths.

## Prerequisites

- Access to the target project directory and manifest files in `${CLAUDE_SKILL_DIR}/`
- At least one package manager CLI available: `npm`, `pip`/`pip-audit`, `composer`, `gem`, `go`, or `cargo`
- Network access for querying vulnerability databases (NVD, GitHub Advisory Database, OSV)
- Reference: `${CLAUDE_SKILL_DIR}/references/README.md` for npm/pip audit report formats, license compatibility matrix, and dependency management best practices

## Instructions

1. Detect the project ecosystem by scanning `${CLAUDE_SKILL_DIR}/` for manifest files: `package.json` and `package-lock.json` (npm/Node.js), `requirements.txt`/`pyproject.toml`/`Pipfile.lock` (Python), `composer.json`/`composer.lock` (PHP), `Gemfile`/`Gemfile.lock` (Ruby), `go.mod`/`go.sum` (Go), `Cargo.toml`/`Cargo.lock` (Rust).
2. For npm projects, run `npm audit --json` and parse the structured output. Map each advisory to its CVE identifier, CVSS score, severity level, vulnerable version range, and patched version.
3. For Python projects, run `pip-audit --format=json` or parse `safety check --json` output. Cross-reference each vulnerability against the OSV database for additional context.
4. For other ecosystems, run the equivalent audit command (`composer audit`, `bundle audit`, `cargo audit`, `govulncheck`) and normalize the output to a common finding format.
5. Analyze the dependency tree for transitive vulnerabilities -- identify which direct dependency pulls in the vulnerable transitive dependency, and whether upgrading the direct dependency resolves the issue.
6. Check for outdated packages by comparing installed versions against the latest available versions. Categorize updates as patch (safe), minor (likely safe), or major (breaking changes possible).
7. Audit license compliance by extracting license declarations from each dependency. Flag packages using copyleft licenses (GPL, AGPL) in proprietary projects, packages with no declared license, and packages with license conflicts per the compatibility matrix in `${CLAUDE_SKILL_DIR}/references/README.md`.
8. Identify abandoned or unmaintained packages: flag dependencies with no releases in over 2 years, archived repositories, or known deprecation notices.
9. Classify each finding by severity (critical, high, medium, low) using CVSS scores: critical >= 9.0, high >= 7.0, medium >= 4.0, low < 4.0.
10. Generate a remediation plan with specific upgrade commands, alternative packages for abandoned dependencies, and a priority order based on severity and exploitability.

## Output

- **Vulnerability report**: Table with columns: Package, Installed Version, Vulnerability (CVE ID), CVSS Score, Severity, Patched Version, Direct/Transitive
- **Outdated packages**: Table with columns: Package, Current Version, Latest Version, Update Type (patch/minor/major), Breaking Changes Risk
- **License audit**: Table with columns: Package, License, Compatibility Status (OK, Warning, Conflict), Notes
- **Dependency tree visualization**: For critical vulnerabilities, the chain from direct dependency to vulnerable transitive dependency
- **Remediation commands**: Ready-to-run commands (e.g., `npm install package@version`, `pip install --upgrade package==version`) prioritized by severity
- **Executive summary**: Total dependencies scanned, total vulnerabilities by severity, outdated count, license conflicts count

## Error Handling

| Error | Cause | Solution |
|-------|-------|----------|
| `npm audit` returns exit code 1 | Vulnerabilities found (expected behavior) | Parse the JSON output normally; exit code 1 indicates findings, not a tool failure |
| `pip-audit` not installed | Tool not available in the environment | Install with `pip install pip-audit` or fall back to manual `pip list --outdated` combined with OSV API queries |
| Lock file missing or outdated | Dependencies not properly locked | Run `npm install`, `pip freeze`, or equivalent to generate/update the lock file before scanning |
| Network timeout querying vulnerability DB | Firewall or connectivity issue | Retry with increased timeout; fall back to offline analysis of lock file versions against cached CVE data |
| Mixed ecosystem project | Multiple manifest files in one repo | Scan each ecosystem independently and combine results into a unified report |
| Private registry packages not found | Audit tools cannot resolve private packages | Skip private packages in the vulnerability scan; note them as "unverifiable" in the report |

## Examples

### npm Pre-Deployment Audit

Run `npm audit --json` in `${CLAUDE_SKILL_DIR}/`. Parse the output to identify critical
and high severity advisories. For each, trace the dependency chain from direct
dependency to vulnerable package. Produce upgrade commands:
`npm install express@4.19.2` to resolve CVE-2024-XXXXX in `path-to-regexp`.
Flag any advisory without a fix available as requiring a workaround or alternative package.

### Python Dependency Security Check

Run `pip-audit --format=json -r ${CLAUDE_SKILL_DIR}/requirements.txt`. Map each
vulnerability to its CVE, CVSS score, and fixed version. For transitive
dependencies, identify the direct dependency pulling in the vulnerable package.
Recommend pinning to safe versions in `requirements.txt` and adding
`pip-audit` to the CI pipeline.

### License Compliance Scan

Extract licenses from `${CLAUDE_SKILL_DIR}/node_modules/` using `license-checker --json`
or equivalent. Flag any GPL-3.0 or AGPL-3.0 licensed package used in a
proprietary application as a license conflict. Flag packages with `UNLICENSED`
or missing license fields as requiring legal review before production use.

## Resources

- [OWASP Dependency-Check](https://owasp.org/www-project-dependency-check/)
- [National Vulnerability Database (NVD)](https://nvd.nist.gov/)
- [GitHub Advisory Database](https://github.com/advisories)
- [OSV: Open Source Vulnerabilities](https://osv.dev/)
- [SPDX License List](https://spdx.org/licenses/)

Related Skills

analyzing-test-coverage

1868
from jeremylongshore/claude-code-plugins-plus-skills

Analyze code coverage metrics and identify untested code paths. Use when analyzing untested code or coverage gaps. Trigger with phrases like "analyze coverage", "check test coverage", or "find untested code".

analyzing-security-headers

1868
from jeremylongshore/claude-code-plugins-plus-skills

Analyze HTTP security headers of web domains to identify vulnerabilities and misconfigurations. Use when you need to audit website security headers, assess header compliance, or get security recommendations for web applications. Trigger with phrases like "analyze security headers", "check HTTP headers", "audit website security headers", or "evaluate CSP and HSTS configuration".

analyzing-system-throughput

1868
from jeremylongshore/claude-code-plugins-plus-skills

Analyze and optimize system throughput including request handling, data processing, and resource utilization. Use when identifying capacity limits or evaluating scaling strategies. Trigger with phrases like "analyze throughput", "optimize capacity", or "identify bottlenecks".

analyzing-network-latency

1868
from jeremylongshore/claude-code-plugins-plus-skills

Analyze network latency and optimize request patterns for faster communication. Use when diagnosing slow network performance or optimizing API calls. Trigger with phrases like "analyze network latency", "optimize API calls", or "reduce network delays".

analyzing-logs

1868
from jeremylongshore/claude-code-plugins-plus-skills

Analyze application logs for performance insights and issue detection including slow requests, error patterns, and resource usage. Use when troubleshooting performance issues or debugging errors. Trigger with phrases like "analyze logs", "find slow requests", or "detect error patterns".

analyzing-capacity-planning

1868
from jeremylongshore/claude-code-plugins-plus-skills

Execute this skill enables AI assistant to analyze capacity requirements and plan for future growth. it uses the capacity-planning-analyzer plugin to assess current utilization, forecast growth trends, and recommend scaling strategies. use this skill when the u... Use when analyzing code or data. Trigger with phrases like 'analyze', 'review', or 'examine'.

analyzing-query-performance

1868
from jeremylongshore/claude-code-plugins-plus-skills

Execute use when you need to work with query optimization. This skill provides query performance analysis with comprehensive guidance and automation. Trigger with phrases like "optimize queries", "analyze performance", or "improve query speed".

analyzing-database-indexes

1868
from jeremylongshore/claude-code-plugins-plus-skills

Process use when you need to work with database indexing. This skill provides index design and optimization with comprehensive guidance and automation. Trigger with phrases like "create indexes", "optimize indexes", or "improve query performance".

analyzing-options-flow

1868
from jeremylongshore/claude-code-plugins-plus-skills

Track crypto options flow to identify institutional positioning and market sentiment. Use when tracking institutional options flow. Trigger with phrases like "track options flow", "analyze derivatives", or "check institutional".

analyzing-on-chain-data

1868
from jeremylongshore/claude-code-plugins-plus-skills

Process perform on-chain analysis including whale tracking, token flows, and network activity. Use when performing crypto analysis. Trigger with phrases like "analyze crypto", "check blockchain", or "monitor market".

analyzing-nft-rarity

1868
from jeremylongshore/claude-code-plugins-plus-skills

Calculate NFT rarity scores and rank tokens by trait uniqueness. Use when analyzing NFT collections, checking token rarity, or comparing NFTs. Trigger with phrases like "check NFT rarity", "analyze collection", "rank tokens", "compare NFTs".

analyzing-mempool

1868
from jeremylongshore/claude-code-plugins-plus-skills

Monitor blockchain mempools for pending transactions, gas analysis, and MEV opportunities. Use when analyzing pending transactions, optimizing gas prices, or researching MEV. Trigger with phrases like "check mempool", "scan pending txs", "find MEV", "gas price analysis", or "pending swaps".