Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

dependabot-branch-validation

БесплатноБез исполняемых скриптовНе проверен

This skill should be used when the user asks to "validate Dependabot branches", "consolidate the Dependabot PRs", "roll up the dependency bumps", "check the…

kanopiот kanopi★ 18 звёзд на GitHub

Об этом скилле

Dependabot Branch Validation

Purpose

Combine every open Dependabot branch into a single consolidated branch, validate the whole set together, and open one pull request for it. Dependabot edits lock files directly rather than running the package manager the way a developer would, so two classes of problem show up: a lock file that does not match what the resolver actually produces, and tracked generated files that were never regenerated alongside the lock. Reviewing fifteen separate PRs also costs fifteen review cycles for what is usually one decision.

The consolidated branch carries one commit per original Dependabot PR, each referencing that PR number, so the history stays auditable and any single bump can be reverted on its own.

Scope and safety

  • This skill ends in a push and a pull request. That is the deliverable, but push only after the user has seen the branch contents in step 10 and said to go. Never push on your own judgement that it looks fine, and treat a request to skip the review as a request to see it quickly, not a waiver.
  • Never force-push. Never push to main, dev, or any other base branch.
  • Never merge the consolidated PR. Never close or delete the original Dependabot PRs or their remote branches: Dependabot closes its own PRs when the bumps land, and closing them by hand is the user's call.
  • Take the database snapshot before the first branch switch, and restore it at the end. ddev refresh and drush updatedb both mutate the local database, so the snapshot is what makes this workflow non-destructive.
  • Report Drupal config drift. Do not run config:export to "fix" it, and do not commit exported config to the consolidated branch unless the user asks.
  • Follow the commit conventions in the user's and the project's CLAUDE.md, including any rule about AI attribution trailers.
  • Stop and report if the working tree is dirty at the start. Do not stash the user's work.

Workflow

1. Preflight

git status --short
git rev-parse --abbrev-ref HEAD
ddev describe

Record the starting branch. It is restored in step 11. If the tree is dirty, stop and tell the user, starting with the line WORKING TREE NOT CLEAN: commit or stash before continuing. Do not snapshot, switch branches, or merge anything until they have. Stop as well if DDEV is not running.

2. Snapshot the database

Take the snapshot first, before anything switches branches or refreshes the database. Use a fixed, recognizable name so the restore and the cleanup in step 12 target exactly this snapshot:

ddev snapshot --name=predependabot-$(date +%Y%m%d-%H%M%S)

Record the exact snapshot name that DDEV reports. Confirm it exists before continuing:

ddev snapshot --list

If the snapshot fails, stop. Do not proceed into ddev refresh without a restore point.

3. Enumerate the open Dependabot PRs and find the base branch

Do not assume the base is main. Dependabot targets whatever branch the repository configures, which on Drupal projects with a dev-to-prod flow is routinely dev. Diffing or branching from the wrong base reports every commit the base has that the Dependabot branch lacks as if the Dependabot branch had introduced it, so a lock-file-only branch appears to be rewriting templates and config.

Ask GitHub, which knows the answer exactly, and capture the PR numbers at the same time. The PR number is required for the commit messages in step 6:

git fetch --prune origin
gh pr list --state open --limit 100 \
  --json number,headRefName,baseRefName,title \
  --jq '.[] | select(.headRefName|startswith("dependabot/")) | "\(.number)\t\(.baseRefName)\t\(.headRefName)\t\(.title)"'

When gh is unavailable, fall back to comparing candidate bases by how many files a branch appears to change. The correct base is the one that makes the branch look like what it is, a lock file update:

for base in main dev master develop; do
  git rev-parse --verify --quiet "origin/$base" >/dev/null || continue
  echo "$(git diff --name-only origin/$base...origin/<branch> | wc -l) files  $base"
done

The lowest count wins. Do not use merge-base distance for this: a base that has moved a few commits since the branch was cut can sit closer to the branch than the true base, so that heuristic picks the wrong answer on exactly the repositories where getting it right matters.

Without gh there is also no PR number. Ask the user for the numbers rather than committing without them.

If the open PRs target more than one base branch, stop and ask. One consolidated branch cannot serve two bases.

Say in the report which base was used.

4. Check out the base branch and refresh the database

git checkout <base>
git pull --ff-only origin <base>

Then refresh the database so the validation runs against production-like data rather than whatever the local database drifted into. Refresh commands are custom, not DDEV builtins, so they exist only on

Полный SKILL.md на GitHub

Установить dependabot-branch-validation в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

agents/openai.yaml

FAQ

Что делает скилл dependabot-branch-validation?

This skill should be used when the user asks to "validate Dependabot branches", "consolidate the Dependabot PRs", "roll up the dependency bumps", "check the Dependabot PRs", "verify the dependency bumps", "make sure the lock file was computed correctly", "recompute composer.lock", "recompute package-lock.json", or wants every open automated dependency update combined into one reviewable branch and PR. Covers DDEV database snapshots, Composer and npm lock verification, theme build checks, Drupal config drift, generated-file gaps that Dependabot misses, and consolidated PR creation. Automated security advisory PRs (`security/tw-*` branches) belong to composer-security-update.

Как установить скилл dependabot-branch-validation?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл dependabot-branch-validation запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить dependabot-branch-validation с