merge-dependabot-prslisted
Install: claude install-skill glslang/windbg-mcp
# Merge Dependabot PRs
Process the open Dependabot PR queue **oldest first**. For each PR: bring it up to date with the base, wait for CI, merge if green. If CI fails, attempt an automated fix (push to the bot's branch if writable, otherwise open a follow-up PR). **A single failing PR never stops the run** — log the reason and move on.
## 0. Detect GitHub tooling (once, up front)
```bash
if command -v gh >/dev/null 2>&1 && gh auth status >/dev/null 2>&1; then
echo "USE: gh"
else
echo "USE: mcp"
fi
```
- `gh` available → use `gh` everywhere below.
- Otherwise (Claude Code on the web, restricted environments) → use the `mcp__github__*` tools. Each step shows both.
Confirm the target repo (`gh repo view` / current `git remote -v`). If the user wants a different repo than `cwd`, ask.
## 1. List Dependabot PRs, oldest first
**gh:**
```bash
gh pr list \
--author 'app/dependabot' \
--state open \
--json number,title,createdAt,headRefName,baseRefName,mergeable,mergeStateStatus \
--jq 'sort_by(.createdAt)'
```
**MCP:** call `mcp__github__list_pull_requests` with `state: "open"`. Filter results where `user.login == "dependabot[bot]"`. Sort ascending by `created_at`.
If the list is empty, report so and stop.
Capture the ordered list of PR numbers — process them in that order, one at a time.
## 2. Inner loop: process one PR
For the current PR `#N`:
### 2a. Read state
- **gh:** `gh pr view N --json number,title,headRefName,baseRefName,mergeable,mergeStateStatus,s