跳到正文
Skillpedia
部署与云(DevOps)33k · #9111

dependabot-review

它能做什么

这项技能指导你的智能体管理 GitHub 上自动化的依赖更新拉取请求。适合希望保持项目包最新、又不想逐一手动审查每项改动的开发人员。

适用场景

  • ✓想检查某个仓库中所有待处理的 Dependabot 拉取请求的时候。
  • ✓需要判断哪些依赖更新有风险、哪些可以安全合并的时候。
  • ✓想获得一份需要人工审查的依赖更新报告的时候。

技能链接

https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/workflow-automation/dependabot-review/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/workflow-automation/dependabot-review/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请审查待处理的 Dependabot 拉取请求,合并安全的,并告诉我哪些需要我审查。”

每周 5 个新技能,1 分钟读完。

工作原理

智能体用 GitHub CLI 列出待处理的 Dependabot 拉取请求,按更新规模排序,检查它们的 CI 结果,然后合并低风险的更新。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Dependabot PR Review

You are a dependency management specialist. Your job is to review all open Dependabot PRs, assess risk, and take action.

Workflow

Step 1: Discovery

List all open Dependabot PRs:

gh pr list --author "dependabot[bot]" --state open --json number,title,labels,createdAt,headRefName --limit 50

If no PRs are found, inform the user and stop.

Step 2: Classification

For each PR, classify it into a risk tier based on the branch name and title:

Tier Criteria Action
Safe GitHub Actions updates (dependabot/github_actions/), patch bumps (1.2.3 -> 1.2.4) Auto-merge
Low Risk Minor bumps (1.2.0 -> 1.3.0) for well-known libraries Auto-merge after CI check
Review Required Major bumps (1.x -> 2.x), unknown libraries, security-tagged PRs Report to user

To determine bump type, parse the PR title. Dependabot titles follow patterns like:

  • Bump X from 1.2.3 to 1.2.4 (patch)
  • Bump X from 1.2.0 to 1.3.0 (minor)
  • Bump X from 1.0.0 to 2.0.0 (major)

Step 3: CI Check

For each PR you plan to merge, check CI status:

gh pr checks <number> --json name,state,bucket
  • If all checks pass: proceed with merge
  • If checks are pending: wait up to 2 minutes (poll every 30s). If still pending, skip and report as "CI pending"
  • If any check fails: skip and report to user

Step 4: Merge Safe PRs

For PRs classified as Safe or Low Risk with passing CI:

gh pr merge <number> --merge --delete-branch

Important rules:

  • Never force-merge
  • Never merge PRs with failing CI
  • Never merge major version bumps without user confirmation
  • Merge one at a time to avoid conflicts

Step 5: Report

After processing, present a summary table to the user:

## Dependabot Review Summary

### Merged (X PRs)
| PR | Update | Type |
|----|--------|------|
| #123 | actions/checkout v4 -> v6 | GitHub Actions |

### Needs Review (X PRs)
| PR | Update | Risk | Reason |
|----|--------|------|--------|
| #456 | jest 29 -> 30 | Major | Breaking changes possible |

### Skipped (X PRs)
| PR | Update | Reason |
|----|--------|--------|
| #789 | chalk 5.5 -> 5.6 | CI failing |

Guardrails

  • Always check CI before merging — never merge red PRs
  • Major bumps need user approval — present the changelog and ask
  • Rate limit merges — if there are more than 10 PRs, process in batches of 5 and ask the user before continuing
  • Conflict handling — if a merge fails due to conflicts, skip it and report. Do not attempt to resolve conflicts
  • Security PRs — if a PR has a security label or mentions a CVE, always flag it to the user even if it's a patch, so they are aware
  • Rebase cascades — after merging several PRs, remaining ones may need rebase. Run gh pr list --author "dependabot[bot]" again after each batch to see updated status

Common Patterns

Quick safe merge (GitHub Actions only): The user says "merge the actions PRs" — filter to dependabot/github_actions/ branches only.

Full review: The user says "review dependabot" — run the complete workflow above.

Dry run: The user says "check dependabot" or "show dependabot PRs" — run Steps 1-2 only, report classification without merging.

常见问题

哪些更新会被自动合并?

该技能会合并 GitHub Actions 的更新和补丁版本更新,次要版本更新则在 CI 通过后合并。

哪些需要我审查?

主要版本更新、未知的库以及带有安全标签的更新,会报告给你。

需要安装什么?

该技能使用 GitHub CLI(gh)来列出和合并拉取请求。

详情

作者的原始描述

Review and manage Dependabot PRs. Categorizes by risk, checks CI status, auto-merges safe updates, and reports issues. Use when the user says "review dependabot", "merge dependabot", "dependabot PRs", or "update dependencies".

repo: davila7/claude-code-templates

热度

GitHub 星标
33k
排名
#9111
许可证
MIT
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能