Review a web game's dependencies for risk. Find every library (package.json and lockfile, import maps, CDN script tags, URL imports, vendored files), flag unpinned versions and CDN URLs without versions, missing integrity hashes, the same library from two sources, licenses that need a look, devDependencies used at runtime and imports missing from package.json, check for outdated packages and np...
Download skill (.zip) Files on GitHubGame dependency audit
python3 <skill>/scripts/dep-audit.py <project> # offline checks
python3 <skill>/scripts/dep-audit.py <project> --online # + latest versions from npm, + npm audit (if package-lock.json)
Lists each dependency, its version, where it comes from and its license (when node_modules is present), then the findings:
| Finding | Why it matters | Fix |
|---|---|---|
latest, *, ranges without a lockfile |
Installs change under you; a new major breaks the game | Exact versions, or ranges + committed lockfile |
| CDN URL without a version | The file can change any day | Pin lib@1.2.3 in the URL |
No integrity= on a CDN <script> |
A compromised CDN could inject code | Add SRI hashes, or vendor the file |
| Same library twice (npm + CDN, two versions) | Bigger download, confusing bugs | One source, one version |
| Copyleft or missing license | You may not be allowed to ship it how you plan | Check the terms; replace if needed |
| devDependency imported by game code | Missing in production builds | Move to dependencies |
| Import not in package.json | Works by accident | Add it |
| Outdated / vulnerable | Bugs and security issues | Upgrade deliberately (below) |
Upgrading safely
- One dependency at a time. Read its changelog for breaking changes. Game engines (Phaser, three.js) change APIs between versions, and three.js changes things in minor versions too.
- Upgrade, run the game, run game-regression-testing (and the viewer’s preview for WebGL).
- Commit with the reason:
build: upgrade three 0.170 → 0.187 (fixes shadow bug). - Don’t upgrade during a jam or right before a release unless it fixes a real problem.
For web games specifically
- Fewer dependencies is a feature: a small hand-written helper beats a big library for one function.
- Vendor pinned copies of CDN libraries for itch.io and offline builds (with their LICENSE files).
- Bash.js (
https://bash.tv/bash/v1.js) is required for Bash previews and is expected to be a CDN script. Don’t flag or vendor it. - Never commit API keys “as config”. Keys belong in Bash Settings → API keys or server-side secrets (bash-public-repo-privacy-check).