microsoft/dependabot-rollup
>- Review and optionally combine at most 11 open individual Dependabot patch and minor pull requests into a validated draft rollup PR. Use this skill as a local or cloud-agent fallback to native Dependabot groups without adding a custom scheduled GitHub Actions workflow. Always presents a dry-run plan and requires explicit approval before changing branches or GitHub pull requests.
npx skills add https://github.com/microsoft/fluentui --skill dependabot-rollup
Build a reviewable manual rollup of compatible individual Dependabot updates as a fallback to the repository's native Dependabot groups. The default operation is read-only: discover candidates, classify them, and present a plan. Never create a branch, merge commits, push, close pull requests, or open a rollup PR until the user explicitly approves the proposed candidates.
| Argument | Default | Purpose |
| --------------- | ---------------------------------- | --------------------------------------------- |
| --repo | microsoft/fluentui | Repository containing the Dependabot PRs |
| --base | master | Base branch for discovery and the rollup |
| --max | 11 | Eligible PR limit, from 1 through 11 |
| --push-remote | Current branch's configured remote | Writable fork remote used only after approval |
Parse overrides from $ARGUMENTS. Reject an invalid repository name, a --max value that is not an integer from 1 through 11, an unknown Git remote, or unknown arguments instead of guessing. The value 11 is an absolute ceiling, not only the default.
Verify GitHub CLI authentication and confirm that the current checkout has a remote suitable for publishing a branch:
gh auth status
git remote -v
Unless --push-remote was provided, resolve PUSH_REMOTE from remote.pushDefault, then the current branch's configured remote. If neither is set, ask the user to select a writable remote before any publish step. Do not assume origin is writable.
Do not create or switch branches during prerequisite checks or analysis. Unrelated local changes may remain in the checkout, but stop if the root yarn.lock has staged or unstaged changes because they could contaminate conflict resolution. Record the current branch, or the current commit when detached, as START_REF so it can be restored after the rollup is published or cancelled. If creating the rollup branch would overwrite a local change, stop and ask the user to resolve it.
Fetch open Dependabot PR metadata without changing Git or GitHub:
gh pr list \
--repo "$REPO" \
--state open \
--app dependabot \
--base "$BASE_BRANCH" \
--limit 200 \
--json number,title,url,updatedAt,baseRefName,headRefName
Do not rely on the dependencies label: repositories may customize or omit it.
Before parsing individual updates, strip an optional conventional commit prefix of chore(deps): or chore(deps-dev): from the title. Detect native grouped PRs by either the remaining title being in the form bump the <group> group ... (case-insensitive) or a headRefName containing one of the configured group identifiers: github-actions-minor-patch, github-actions-security, production-dependencies, development-dependencies, or security-dependencies. Exclude and report these PRs as already grouped by Dependabot; never place one rollup inside another.
After removing the optional conventional commit prefix, parse each title case-insensitively as bump <dependency> from <version> to <version>. Use the parsed dependency name as the deduplication key. Normalize a leading v in versions and accept only strict three-part numeric versions (major.minor.patch).
Classify an update as eligible only when:
Exclude and report:
Before applying the batch limit, group eligible PRs by dependency. For each dependency, retain the PR with the highest target version. If target versions are equal, retain the most recently updated PR. Report every other PR in the group as superseded, including the retained PR number and target version.
Check each retained candidate against the dependency versions currently declared on BASE_BRANCH before applying the batch limit. Inspect only the package.json files changed by that PR and parse them as JSON; do not infer versions with text matching. Ignore range operators when comparing the declared semantic version with the target version.
Sort the deduplicated candidates by updatedAt, oldest first, then by PR number ascending when timestamps are equal. Select at most MAX_PRS candidates. Apart from detecting configured native group identifiers, do not infer eligibility from labels or branch names. Do not include superseded PRs in the eligible or selected counts.
Show a compact report before doing anything else:
## Dependabot rollup plan
- Repository: owner/repo
- Base: master
- Eligible: 0
- Excluded: 0
- Superseded: 0
- Selected: 0 of 11 maximum
| PR | Update | Kind | Last updated |
| ---- | ---------------------- | ----- | ------------ |
| #123 | package 1.0.0 -> 1.1.0 | minor | 2026-01-01 |
### Excluded
| PR | Reason |
| ---- | ------------------- |
| #456 | semver-major update |
### Superseded
| PR | Dependency | Superseded by | Reason |
| ---- | ---------- | ------------- | -------------------------- |
| #789 | package | #790 | newer target version 1.2.0 |
If there are no selected PRs, stop after reporting that result. Otherwise ask the user to approve all candidates, approve specific PR numbers, edit the batch, or cancel. Do not treat the initial skill invocation as mutation approval.
Run this step only after the dry-run analysis and explicit approval. Use only the approved PR numbers, even if new candidates appear after the dry run.
Immediately before merging each approved PR, repeat the base-version check against the current rollup branch. Skip the PR as obsolete if another merged update made its target unnecessary or removed its dependency. This preflight is required even when Git predicts a clean merge; never allow a stale PR to downgrade or reintroduce a dependency.
Fetch the target base, record its SHA, and create a uniquely named branch in the current checkout. The rollup pull request will target BASE_BRANCH; never commit directly to the base branch:
TARGET_URL="https://github.com/${REPO}.git"
ROLLUP_BRANCH="dependabot-rollup/$(date -u +%Y%m%d-%H%M%S)"
START_REF="$(git symbolic-ref --quiet --short HEAD || git rev-parse HEAD)"
test -z "$(git status --porcelain -- yarn.lock)"
git fetch "$TARGET_URL" "$BASE_BRANCH"
BASE_SHA="$(git rev-parse FETCH_HEAD)"
git switch -c "$ROLLUP_BRANCH" "$BASE_SHA"
For each approved PR, fetch and merge its head in the order shown in the plan:
git fetch "$TARGET_URL" "pull/$PR_NUMBER/head"
git merge --no-ff --no-edit FETCH_HEAD
Dependency rollups commonly conflict because several PRs modify the same manifests and lockfile. If a merge conflicts, list the unmerged files:
git diff --name-only --diff-filter=U
Resolve the conflict only when every unmerged file is a package.json file or the root yarn.lock:
package.json, preserve the current rollup branch content and apply only the approved dependency's target version from the PR title. Preserve the existing range operator. If the current version is already equal to or newer than the target, abort the merge and report the PR as obsolete.yarn.lock is conflicted, restore its current rollup branch version. Regenerate it from the resolved manifests instead of manually editing lockfile conflict markers:git diff --name-only --diff-filter=U -- yarn.lock | grep -q . && \
git checkout HEAD -- yarn.lock
yarn install
git commit --no-edit and report the PR as merged with resolved dependency conflicts.If any conflict is outside dependency manifests and the root lockfile, the intended version change is unclear, lockfile generation fails, or the reviewed diff contains unrelated stale changes, abort that merge, report the PR as skipped with the specific reason, and continue with the remaining approved PRs:
git merge --abort
If no PRs merge successfully, report the result, switch back to START_REF, delete the empty rollup branch, and stop without creating an issue or PR:
git switch "$START_REF"
git branch -D "$ROLLUP_BRANCH"
Deduplicate the lockfile after all approved PRs have been merged and before running immutable installation or Nx validation:
yarn dedupe
If yarn.lock changed, commit that change separately so the rollup history records the normalization:
if ! git diff --quiet -- yarn.lock; then
git add yarn.lock
git commit -m "chore(deps): dedupe lockfile"
fi
yarn dedupe --check
Stop if deduplication or the dedupe check fails. Then run validation from the rollup branch through the repository's Nx workflow:
yarn install --immutable
yarn nx affected \
-t build test lint type-check \
--nxBail \
--base="$BASE_SHA" \
--head=HEAD
If deduplication, installation, or validation fails, report the failing command and leave the rollup branch checked out for inspection. Do not push the branch, open a PR, or create a tracking issue.
After validation succeeds, summarize the merged and skipped PRs and ask for explicit confirmation to publish. On approval, push the rollup branch to the configured writable remote and open a draft PR:
PUSH_REPO="$(gh repo view "$(git remote get-url "$PUSH_REMOTE")" --json nameWithOwner --jq .nameWithOwner)"
PUSH_OWNER="${PUSH_REPO%%/*}"
git push "$PUSH_REMOTE" "$ROLLUP_BRANCH"
gh pr create \
--repo "$REPO" \
--base "$BASE_BRANCH" \
--head "${PUSH_OWNER}:${ROLLUP_BRANCH}" \
--draft \
--title "chore(deps): roll up Dependabot updates" \
--body-file "$PR_BODY_FILE"
The PR body must list merged PRs, skipped PRs with reasons, and the exact validation commands. Do not close or modify the original Dependabot PRs automatically.
After publishing, or when the user declines publication, return to the starting ref only when no merge is in progress and doing so will not overwrite local changes. Keep the local rollup branch for PR follow-up:
git switch "$START_REF"
Report:
gh authentication.yarn.lock has local changes.Take microsoft/dependabot-rollup 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.