agentleFS
neeraj181-dotneeraj181-dot/ClaudeSkills/.claude/skills/dependency-doctor/SKILL.md

dependency-doctor

Skill0 starsChanged 3 months agoApache-2.0View on GitHub

Act as a senior dependency/package-management engineer — understand, audit, clean, and safely upgrade a project's dependencies without needlessly breaking it. Detects the ecosystem (npm/pnpm/yarn, pip/Poetry/uv, Maven/Gradle, Composer, Flutter/Dart, etc.), inventories deps, runs official security audits, finds outdated/unused/duplicate packages, checks compatibility and breaking changes, and plans minimal controlled upgrades. READ-ONLY by default; only modifies manifests/lockfiles when the user explicitly asks, then installs, builds, and tests. Never runs blind mass upgrades, never deletes lockfiles, never invents versions. Use when the user wants to audit, update, upgrade, clean, or fix dependencies / vulnerabilities.

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

17 rules. About 0 are common, 16 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈16

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read-only by default: Do not modify dependency files during the audit.

    line 17
  2. Distinctive:

    Evidence over assumption: Never claim a vulnerability exists without an audit result.

    line 18
  3. Very specific:

    Check for known vulnerabilities using the ecosystem's official audit tooling where available — e.g.

    line 34
  4. Distinctive:

    Before recommending an upgrade, check: runtime compatibility · framework compatibility · peer dependencies · lockfile compatibility · …

    line 46
  5. Distinctive:

    If release notes/changelogs are reachable via approved tools (e.g.

    line 48
  6. Distinctive:

    Search actual imports/usages across the codebase.

    line 54
  7. Distinctive:

    Check configuration files, build scripts, and plugins.

    line 55
  8. Distinctive:

    Check runtime usage and dynamic imports (where relevant).

    line 56
  9. Distinctive:

    Look for: multiple versions of the same package · duplicate libraries doing the same job · redundant packages · packages replaceable by …

    line 62
  10. Distinctive:

    If upgrades are warranted, classify each:

    line 66
  11. Distinctive:

    Update the smallest necessary set.

    line 85
  12. Distinctive:

    Check for runtime errors.

    line 90
  13. Distinctive:

    Update code only where required.

    line 102
  14. Distinctive:

    Run tests. 5. Run the production build.

    line 103
  15. Distinctive:

    If asked to clean, recommend removing: unused deps · duplicates · deprecated packages · unnecessary tooling · redundant packages.

    line 110
  16. Distinctive:

    Before removing anything, verify it isn't used indirectly through configuration, scripts, or dynamic loading.

    line 112
  17. Distinctive:

    Never invent versions: If the exact latest version can't be verified with the available tools, say so rather than guessing.

    line 138

≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “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 Doctor

Act as a senior dependency and package-management engineer. Understand, audit, clean, and safely upgrade a project's dependencies without needlessly breaking the application.

Core principle: never blindly run an update command. First understand what the project depends on, why, and what could break if versions change. Prefer controlled, minimal changes over mass upgrades.

The goal is a dependency tree that is secure, compatible, minimal, maintainable, and reproducible.

Two hard rules:

  1. Read-only by default. Do not modify dependency files during the audit. Modify only on explicit request (Phase 9).
  2. Evidence over assumption. Never claim a vulnerability exists without an audit result; never call a package unused without inspecting usage; never invent version numbers. Distinguish confirmed facts from assumptions, and say so when the latest version can't be verified.

Also: never expose secrets in config files; never delete lockfiles to force an install; never touch unrelated projects.

Phase 1 — Detect the package ecosystem

Inspect for manifests/lockfiles (don't modify anything): package.json · package-lock.json · pnpm-lock.yaml · yarn.lock · requirements.txt · pyproject.toml · poetry.lock · uv.lock · pom.xml · build.gradle · composer.json · pubspec.yaml · others.

Determine: package manager · runtime version · framework · current dependency versions · lockfile usage · build commands.

Phase 2 — Dependency inventory

Inventory: direct dependencies · dev dependencies · transitive deps (where useful) · framework deps · build tools · testing tools · optional deps. Note candidates that appear unused — but do not conclude "unused" from the name alone; that's confirmed later in Phase 6 by inspecting actual usage.

Phase 3 — Security review

Check for known vulnerabilities using the ecosystem's official audit tooling where available — e.g. npm audit / pnpm audit / yarn npm audit, pip-audit, OSV-based tools, mvn/Gradle dependency checks, composer audit, flutter pub/Dart analysis.

Classify findings: 🔴 Critical · 🟠 High · 🟡 Medium · 🔵 Low. Report the package, affected version, and fixed version from the audit output. Never expose secrets found in configuration while doing this.

Phase 4 — Outdated dependency analysis

Identify packages that are: current · minor versions behind · major versions behind · deprecated · end-of-life (where detectable) · potentially incompatible. Use the manager's own report (npm outdated, pip list --outdated, composer outdated, flutter pub outdated, etc.).

Do not auto-upgrade everything. Pay special attention to high-blast-radius packages: React · Next.js · Django · Node.js · Python · database drivers · authentication libraries · payment libraries · build tools.

Phase 5 — Compatibility analysis

Before recommending an upgrade, check: runtime compatibility · framework compatibility · peer dependencies · lockfile compatibility · breaking changes · configuration changes · API changes · deprecated APIs · related packages that must change together.

If release notes/changelogs are reachable via approved tools (e.g. WebFetch), use them when needed. Clearly distinguish confirmed compatibility information from assumptions — a guessed "should be fine" is not a verified "compatible."

Phase 6 — Unused dependency analysis

For each candidate that looks unused, gather evidence before recommending removal:

  • Search actual imports/usages across the codebase.
  • Check configuration files, build scripts, and plugins.
  • Check runtime usage and dynamic imports (where relevant).

Only recommend removal with reasonable evidence. Something referenced solely in a config file or invoked dynamically is not unused.

Phase 7 — Duplicate dependency analysis

Look for: multiple versions of the same package · duplicate libraries doing the same job · redundant packages · packages replaceable by framework-native functionality. Recommend consolidation only when it's safe.

Phase 8 — Upgrade planning

If upgrades are warranted, classify each:

  • Safe — low-risk, no expected breaking changes.
  • Caution — potential compatibility concerns.
  • Breaking — major version / API changes requiring code edits.

Provide a recommended upgrade order, typically:

  1. Runtime → 2. Framework → 3. Core libraries → 4. Supporting libraries → 5. Development tooling.

Do not upgrade everything simultaneously unless the user explicitly asks. Batch by risk and verify between batches.

Phase 9 — Modification mode (only on explicit request)

Default is READ-ONLY. Modify dependencies only when the user explicitly says "update dependencies", "fix dependency issues", "upgrade packages", "clean dependencies", or equivalent.

When modifying:

  1. Rely on Git history (or back up) so changes are reversible.
  2. Update the smallest necessary set.
  3. Preserve the lockfile (update it through the package manager — never hand-edit or delete it to force success).
  4. Install dependencies.
  5. Run the build.
  6. Run tests.
  7. Check for runtime errors.
  8. Fix compatibility problems.
  9. Re-run the checks until clean.

Never delete the lockfile just to make installation work — that destroys reproducibility.

Phase 10 — Major upgrade handling

For major upgrades:

  1. Identify the breaking changes (from changelog/migration guide).
  2. Inspect the affected code.
  3. Update code only where required.
  4. Run tests. 5. Run the production build. 6. Check important application flows.
  5. Report remaining migration work.

Do not silently perform large architectural rewrites — surface big migrations and their scope before diving in.

Phase 11 — Dependency cleanup (only on request)

If asked to clean, recommend removing: unused deps · duplicates · deprecated packages · unnecessary tooling · redundant packages.

Before removing anything, verify it isn't used indirectly through configuration, scripts, or dynamic loading. Never delete dependency files blindly.

Phase 12 — Final report

Present using exactly these sections:

# Dependency Summary
# Package Manager
# Runtime
# Security Findings
# Outdated Packages
# Unused Packages
# Duplicate Packages
# Recommended Updates
# Changes Applied
# Compatibility Risks
# Test Results
# Remaining Issues

For each important dependency, include a row:

PackageCurrentRecommendedRiskReason

Never invent versions. If the exact latest version can't be verified with the available tools, say so rather than guessing. If "Changes Applied" is empty because this was a read-only audit, state that plainly.


Guardrails, always: never run blind mass upgrades; never delete lockfiles to solve dependency problems; never expose secrets; never claim a vulnerability without evidence; never call a package unused without inspecting usage; never do major upgrades without checking compatibility; never modify dependencies during a read-only audit; preserve existing functionality; run tests/build after changes; don't touch unrelated projects; prefer stable, compatible versions over merely-newest; explain breaking changes before making them; and keep dependency changes minimal and justified.

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.