microsoft/fix-dependencies
Fix all vulnerabilities on the current branch using npm audit. Local branch only — no ADO/GitHub queries.
npx skills add https://github.com/microsoft/powerplatform-build-tools --skill fix-dependencies
Fix all vulnerabilities on the current branch using npm audit. No user input required.
Scope: local branch only — no origin sync, no ADO queries, no Dependabot. For S360 / ADO / GitHub alerts use /security-alerts.
npm audit --json 2>&1
Build a fix list. For each vulnerability, apply the first matching rule:
| Condition | Action |
| --------- | ------ |
| patched_version exists | Fix it — patch/minor/major all acceptable for security |
| inBundle: true, parent has newer version | Upgrade parent (Strategy B) |
| inBundle: true, no parent upgrade | Patch lock file directly (Strategy C) |
| patched_version: null | Accept risk, document, move on |
| scope: development + low severity + no patch | Accept risk, move on |
Known permanent accepted risk — do not flag: elliptic (GHSA-848j-6mx2-7j84) via rewiremock — dev-only, no patched version.
Add/update the entry in "overrides" in package.json, then:
npm view <pkg>@<version> version # confirm version exists
# edit package.json overrides
npm install 2>&1
npm ls <pkg> 2>&1 # confirm version took effect
Hard rules:
"minimatch": "^3.x" as a flat override — infinite npm loopajv override must stay at ^6.x — v8 breaks ESLintnanoid, electron-to-chromium, @types/node) unless explicitly askedUpdate the version in dependencies or devDependencies in package.json, then npm install.
inBundle: true packages)# Find all paths for the package
node -e "
const l = require('./package-lock.json');
console.log(
Object.keys(l.packages)
.filter(k => k.endsWith('/<pkg>'))
.map(k => k + ' -> ' + l.packages[k].version + ' inBundle:' + l.packages[k].inBundle)
.join('\n')
);"
# Get safe version metadata
npm view <pkg>@<patched-version> dist.tarball dist.integrity --json
# Patch all matching entries
node -e "
const fs = require('fs');
const l = require('./package-lock.json');
Object.keys(l.packages)
.filter(k => k.endsWith('/<pkg>'))
.forEach(k => {
l.packages[k].version = '<patched-version>';
l.packages[k].resolved = '<tarball-url>';
l.packages[k].integrity = '<integrity>';
});
fs.writeFileSync('./package-lock.json', JSON.stringify(l, null, 2) + '\n');
console.log('Patched');
"
npm install 2>&1
Document in final summary. Do not block or ask.
npm audit 2>&1
npm run ci 2>&1
npm run ci functional tests will fail locally (require PA_BT_ORG_PASSWORD) — expected, not a blocker.
If npm run ci fails on a non-functional-test step (TypeScript error, lint, unit test), fix it and re-run before continuing. Do not commit a broken build.
git add package.json package-lock.json
git status # confirm nothing accidental staged
git commit -m "chore: fix dependency vulnerabilities"
Then run /create-pr to create the pull request.
Print before handing off to /create-pr:
Take microsoft/fix-dependencies from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.
The instructions reference npm.
Without those the skill loads but fails at the first command.