# audit-and-reduce-dependencies

> Claude/Codex skill by [@grafana](https://omgskills.com/library/grafana/index.md) · 286 stars · Updated 2026-10-17

Reduces JavaScript dependency footprint with pnpm while preserving lockfile, workspace layout, and dependency range style. Runs /check-npm first, then removes unused deps, dedupes versions, ranks transitive closure, and reports Keep/Replace/Remove triage. Use when cleaning up pnpm dependencies, reducing lockfile size, or shrinking node\_modules in Grafana plugins; not for Go modules or full GitHub Actions workflow audits.

## Install

```sh
git clone https://github.com/grafana/skills /tmp/skills && ln -s /tmp/skills/skills/grafana-plugins/audit-and-reduce-dependencies ~/.claude/skills/audit-and-reduce-dependencies
```

## From README

Audit and reduce dependencies Reduce JavaScript dependency footprint. Use pnpm only. Preserve the lockfile, workspace layout, and dependency range style unless there is a concrete reason to change them. For GitHub Actions workflow triage (action choice, permissions, pinning), use a dedicated workflow audit — not the reporting format below (workflow file + step only when the finding is pnpm policy). Workflow Hardening gate: run /check-npm (read-only). See check-npm. Establish the baseline. Remove unused direct dependencies. Deduplicate direct dependency versions in monorepos. Rank direct dependencies by transitive lockfile closure. Use closure data to find low-risk minor/patch upgrades. Use closure data to find trivial dependencies worth inlining. Check e18e recommendations for replacements/removals. Reinstall, verify, and report measured impact. Step 0: Hardening gate (/check-npm) Run /check-npm before mutating manifests or lockfiles.

## Links

- HTML page: https://omgskills.com/library/grafana/skills/audit-and-reduce-dependencies/
- GitHub: https://github.com/grafana/skills
- Author: [@grafana](https://omgskills.com/library/grafana/index.md)

## More from this repo

- [k6-docs](https://omgskills.com/library/grafana/skills/k6-docs/index.md) — Used to write or review k6 documentation across the three k6 repositories - k6-DefinitelyTyped (TypeScript types),...
   - [@grafana](https://omgskills.com/library/grafana/index.md) · 295 stars
- [adaptive-metrics](https://omgskills.com/library/grafana/skills/adaptive-metrics/index.md) — Cut Grafana Cloud Metrics cost by shrinking active-series count with Adaptive Metrics aggregation rules —...
   - [@grafana](https://omgskills.com/library/grafana/index.md) · 286 stars
- [admin](https://omgskills.com/library/grafana/skills/admin/index.md) — Used to manage Grafana Cloud accounts — organizations, stacks, RBAC roles and assignments, SSO/SAML/OAuth/GitHub auth,...
   - [@grafana](https://omgskills.com/library/grafana/index.md) · 286 stars
