agentleFS
jelbirtjelbirt/LLM-Skill-Build/deps-audit/SKILL.md

deps-audit

Skill1 starsChanged 3 months agoApache-2.0View on GitHub

Produce a unified, prioritized report on project dependencies across three dimensions - security vulnerabilities, version freshness, and unused or missing packages - by orchestrating npm/yarn/pnpm audit, outdated, and depcheck into one triaged action list. Use when the user wants a dependency audit, asks if packages are outdated, wants to check for vulnerabilities, wants to find unused dependencies, or wants a dependency health report - this goes beyond automated security-only alerts like GitHub Dependabot by also covering freshness and utilization.

  • Installs packages

4 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 4 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use the matching tool for all commands below.

    line 20
  2. Distinctive:

    Run the audit command for the detected package manager:

    line 24
  3. Distinctive:

    Run the outdated command:

    line 43
  4. Very specific:

    Do NOT run npm install or any command that modifies package.json / lockfiles — only report and suggest commands

    line 112
  5. Very specific:

    If depcheck is not available and the user wants it run, suggest the install command but don't install unilaterally

    line 113
  6. Distinctive:

    Never mark a package as unused without checking import references — grep the source tree

    line 114

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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

Skill: deps-audit

Audit the project's dependencies across three dimensions: security, freshness, and utilization. Produce a prioritized action list.

Step 0 — Detect package manager

Check for:

  • package-lock.json → npm
  • yarn.lock → yarn
  • pnpm-lock.yaml → pnpm
  • bun.lockb → bun

Use the matching tool for all commands below. If multiple lockfiles exist, flag it and ask which to use.

Step 1 — Security

Run the audit command for the detected package manager:

  • npm: npm audit --json
  • yarn: yarn audit --json
  • pnpm: pnpm audit --json
  • bun: bun audit (or fallback to npm audit against the lockfile)

Parse results into:

  • Critical / High: immediate fix candidates
  • Moderate: next-sprint candidates
  • Low: backlog

For each vulnerability, report:

  • Package and version
  • Severity and CVE / advisory ID
  • Whether a fix is available (and what version to upgrade to)
  • Whether it's a direct dependency or transitive

Step 2 — Freshness

Run the outdated command:

  • npm: npm outdated --json
  • yarn: yarn outdated --json
  • pnpm: pnpm outdated --format json

Classify each outdated package:

  • Major behind: breaking changes — plan and test carefully
  • Minor behind: new features, usually safe
  • Patch behind: bug fixes, update liberally

Flag dependencies where:

  • Multiple majors behind (likely upgrade-blocked by something)
  • Peer-dependency conflicts would prevent a clean update
  • Framework-critical packages (React, Next, TypeScript) are out of date

Step 3 — Utilization

Detect unused / unreferenced dependencies:

  • Try npx depcheck --json (works with any package manager)
  • Fall back to grep-based detection: for each dependencies entry in package.json, grep the source tree for require('pkg') or from 'pkg'
  • Exclude dev-only packages that wouldn't appear in source (eslint configs, type defs for runtime-only packages, build-time plugins listed elsewhere)

Report:

  • Unused dependencies (candidates for removal)
  • Potentially unused (used only in config files / scripts — verify before removing)
  • Missing dependencies (imported but not declared — bugs waiting to happen)

Step 4 — Report

# Dependency Audit — [date]

## Security (X critical, Y high, Z moderate, W low)
| Package | Severity | Fix available | Action |
|---------|----------|---------------|--------|
| ... | ... | ... | ... |

## Freshness (A major, B minor, C patch behind)
| Package | Current → Latest | Type | Notes |
|---------|------------------|------|-------|
| ... | ... | ... | ... |

## Utilization
**Unused (remove candidates):**
- `pkg-name` — not referenced in source

**Missing (add candidates):**
- `pkg-name` — imported but not in package.json

## Prioritized Actions
### P0 — Do now
1. ...

### P1 — Next sprint
1. ...

### P2 — Backlog
1. ...

## Suggested Commands
```bash
# Example upgrade commands for the P0 / P1 items
npm install pkg@^5.0.0
npm uninstall unused-pkg

## Rules

- Do NOT run `npm install` or any command that modifies `package.json` / lockfiles — only report and suggest commands
- If `depcheck` is not available and the user wants it run, suggest the install command but don't install unilaterally
- Never mark a package as unused without checking import references — grep the source tree
- Respect monorepo structure: if the project has workspaces, audit each workspace separately or ask which to audit

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.