/dependabot-sweep:dependabot-sweepfrom dependabot-sweep
Fetches open Dependabot alerts via gh CLI, fixes per ecosystem (pnpm/npm, cargo, pip, go, bundler), verifies with audit, then branches, commits, pushes, opens a PR, and squash-merges once CI passes.
Ships in dependabot-sweep. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Resolve open Dependabot alerts end to end: fetch → triage → fix per ecosystem → verify → branch → commit → push → PR → merge. Built to run with minimal intervention.
Announce at start: "I'm using the dependabot-sweep skill to clear open Dependabot alerts."
This is a workflow skill. It invokes the gh CLI, the repo's package managers (pnpm / npm / cargo / pip / go / bundler), git, and may hand the final merge to the merge-pr skill.
Running this skill is the user's consent for the whole workflow — fetch through merge — with no confirmation prompts. Do not ask "should I push / open a PR / merge?". Proceed.
Stop and surface a concise summary only when an Escalate condition is hit:
When you escalate, do the fixable work first, then present only the decision the user actually needs to make.
Resolve the repo, then list every open alert grouped by manifest:
REPO=$(gh repo view --json nameWithOwner -q .nameWithOwner)
gh api "repos/$REPO/dependabot/alerts" --paginate \
-q '.[] | select(.state=="open")
| [.number, .security_advisory.severity, .dependency.package.ecosystem,
.dependency.package.name, .dependency.manifest_path, .dependency.scope,
.security_vulnerability.vulnerable_version_range,
.security_vulnerability.first_patched_version.identifier] | @tsv' \
| sort -t$'\t' -k5 | column -t -s$'\t'
If there are zero open alerts, report that and stop. Otherwise build a per-manifest work list. The first_patched_version is your target; the vulnerable_version_range tells you whether a copy still in the tree is affected.
Work off a fresh branch from the default branch — never on main:
git checkout -b fix/dependabot-security-alerts # reuse if it already exists
For each manifest, prefer the smallest change that lands a patched version:
>= patched.node_modules/build).See the Ecosystem playbooks below.
Conventional commit, specific git add (no -A):
fix(deps): resolve Dependabot security alerts
Body: per-manifest list of what changed with the alert numbers, plus any alert deliberately left unfixed and why. End with:
Co-Authored-By: Claude <current model name> <[email protected]>
Use the name of whichever model is actually running this session (e.g. "Claude Fable 5") — never hardcode a specific model name here, since it will go stale as new models ship.
git push -u origin fix/dependabot-security-alerts
gh pr create --title "fix(deps): resolve Dependabot security alerts" --body "<template below>"
PR=$(gh pr view --json number -q .number)
gh pr checks "$PR" --watch
gh pr merge "$PR" --squash --delete-branch (or invoke the merge-pr skill). Dependabot closes the alerts automatically once the fix lands on the default branch.Final report: alert numbers cleared, anything intentionally deferred, and the merge result.
package.json to >= patched.pnpm.overrides (pnpm) or overrides (npm), e.g. "qs": ">=6.15.2".pnpm install --lockfile-only (npm: npm install --package-lock-only).package.json. A nested package's pnpm.overrides is ignored in the workspace context (pnpm prints a warning) — put workspace overrides at the root.--ignore-workspace. Regenerate it from inside that directory:
cd <subdir> && pnpm install --lockfile-only --ignore-workspace
and put that project's overrides in its own package.json. A repo can have BOTH a root workspace lockfile and one or more standalone lockfiles pinning the same package at different versions — Dependabot lists each manifest_path separately, so fix every manifest the alerts name.package.json (e.g. lock pins [email protected] while package.json says ^16.2.7) is stale and was failing --frozen-lockfile — regenerating it produces a large but correct diff. Note the churn; don't treat it as suspicious.pnpm audit --audit-level=moderate (append --ignore-workspace when auditing a standalone project) and pnpm install --frozen-lockfile.cargo update -p <pkg>@<current> --precise <patched> from the crate dir (the one with Cargo.toml + Cargo.lock).cargo tree -i <pkg>@<ver> to see who pulls each.[build-dependencies] is compile-time (codegen, perfect-hash generators, etc.), never shipped in the binary, and usually not runtime-exploitable. If such a copy is pinned by an upstream crate (e.g. a framework's own toolchain) with no reachable patch, document it and recommend dismissing that alert rather than forking upstream. Fix the runtime-relevant copy and move on.requirements.txt: bump the pin to >= patched. Poetry: poetry update <pkg>. uv: uv lock --upgrade-package <pkg>. Regenerate the lock, then pip-audit / uv pip audit to verify.go get <pkg>@<patched> && go mod tidy. Verify with govulncheck ./... if available.bundle update --conservative <gem> to bump only the vulnerable gem. Verify with bundle audit.Any other ecosystem: apply the same pattern — direct bump or transitive override → regenerate lockfile → audit.
Resolves the open Dependabot alerts.
## Changes
| Manifest | Fix | Alerts |
|---|---|---|
| `<path>` | `<pkg> X → Y` (direct / override) | #NN, #NN |
## Notes
- <intentional lockfile churn, if any, and why>
- <any alert deliberately left, with the reason and a dismissal recommendation>
## Verification
- `<audit cmd>`: No known vulnerabilities found (moderate+)
- `<frozen-lockfile install>`: passes
- <build/test result or "relying on CI">
🤖 Generated with [Claude Code](https://claude.com/claude-code)
git add scoped to the manifests and lockfiles you changed.--no-verify; let hooks run.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub harnessprotocol/harness-kit --plugin dependabot-sweepOther plugins' skills for the same job