dependency-doctor
Audits project dependencies for outdated packages, duplicates, heavy/problematic libraries, security vulnerabilities, and risky version combinations. Generates prioritized reports with security, performance, and maintainability insights, upgrade paths, and safe pinning recommendations. Use when users request dependency audits, package updates, security checks, or dependency optimization.
What this skill does
# Dependency Doctor Comprehensive dependency health analysis and upgrade planning. ## Core Workflow 1. **Scan manifests**: Analyze package.json, requirements.txt, Cargo.toml, go.mod, etc. 2. **Check versions**: Identify outdated packages against latest stable versions 3. **Detect issues**: Find duplicates, security vulnerabilities, deprecated packages, heavy bundles 4. **Assess risk**: Evaluate breaking changes and version compatibility 5. **Prioritize**: Rank issues by severity (security > performance > maintenance) 6. **Generate upgrade path**: Create safe, incremental update plan 7. **Recommend pins**: Suggest version constraints to avoid future issues ## Analysis Categories ### Security Issues (Critical) - Known CVEs in dependencies - Unmaintained packages (no updates >2 years) - Packages with security advisories - Transitive dependency vulnerabilities ### Outdated Packages (High) - Major versions behind (breaking changes) - Minor versions behind (new features) - Patch versions behind (bug fixes) ### Duplicate Dependencies (Medium) - Multiple versions of same package - Overlapping functionality (lodash + underscore) - Can be deduplicated ### Heavy Dependencies (Medium) - Large bundle sizes (>500KB) - Unnecessary peer dependencies - Better alternatives available ### Risky Combinations (Medium) - Known incompatible version pairs - Conflicting peer dependencies - Framework version mismatches ## Report Structure ````markdown # Dependency Audit Report ## ๐ด Critical Security Issues (2) - [email protected] โ CVE-2021-3749 โ Upgrade to 1.6.0+ - [email protected] โ Prototype pollution โ Upgrade to 4.17.21+ ## ๐ก High Priority Updates (5) - [email protected] โ 18.2.0 (major, breaking changes) - [email protected] โ 14.1.0 (major, new features) ## ๐ข Maintenance Updates (8) - [email protected] โ 5.3.3 (patch improvements) ## ๐ฆ Duplicates Found (3) - moment: 2.29.1, 2.30.0 โ Deduplicate to 2.30.0 - @types/node: 18.0.0, 20.0.0 โ Align to 20.0.0 ## ๐๏ธ Heavy Dependencies (2) - moment (232KB) โ Consider date-fns (12KB) - lodash (full) โ Consider lodash-es or specific imports ## Upgrade Path ### Phase 1: Security (Do First) ```bash npm update axios lodash npm audit fix ``` ```` ### Phase 2: Major Frameworks (Test Thoroughly) ```bash npm install react@18 react-dom@18 npm install next@14 # Run full test suite ``` ### Phase 3: Minor Updates (Low Risk) ```bash npm update ``` ## Safe Pin Recommendations ```json { "axios": "^1.6.0", "react": "^18.2.0", "typescript": "~5.3.0" } ``` ``` ## Package Manager Commands ### npm - Audit: `npm audit` - Outdated: `npm outdated` - Dedupe: `npm dedupe` - Update: `npm update [package]` ### yarn - Audit: `yarn audit` - Outdated: `yarn outdated` - Dedupe: `yarn dedupe` - Upgrade: `yarn upgrade [package]` ### pnpm - Audit: `pnpm audit` - Outdated: `pnpm outdated` - Dedupe: `pnpm dedupe` - Update: `pnpm update [package]` ### pip - Outdated: `pip list --outdated` - Update: `pip install --upgrade [package]` - Security: `pip-audit` or `safety check` ## Upgrade Best Practices 1. **Backup first**: Commit current state or create branch 2. **Read changelogs**: Check for breaking changes 3. **Update incrementally**: One major version at a time 4. **Test thoroughly**: Run full test suite after each update 5. **Check peer deps**: Ensure compatibility 6. **Lock files**: Commit updated lock files 7. **Monitor**: Watch for runtime issues after deployment ## Version Pinning Strategy - **Exact**: `1.2.3` - Only for problematic packages - **Patch**: `~1.2.3` - Safe updates (1.2.x) - **Minor**: `^1.2.3` - Most common (1.x.x) - **Range**: `>=1.2.3 <2.0.0` - Explicit bounds ## References See `references/common-issues.md` for known problematic package combinations and migration guides. ```
Related in Security
mac-ops
IncludedComprehensive macOS workstation operations โ diagnose kernel panics, identify failing drives, audit launchd startup items, decode wake reasons, triage TCC permission denials, manage APFS snapshots, recover from no-boot. Use for: Mac is slow, slow bootup, won't boot, kernel panic, kernel_task hot, mds_stores CPU, photoanalysisd, cloudd, login loop, gray screen, sleep wake failure, drive failing, IO errors, APFS snapshots eating space, Time Machine local snapshots, Spotlight indexing, launchd, LaunchAgent, LaunchDaemon, login items, TCC permissions, Full Disk Access, Screen Recording denied, Gatekeeper, quarantine, com.apple.quarantine, app is damaged, helper tool, /Library/PrivilegedHelperTools, pmset, wake reasons, dark wake, sysdiagnose, panic.ips, DiagnosticReports, configuration profile, MDM profile, remote diagnostics over SSH.
a11y-audit
IncludedRun accessibility audits on web projects combining automated scanning (axe-core, Lighthouse) with WCAG 2.1 AA compliance mapping, manual check guidance, and structured reporting. Output is configurable: markdown report only, markdown plus machine-readable JSON, or markdown plus issue tracker integration. Use this skill whenever the user mentions "accessibility audit", "a11y audit", "WCAG audit", "accessibility check", "compliance scan", or asks to check a web project for accessibility issues. Also trigger when the user wants to verify WCAG conformance or map findings to a specific standard (CAN-ASC-6.2, EN 301 549, ADA/AODA).
erpclaw
IncludedAI-native ERP system with self-extending OS. Full accounting, invoicing, inventory, purchasing, tax, billing, HR, payroll, advanced accounting (ASC 606/842, intercompany, consolidation), and financial reporting. 413 actions across 14 domains, 43 expansion modules. Constitutional guardrails, adversarial audit, schema migration. Double-entry GL, immutable audit trail, US GAAP.
assess
IncludedAssesses and rates quality 0-10 across multiple dimensions (correctness, maintainability, security, performance, testability, simplicity) with pros/cons analysis. Compares against project conventions and prior decisions from memory. Produces structured evaluation reports with actionable improvement suggestions. Use when evaluating code, designs, architectures, or comparing alternative approaches.
spring-boot-security-jwt
IncludedProvides JWT authentication and authorization patterns for Spring Boot 3.5.x covering token generation with JJWT, Bearer/cookie authentication, database/OAuth2 integration, and RBAC/permission-based access control using Spring Security 6.x. Use when implementing authentication or authorization in Spring Boot applications.
code-hardcode-audit
IncludedDetect hardcoded values, magic numbers, and leaked secrets. TRIGGERS - hardcode audit, magic numbers, PLR2004, secret scanning.