agentleFS
chadixearthchadixearth/graphyloop/skills/dependency-audit/SKILL.md

dependency-audit

Skill3 starsChanged 10 days agoMITView on GitHub

Use this skill before adding a dependency, when an audit or Dependabot alert fires, or when a lockfile changes in a review - triaging CVEs by real reachability, spotting typosquats and install scripts, pinning and lockfile discipline, and license checks. Covers deciding what actually needs fixing instead of chasing every advisory to zero.

  • Installs packages

42 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use api-audit, container-audit and 8 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • gmanch94Skill

    api-audit

    Guides a structured API portfolio audit — from discovery through primary-source-verified inventory, shortcomings analysis, prioritized recommendations, executive summary, and options analysis. Enforces primary-source discipline, cross-file consistency, and advisor review gates. Use when auditing an API portfolio, evaluating a vendor's developer ecosystem, or producing defensible technical analysis of an API set.

    Also in 3 projects that use this

  • grichaSkill

    container-audit

    Audit local Docker images and running containers for hardening issues before deploy — privileged flags, root users, stale base images, missing resource limits. Use for pre-deploy container review.

    Also in 3 projects that use this

  • conorluddySkill

    performance-profiling

    Instruments integration and performance analysis workflows for iOS apps. Use when profiling CPU usage, memory allocation, network activity, or energy consumption. Covers Time Profiler, Allocations, Leaks, Network instruments, and performance optimization strategies.

    Also in 3 projects that use this

  • OpenAISkill

    threat-model

    Use when Codex is already in the threat-modeling phase of a security scan, the user explicitly invokes $threat-model, or the user explicitly asks to create, update, or persist a repository threat model. Do not use as the primary trigger for full PR, commit, branch, patch, or repository scans.

    Also in 4 projects that use this

  • renfei-designSkill

    a11y-audit

    Audit Figma designs for WCAG accessibility issues — color contrast, minimum font size, touch target sizing, and missing text alternatives. Use when asked to check accessibility, audit contrast ratios, find a11y issues, verify WCAG compliance, or review designs for accessibility problems. Scans nodes, analyzes offline, and annotates issues in Figma.

    Also in 3 projects that use this

  • GitHubSkill

    accessibility-audit

    Audits actual components and routes against applicable WCAG 2.2 A/AA criteria using consumer-owned design-system evidence and repository tools. Use when asked for an accessibility audit, a11y check, keyboard or focus review, contrast check, or screen-reader verification.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 39 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Before npm i <new-package> (or pip/go/cargo/composer equivalent).

    line 15
  2. Distinctive:

    Run the tool, then think — the count is not the finding.

    line 40
  3. Very specific:

    Check resolved URLs point at the expected registry (not a random tarball or git URL) and integrity hashes are present.

    line 77
  4. Very specific:

    Keep .npmrc/registry config in the repo so every machine and CI resolve from the same place.

    line 81
  5. Very specific:

    Remove what you stopped using: npx depcheck, then delete.

    line 88
  6. Distinctive:

    Prefer fewer, larger, well-maintained dependencies over many micro-packages.

    line 90

“Common” is measured: kept by at least 6 in 10 of the 39 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Dependency audit and supply chain

Two failures, opposite directions: shipping a package nobody vetted (install script, typosquatted name, unmaintained transitive dep), and burning a day on advisories that are unreachable in this app. Both come from not asking is this reachable, and what does it cost to remove.

When to activate

  • Before npm i <new-package> (or pip/go/cargo/composer equivalent).
  • npm audit / Dependabot / Snyk / GitHub alert, or a CI security job failing.
  • A PR whose diff includes a lockfile.
  • Post-incident: "was this package the way in?"

Adding a dependency — the 60-second vet

  1. Do you need it? Platform first: Intl, URL, fetch, crypto.subtle, structuredClone, CSS :has. A 3-line helper beats a transitive tree.
  2. Is the name right? Typosquats live one character away (react-domm, lodash.js, crossenv, discord.js-selfbot). Copy the name from the official docs, never from a model's memory or a blog post.
  3. Is it alive? Last publish, open-issue trend, maintainer count, downloads. One maintainer + last release three years ago = you are adopting the code.
  4. What does it drag in? npm view <pkg> dependencies / npx howfat <pkg> — count transitives and installed size before, not after.
  5. Does it run code on install? npm view <pkg> scripts — a postinstall in a utility library is a red flag; install with --ignore-scripts if you must.
  6. License compatible? MIT/Apache-2.0/BSD fine for most products; AGPL/SSPL and "source-available" licenses are a legal decision, not a dev one.
  7. Pin it. Exact version in package.json (no ^ for anything security- or build-critical), lockfile committed, npm ci in CI — never npm install there.

Triaging an advisory

Run the tool, then think — the count is not the finding.

npm audit --json            # or: pnpm audit / yarn npm audit
npm ls <vulnerable-pkg>     # WHO pulls it in — the fix lives at that edge
pip-audit                   # python
govulncheck ./...           # go: reports reachable symbols, not just versions
cargo audit                 # rust
composer audit              # php

For each advisory answer four questions:

  1. Reachable? Is the vulnerable function called on a path that handles untrusted input? A ReDoS in a CLI-only formatter, or a dev-dependency in devDependencies that never ships, is not the same risk as a parser in your request path. govulncheck answers this natively; in JS, grep the call sites.
  2. Runtime or build-time? devDependencies still matter (they run on your machine and in CI, with tokens present) but they are not production exposure. Say which one you mean.
  3. Fix available? Direct dep → bump and test. Transitive → bump the parent; if the parent is stale, overrides/resolutions (npm/pnpm/yarn) pin the fixed version, with a comment naming the advisory and a follow-up to remove it.
  4. No fix? Mitigate and record: disable the feature, validate at the boundary, or replace the package. npm audit fix --force is not a triage step — it happily installs a major bump that breaks the build.

Severity from the advisory is a prior, not a verdict. A "critical" in an unused code path is lower priority than a "moderate" in your auth flow. Order the report by reachability, and say which CVEs you are deliberately accepting and why.

Lockfile review

  • Exactly one lockfile per project; two package managers means two dependency graphs and a nondeterministic build.
  • A lockfile diff with no package.json change deserves a look: it can be a legitimate transitive bump, or an unrequested major slipping in.
  • Check resolved URLs point at the expected registry (not a random tarball or git URL) and integrity hashes are present.
  • Review the added names, not just the count — this is where a typosquat or an install-script package arrives.
  • Keep .npmrc/registry config in the repo so every machine and CI resolve from the same place.

Keeping it clean

  • CI: npm ci + an audit step with an explicit threshold (fail on high in prod deps), plus Dependabot/Renovate grouped weekly so bumps are reviewable.
  • Remove what you stopped using: npx depcheck, then delete. Unused packages are attack surface with no upside.
  • Prefer fewer, larger, well-maintained dependencies over many micro-packages.
  • Record the decision in memory (memory_store, type decision) when you accept a risk or add an override, so the next session does not re-litigate it.

Verification

  • Show the tool output before and after (npm audit summary counts, or the specific advisories resolved).
  • npm ci from a clean state succeeds and the app builds — a fix that breaks the build is not a fix.
  • Tests pass after the bump; for a major bump, name what you exercised.
  • npm ls <pkg> proves the vulnerable version is actually gone from the tree, not merely deduped elsewhere.

Reporting

advisory · package (direct/transitive) · reachable? · runtime/dev · action taken. List accepted risks separately with the reason and the mitigation. Never report "0 vulnerabilities" without the command output that says so, and never claim a package is unreachable without naming where you looked.

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.