dependency-analysis
Skill2 starsChanged 2 months agoMITView on GitHub
Analyze project dependencies for health, security, and bloat — audit outdated, deprecated, vulnerable, duplicate, heavy, and unused packages across npm, pip, cargo, go mod, and more. Produce a dependency health score, CVE inventory, license compatibility matrix, bundle size impact assessment, and a prioritized update plan with migration paths.
3 other projects use a version of this.
Adopted by
Most recently taken up by
- okfriansyah-moh/agentic-workflowtheir own version, first seen Oct 25, 2026
- 0xsarwagya/ontolytheir own version, first seen Oct 13, 2026
- microsoft/CSS-Exchangetheir own version, first seen May 27, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- microsoft/CSS-Exchange★ 1.3ksame name
- 0xsarwagya/ontoly★ 2same name
- okfriansyah-moh/agentic-workflow★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository30 other files it gives its agents.
- agents-mdSkill
- agent-workflow-engineeringSkill
- analyze-architectureSkill
- architecture-auditSkill
- ask-mattSkill
- check-readinessSkill
- ci-cd-and-automationSkill
- codebase-contextSkill
- decision-memorySkill
- delegation-protocolSkill
- diagnosing-bugsSkill
- dispatching-parallel-agentsSkill
- documentation-maintenanceSkill
- engineering-closeoutSkill
- environment-discoverySkill
- github-pr-workflowSkill
- implementSkill
- interview-meSkill
- parallel-feature-developmentSkill
- planning-and-task-breakdownSkill
- project-contextSkill
- project-retrospectiveSkill
- release-managementSkill
- requesting-code-reviewSkill
- solution-architectureSkill
- subagent-driven-developmentSkill
- synthesize-project-contextSkill
- task-intakeSkill
- workflow-definitionSkill
- workflow-runnerSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
20 rules. 0 are common, 17 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
17
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
- Distinctive: line 14
Do NOT ask the user questions.
- Distinctive: line 17
If not provided, analyze all dependencies.
- Distinctive: line 57
Check version constraints are appropriate:
- Distinctive: line 63
Verify a lockfile exists and is committed to git.
- Distinctive: line 72
Verify EVERY package in the manifest actually exists on its registry, plus every package the AI recommends adding:
- Distinctive: line 182
Run tests after update.
- Very specific: line 193
Write the full analysis to docs/dependency-analysis.md (create docs/ if needed).
- Distinctive: line 200
After producing output, validate data quality and completeness:
- Distinctive: line 202
Verify all output sections have substantive content (not just headers).
- Distinctive: line 203
Verify every finding references a specific file, code location, or data point.
- Distinctive: line 204
Verify recommendations are actionable and evidence-based.
- Distinctive: line 205
If the analysis consumed insufficient data (empty directories, missing configs), note data gaps and attempt alternative discovery methods.
- Distinctive: line 213
IF STILL INCOMPLETE after 2 iterations:
- Distinctive: line 261
Run a broader security review beyond dependencies if needed.
- Distinctive: line 262
Remove dead code alongside unused dependencies if found.
- Distinctive: line 269
After producing output, record execution metadata for skill improvement signals (optional).
- Very specific: line 271
Check if a project memory directory exists (e.g.
- Very specific: line 272
If found, append to skill-telemetry.md in that memory directory
- Distinctive: line 284
Only log if the memory directory exists.
- Distinctive: line 285
Keep entries concise — /evolve will parse these for skill improvement signals.
“Common” is measured: kept by at least 6 in 10 of the 3 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.
Files
You are an autonomous dependency analysis agent. You audit every dependency in the project for health, security, licensing, and size impact, then produce an actionable update plan. Do NOT ask the user questions. Investigate the entire codebase thoroughly.
INPUT (optional): a specific dependency or category to focus on (e.g., "react ecosystem", "dev deps only", "security"). If not provided, analyze all dependencies.
============================================================ PHASE 1: STACK DETECTION AND DEPENDENCY INVENTORY
- Identify all dependency manifests:
- Node.js: package.json (+ package-lock.json / yarn.lock / pnpm-lock.yaml).
- Python: requirements.txt / Pipfile / pyproject.toml / setup.py / setup.cfg.
- Flutter/Dart: pubspec.yaml (+ pubspec.lock).
- Go: go.mod (+ go.sum).
- Rust: Cargo.toml (+ Cargo.lock).
- Ruby: Gemfile (+ Gemfile.lock).
- Java/Kotlin: pom.xml / build.gradle / build.gradle.kts.
- .NET: *.csproj / packages.config.
- Build the full dependency tree:
- Direct dependencies (what the project explicitly requires).
- Transitive dependencies (pulled in by direct deps).
- Development dependencies (used only during build/test).
- Peer dependencies (expected to be provided by the consumer).
Catalog each dependency:
Package Version Type Direct/Transitive Purpose
============================================================ PHASE 2: VERSION HEALTH CHECK
OUTDATED DEPENDENCIES:
- For each dependency, determine the latest available version.
- Categorize the update:
- Patch: bug fixes only (e.g., 1.0.0 -> 1.0.1). Safe to update.
- Minor: new features, backward compatible (e.g., 1.0.0 -> 1.1.0). Usually safe.
- Major: breaking changes (e.g., 1.0.0 -> 2.0.0). Requires migration.
- For major updates, note key breaking changes and migration effort.
VERSION CONSTRAINTS:
- Check version constraints are appropriate:
- Too loose:
*orlatest(could break on any update). - Too tight: exact version without lockfile (misses patches).
- Correct: semver range with lockfile (e.g.,
^1.0.0with package-lock.json).
- Too loose:
PINNING:
- Verify a lockfile exists and is committed to git.
- Flag missing lockfiles (non-deterministic installs).
- Flag lockfile conflicts or corruption.
============================================================ PHASE 3: SECURITY AUDIT
HALLUCINATED / NON-EXISTENT PACKAGES (AI-specific, check FIRST):
- Verify EVERY package in the manifest actually exists on its registry, plus
every package the AI recommends adding:
- npm:
npm view <pkg> name version time.modified(ornpm view <pkg>and checkdist-tags,maintainers,time) - Python:
pip index versions <pkg>orpython -m pip download <pkg> --no-deps -d /tmp/probe - Go:
go list -m -versions <module> - Rust:
cargo search <name> --limit 3 - Java: check Maven Central / repo1.maven.org search API
- npm:
- A package that 404s on its registry is a HALLUCINATED package: the AI generated a plausible name. NEVER install it, and do not "fix" the name by guessing — search for the intended real package and confirm intent.
- For every existing package, assess:
Check Risk signal Downloads < 1000/week (or single-digit monthly) = low trust Maintainer account age Newly registered account = high risk (squatting) Last publish Years stale OR days fresh with no history = both suspicious Name similarity Typosquatting candidate: differs from a popular package by one character ( cross-envvscrossenv)Install scripts postinstall/preinstallin a small or unknown package = arbitrary code on install
KNOWN VULNERABILITIES:
- Cross-reference each dependency against vulnerability databases:
- npm: advisory database.
- Python: PyPI advisories, safety-db.
- Go: Go vulnerability database.
- General: CVE database, Snyk DB, GitHub advisories.
- For each vulnerability:
- Package, version, CVE ID, severity (CVSS), description.
- Fixed version (if available).
- Whether the vulnerable code path is actually reachable in this project.
SUPPLY CHAIN RISKS:
- Flag packages with very few downloads or maintainers.
- Flag packages that recently changed ownership.
- Flag packages with install scripts (postinstall, preinstall) that run arbitrary code.
- Flag packages that are typosquatting popular packages.
============================================================ PHASE 4: LICENSE COMPATIBILITY
LICENSE INVENTORY:
- Determine the license for each dependency.
- Categorize:
- Permissive: MIT, BSD, Apache 2.0, ISC -- safe for any project.
- Copyleft: GPL, LGPL, AGPL -- may require your code to be open source.
- Restrictive: SSPL, BSL, proprietary -- may prohibit certain uses.
- Unknown: no license specified -- legally risky.
COMPATIBILITY CHECK:
- Determine the project's own license.
- Flag any dependency license incompatible with the project's license.
- Flag GPL dependencies in MIT/Apache projects (copyleft contamination).
- Flag dependencies with no license (cannot legally use).
| Package | License | Compatible | Risk |
============================================================ PHASE 5: SIZE AND PERFORMANCE IMPACT
HEAVY PACKAGES:
- Estimate the install size and bundle size contribution of each dependency.
- Flag packages over 1MB install size.
- Flag packages that pull in excessive transitive dependencies (> 50).
- For frontend projects: flag packages over 50KB gzipped in the browser bundle.
LIGHTER ALTERNATIVES:
- For each heavy package, suggest smaller alternatives:
Heavy Package Size Alternative Size API Compatibility
DUPLICATE PACKAGES:
- Find packages with multiple versions in the lockfile.
- For each: which direct deps require which version.
- Recommend resolution: override to single version, or upgrade the root dep.
============================================================ PHASE 6: USAGE ANALYSIS
UNUSED PACKAGES:
- For each dependency, search the codebase for imports/requires.
- Cross-reference with:
- Build tool plugins (webpack, babel, eslint plugins referenced in config).
- CLI tools referenced in npm scripts or CI config.
- Type-only packages (@types/*) used by TypeScript.
- Peer dependencies required by other installed packages.
- Flag packages with zero code references AND no config/script usage.
UNDERUTILIZED PACKAGES:
- Packages imported but only 1-2 functions used from a large library.
- Example: lodash imported for just
_.debounce(use standalone package). - For each: package, what is actually used, lighter alternative.
============================================================ PHASE 7: UPDATE PLAN
Generate a prioritized update plan:
IMMEDIATE (security fixes):
- {package} {current} -> {target} -- fixes {CVE} ({severity})
- Breaking changes: {none / list}
- Migration steps: {if needed}
SAFE UPDATES (patch + minor):
- {package} {current} -> {target}
- Risk: Low
- Run tests after update.
BREAKING UPDATES (major versions):
- {package} {current} -> {target}
- Breaking changes: {list key changes}
- Migration effort: {S/M/L}
- Migration steps: {step by step}
REMOVALS (unused/deprecated):
- {package} -- {reason: unused / deprecated / replaced by X}
Write the full analysis to docs/dependency-analysis.md (create docs/ if needed).
============================================================ SELF-HEALING VALIDATION (max 2 iterations)
After producing output, validate data quality and completeness:
- Verify all output sections have substantive content (not just headers).
- Verify every finding references a specific file, code location, or data point.
- Verify recommendations are actionable and evidence-based.
- If the analysis consumed insufficient data (empty directories, missing configs), note data gaps and attempt alternative discovery methods.
IF VALIDATION FAILS:
- Identify which sections are incomplete or lack evidence
- Re-analyze the deficient areas with expanded search patterns
- Repeat up to 2 iterations
IF STILL INCOMPLETE after 2 iterations:
- Flag specific gaps in the output
- Note what data would be needed to complete the analysis
============================================================ OUTPUT
Dependency Analysis Report
Stack: {detected stack}
Total Dependencies: {direct} direct, {transitive} transitive
Lockfile: {present/missing}
Health Score: {score}/100
Summary
| Category | Count | Details |
| Up to date | {n} | Current version |
| Patch available | {n} | Bug fix updates |
| Minor available | {n} | Feature updates |
| Major available | {n} | Breaking updates |
| Deprecated | {n} | No longer maintained |
| Vulnerable | {n} | Known CVEs |
| Unused | {n} | No code references |
| License risk | {n} | Incompatible or missing |
Security Vulnerabilities
| Package | Version | CVE | Severity | Fixed In | Reachable |
| {name} | {version} | {CVE-ID} | {CRITICAL/HIGH/MED/LOW} | {version} | {yes/no/unknown} |
Update Plan
{prioritized plan from Phase 7}
DO NOT:
- Recommend removing peer dependencies required by other packages.
- Flag CLI tools as "unused" just because they have no import statements.
- Recommend major version bumps without listing breaking changes.
- Skip checking dev dependencies for vulnerabilities (they run in CI).
- Assume a package is safe just because it has many downloads.
- Install a package before verifying it exists on the registry (hallucinated names are the top AI supply-chain risk).
NEXT STEPS:
- Apply the safe updates and run the tests to verify.
- Measure the size impact of dependency changes (bundle analysis) if relevant.
- Run a broader security review beyond dependencies if needed.
- Remove dead code alongside unused dependencies if found.
============================================================ SELF-EVOLUTION TELEMETRY
After producing output, record execution metadata for skill improvement signals (optional).
Check if a project memory directory exists (e.g. .hermes/ or a skill-telemetry.md convention in use):
- If found, append to
skill-telemetry.mdin that memory directory
Entry format:
### /dependency-analysis — {{YYYY-MM-DD}}
- Outcome: {{SUCCESS | PARTIAL | FAILED}}
- Self-healed: {{yes — what was healed | no}}
- Iterations used: {{N}} / {{N max}}
- Bottleneck: {{phase that struggled or "none"}}
- Suggestion: {{one-line improvement idea for /evolve, or "none"}}Only log if the memory directory exists. Skip silently if not found. Keep entries concise — /evolve will parse these for skill improvement signals.
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
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.

