agentleFS
jaskirat1616jaskirat1616/grok-skills/skills/dependabot-triage/SKILL.md

dependabot-triage

Skill22 starsChanged 2 months agoMITView on GitHub

Triage all open Dependabot and Renovate PRs in bulk: classify each by risk tier (patch / minor / major / security), auto-approve and merge safe patch-only bumps, flag breaking major upgrades with a summary of what changed, and post a digest of what was done. Use when dependency PRs are piling up, when the user says "deal with Dependabot", "triage dependency updates", or "merge the safe ones", or at the start of a maintenance window.

We split this skill into the rules it gives an agent

8 rules. About 0 are common, 1 is distinctive, and 7 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 7

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Very specific:

    When in doubt about the bump type (e.g.

    line 80
  2. Very specific:

    If CI is still running, wait up to 10 minutes (polling every 30s).

    line 91
  3. Very specific:

    If CI is disabled for dependency PRs in this repo (no checks at all), note it and proceed only when the user has passed --skip-ci-check …

    line 94
  4. Very specific:

    If the merge fails (conflict, branch protection, etc.), fall back to blocked and note it.

    line 110
  5. Very specific:

    Never merge a PR whose author is not dependabot[bot] or renovate[bot], even if found by the label query.

    line 140
  6. Very specific:

    Never merge a major bump automatically, even if patch-and-minor policy is set.

    line 141
  7. Very specific:

    Never approve a PR if gh pr checks shows any failure: a quiet pass is not the same as no checks.

    line 142
  8. Distinctive:

    Always post a comment on flagged PRs so the record is visible in the thread.

    line 143

≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

🤖 Auto-generated by weekly-pattern-learner · obsidian-pr-sync explicitly filters out dependabot/renovate PRs: the user handles them separately, but no skill existed to batch-triage them

Dependabot Triage

Bulk-process open Dependabot and Renovate PRs: approve and merge what is safe, flag what needs a human decision, and report what was done.

Inputs

  • Repository (optional): default to the current repo.
  • Auto-merge policy (optional, default: patch-only): none, patch-only, or patch-and-minor.
  • Require CI (optional, default: on): only merge PRs whose checks are green.

Step 1: Fetch all open dependency PRs

# Dependabot PRs
gh pr list --state open --label "dependencies" \
  --json number,title,author,labels,headRefName,url,isDraft \
  --jq '.[] | select(.author.login | test("dependabot|renovate"; "i"))'

# Also catch Renovate PRs not labelled "dependencies"
gh pr list --state open \
  --json number,title,author,labels,headRefName,url,isDraft \
  --jq '.[] | select(.author.login == "renovate[bot]" or .author.login == "dependabot[bot]")'

Merge both result sets, deduplicate by number, skip drafts.

Step 2: Classify each PR

Parse the PR title to extract package name and version change.

Dependabot title format: Bump <package> from <old> to <new> Renovate title format: Update dependency <package> to v<new> or chore(deps): update <package>

For each PR:

gh pr view <NUMBER> --json title,body,labels,reviews \
  --jq '{title, body: (.body | .[0:500]), labels: [.labels[].name], reviews: [.reviews[].state]}'

Classify:

TierConditionDefault action
patchsemver patch bump (X.Y.Z → X.Y.Z+1), no security labelauto-approve and merge (if CI green)
minorsemver minor bump (X.Y.Z → X.Y+1.0), no security labelapprove and merge when patch-and-minor policy
majorsemver major bump (X.Y.Z → X+1.0.0)flag for human: summarize breaking changes
securityhas security label, or title contains "CVE" or "vulnerability"escalate: approve if CI green AND patch/minor; human if major

When in doubt about the bump type (e.g. non-semver packages), treat as minor.

Step 3: Check CI for merge candidates

For each PR classified as auto-approvable:

gh pr checks <NUMBER> --json name,state,conclusion \
  --jq '[.[] | select(.conclusion != "success" and .conclusion != "skipped")] | length'

If CI is still running, wait up to 10 minutes (polling every 30s). If CI fails, demote to blocked: do not merge a PR with failing checks regardless of policy.

If CI is disabled for dependency PRs in this repo (no checks at all), note it and proceed only when the user has passed --skip-ci-check explicitly.

Step 4: Approve and merge safe PRs

For each auto-approvable PR with green CI:

# Approve
gh pr review <NUMBER> --approve --body "Auto-approved by dependabot-triage: patch bump, CI green."

# Merge (squash is the default; use the repo's configured merge strategy if known)
gh pr merge <NUMBER> --squash --delete-branch \
  --subject "$(gh pr view <NUMBER> --json title --jq .title)"

If the merge fails (conflict, branch protection, etc.), fall back to blocked and note it.

Step 5: Comment on flagged PRs

For each major or blocked PR, post one comment summarizing why it needs a human:

gh pr comment <NUMBER> --body "**dependabot-triage:** This is a major version bump. \
Review the changelog before merging: $(gh pr view <NUMBER> --json body --jq '.body | split("\n") | map(select(test("changelog|release|BREAKING"; "i"))) | .[0]').

No action was taken."

Step 6: Report

Print a digest, then stop. Do not merge anything not listed as approved in this report.

Dependabot triage complete.
  Merged (patch, CI green):   7 PRs  →  lodash 4.17.20→4.17.21, eslint 8.56.0→8.57.0, ...
  Merged (security, CI green): 1 PR  →  axios 1.6.2→1.7.9 (CVE-2024-39338)
  Flagged for human review:    2 PRs →  next.js 14→15 (major), @types/node 20→22 (major)
  Blocked (CI failing):        1 PR  →  typescript 5.4→5.5 (lint errors)
  Skipped (draft):             1 PR

  Open a flagged PR and run /pr-to-green after reviewing the changelog.

Safety guardrails

  • Never merge a PR whose author is not dependabot[bot] or renovate[bot], even if found by the label query.
  • Never merge a major bump automatically, even if patch-and-minor policy is set.
  • Never approve a PR if gh pr checks shows any failure: a quiet pass is not the same as no checks.
  • Always post a comment on flagged PRs so the record is visible in the thread.

Chaining

Before this skillAfter this skill
morning routine / maintenance windowolko:pr-to-green on flagged PRs after human review
olko:obsidian-pr-sync (which filters these out)back to obsidian-pr-sync for remaining human PRs

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.