fix-dependabot-prs

5
0
Source

dependabotから上がってきた複数のPRを一括で解決し、まとめPRを作成する。dependabotのPR対応を依頼された時に使用。

Install

mkdir -p .claude/skills/fix-dependabot-prs && curl -L -o skill.zip "https://mcp.directory/api/skills/download/3670" && unzip -o skill.zip -d .claude/skills/fix-dependabot-prs && rm skill.zip

Installs to .claude/skills/fix-dependabot-prs

About this skill

Dependabot PRまとめ解決スキル

dependabotから上がってきた複数のPRを一括で解決し、まとめPRを作成します。

実行手順

1. dependabotのPR一覧を取得

gh pr list --author "app/dependabot" --state open

2. 各PRの状態を確認

各PRについて以下を確認する:

  • PRの変更内容(gh pr view <PR番号>
  • GitHub ActionsのCI結果(gh pr checks <PR番号>
  • 差分内容(gh pr diff <PR番号>

3. まとめブランチを作成

git checkout main
git pull origin main
git checkout -b chore/dependabot-updates-$(date +%Y%m%d%H%M%S)

4. 各PRの変更を取り込む

各dependabot PRのブランチから変更を取り込む:

# 例: dependabot/npm_and_yarn/パッケージ名-バージョン のようなブランチ名
git fetch origin <dependabotブランチ名>
# コミットハッシュは `gh pr view <PR番号> --json commits --jq '.commits[0].oid'` で取得できます
git cherry-pick <コミットハッシュ>
# または
git merge origin/<dependabotブランチ名> --no-edit

5. 矛盾の解決

PR同士で矛盾する変更がある場合:

  • 両方の変更を取り込むのが難しい場合は、片方を諦めてOK
  • 諦めた理由と背景は、後でまとめPRにコメントとして記載する

6. コード生成の実行

dependabot PRはCIのcodegenステップで落ちていることが多いため、必ず実行する:

flutter pub run build_runner build --delete-conflicting-outputs
dart format lib

変更があればコミット:

git add -A
git commit -m "chore: run build_runner after dependency updates"

7. iOS Podfile.lockの更新

iOSの依存関係も更新が必要な場合が多い:

cd ios
pod install --repo-update
cd ..

変更があればコミット:

git add ios/Podfile.lock
git commit -m "chore: update Podfile.lock"

8. ビルド・テストの確認

flutter analyze
flutter test

9. まとめPRを作成

git push origin HEAD
gh pr create --title "chore: dependabot PRまとめ更新" --body "$(cat <<'EOF'
## 概要
dependabotから上がってきた複数のPRをまとめて対応しました。

## 取り込んだPR
- #PR番号1: パッケージ名 x.x.x → y.y.y
- #PR番号2: パッケージ名 x.x.x → y.y.y
...

## 追加対応
- [ ] build_runner実行
- [ ] Podfile.lock更新

## 除外したPR(ある場合)
- #PR番号: 除外理由
EOF
)"

10. 除外したPRがある場合

まとめPRにコメントで理由を記載:

gh pr comment <まとめPR番号> --body "$(cat <<'EOF'
## 除外したdependabot PR

### #PR番号: パッケージ名の更新
**理由**: (例)他のパッケージとの依存関係が矛盾するため
**背景**: (詳細な説明)
**今後の対応**: (必要であれば)
EOF
)"

11. 元のdependabot PRをクローズ

まとめPRがマージされた後、元のdependabot PRをクローズする:

gh pr close <PR番号> --comment "まとめPR #<まとめPR番号> で対応しました"

注意点

  • dependabotのPRは作成時点でCIが落ちていることが多いので、必ずCI結果を確認する
  • Flutter/Dartプロジェクトではbuild_runnerの実行が必要なことが多い
  • iOSビルドにはPodfile.lockの更新が必要なことが多い
  • 複数のパッケージ更新で依存関係が矛盾する場合は、無理に両方を取り込まず、片方を諦める判断も重要
  • 諦めた場合は必ず理由を記録する

You might also like

flutter-development

aj-geddes

Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.

643969

drawio-diagrams-enhanced

jgtolentino

Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.

591705

ui-ux-pro-max

nextlevelbuilder

"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."

318398

godot

bfollington

This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.

339397

nano-banana-pro

garg-aayush

Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.

451339

fastapi-templates

wshobson

Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.

304231

Stay ahead of the MCP ecosystem

Get weekly updates on new skills and servers.