基于 SOC 职业分类
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/ryanb/dotfiles --skill dependabot-prs命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| name | dependabot-prs |
| description | Review and merge open Dependabot pull requests |
| disable-model-invocation | true |
| allowed-tools | Bash, Read, Agent |
Follow these steps:
Read ~/.claude/dependabot-prs.json (if it exists) and look up the current repo's entry:
config="$HOME/.claude/dependabot-prs.json"
repo=$(gh repo view --json nameWithOwner --jq .nameWithOwner)
preferences=""
if [ -f "$config" ]; then
preferences=$(jq -r --arg repo "$repo" '.[$repo] // empty' "$config")
fi
The file maps owner/repo to freeform instructions, e.g.:
{
"ryanb/core-gem": "Only handle PRs with the javascript label."
}
If $preferences is non-empty, apply those instructions throughout the rest of the steps — for example, filtering the PR list, narrowing what to merge, or changing the merge strategy.
Run gh pr list --author "dependabot[bot]" --state open to get all open Dependabot PRs.
If there are no open PRs, tell the user and stop.
For each PR, launch a sub-agent (Agent tool, subagent_type: general-purpose and model: sonnet; run them in parallel) to review it. Each sub-agent should:
gh pr view <number> --json title,body,url,statusCheckRollup,mergeabledetailsUrl for GitHub Actions checks, targetUrl for external ones like Buildkite, whether it's safe to merge, whether it's a multi-dependency PR, per-dependency safety status (for multi-dependency PRs), and any concernsPresent a table summarizing all PRs:
For multi-dependency PRs, follow the table row with an indented breakdown listing each dependency, what the update does, and whether it introduces any potentially breaking changes or issues with the existing codebase.
Ask the user which PRs they'd like to merge. Wait for their response.
Merge PRs in this order: multi-dependency PRs first, then single-dependency PRs. This reduces the chance of merge conflicts between grouped and individual updates.
First determine which merge strategies the repo allows, since merging with a disabled strategy fails:
gh repo view --json squashMergeAllowed,rebaseMergeAllowed,mergeCommitAllowed
Pick an enabled strategy, preferring squash (--squash), then merge commit (--merge), then rebase (--rebase). If the per-repo preferences from step 1 name a strategy, use that instead — as long as it's enabled.
For each PR, one at a time:
gh pr review <number> --approvegh pr merge <number> --<strategy>Report the result of each merge.
Show pull requests that need review, ranked by ease of review. Displays PRs as clickable links with line counts, grouped as a dependency tree when PRs build on each other.
Interactive rebase onto a base branch, resolving conflicts along the way and verifying tests pass. Compares against remote when done.
Evaluate unresolved review comments on the current branch's PR and, after user confirmation, address each in a separate sub-agent and separate commit.