From drk-skills
Handle Renovate bot dependency update branches end-to-end. Use this skill whenever working on a renovate/* branch, reviewing a Renovate MR, or asked to "handle renovate", "process a renovate update", "fix a renovate branch", or "apply a dependency upgrade". The skill identifies what was upgraded, researches breaking changes, adapts code, and verifies builds and tests pass.
How this skill is triggered — by the user, by Claude, or both
Slash command
/drk-skills:renovateThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Renovate branches bump versions but can't adapt code to breaking changes. This skill picks up where Renovate left off: understand what changed, research the impact, fix the code, verify it works.
Renovate branches bump versions but can't adapt code to breaking changes. This skill picks up where Renovate left off: understand what changed, research the impact, fix the code, verify it works.
Determine which branch to work on:
renovate/* branch, use it. PROJECT=$(git remote get-url origin | sed 's|.*[:/]\([^/]*/[^/]*\)\.git$|\1|')
glab api graphql -f query="
{
project(fullPath: \"$PROJECT\") {
mergeRequests(state: opened, first: 100) {
nodes {
sourceBranch
webUrl
description
headPipeline { status }
}
}
}
}" | jq '[
.data.project.mergeRequests.nodes[]
| select(.sourceBranch | startswith("renovate/"))
| {
branch: .sourceBranch,
url: .webUrl,
change: (
.description
| capture("`(?<from>[^`]+)` -> `(?<to>[^`]+)`")
| "\(.from) -> \(.to)"
),
pipeline: (.headPipeline.status // "none")
}
]'
Checkout the branch if not already on it, then inspect what changed:
BASE_BRANCH=$(git branch -r | grep -oE 'origin/(develop|main|master)' | head -1 | sed 's|origin/||'); \
git diff $(git merge-base HEAD $BASE_BRANCH)...HEAD -- \
'*.mod' '*/go.sum' \
'*/package.json' '*/package-lock.json' '*/yarn.lock' '*/pnpm-lock.yaml' \
'*/pom.xml' \
'*/Cargo.toml' '*/Cargo.lock' \
'*/requirements*.txt' '*/pyproject.toml' '*/poetry.lock' \
'*/Gemfile' '*/Gemfile.lock' \
'Dockerfile*' '*.bicep'
Parse the diff to extract:
com.example:artifact, @types/react, github.com/foo/bar- and + lines in version filesFor each upgraded package, search for breaking changes in the version range:
<package> <old_version> to <new_version> breaking changes migration<package> changelog <new_version> or <package> release notesSummarize: list any renamed APIs, removed functions, changed signatures, new required configuration, or changed behavior.
If there are no breaking changes (patch bump with clean changelog), note that and proceed quickly to Step 4.
Search the codebase for usages of the upgraded package using patterns appropriate to the ecosystem:
"<package-path>" in *.go filesrequire('<package>'), from '<package>' in *.ts, *.tsx, *.js files<groupId>, <artifactId>, or the class/package name in *.java filesimport <package> or from <package> in *.py files*.rs filesFocus on the specific APIs that changed. Identify which files need updating.
Apply the necessary changes based on the breaking changes you found:
Make changes surgically — only what the version change requires. Don't refactor surrounding code.
After editing, run the post-update tidy/sync step for the ecosystem (see Language Playbooks below).
Run build and tests in each affected directory using the appropriate commands from the Language Playbooks below.
If tests fail:
When done, summarize:
If you couldn't resolve a failure, explain what you tried and stop here.
You must ask for confirmation to push the branch, if not confirmed stop here.
Push changes and verify the pipeline passes:
git push
Then poll for the new pipeline to complete:
MR=<mr-iid>
# Wait for pipeline to finish (poll every 30s)
while true; do
STATUS=$(glab mr view $MR -F json | jq -r '.head_pipeline.status')
echo "Pipeline status: $STATUS"
[[ "$STATUS" != "running" && "$STATUS" != "pending" && "$STATUS" != "created" ]] && break
sleep 30
done
echo "Final status: $STATUS"
If pipeline succeeded → proceed to Step 8.
If pipeline failed → fetch logs and go back to Step 4:
PIPELINE_ID=$(glab mr view $MR -F json | jq -r '.head_pipeline.id')
# Failed direct jobs
glab api "/projects/:id/pipelines/$PIPELINE_ID/jobs" | \
jq '[.[] | select(.status == "failed") | {id, name, stage}]'
# Failed bridge jobs → child pipelines
glab api "/projects/:id/pipelines/$PIPELINE_ID/bridges" | \
jq '[.[] | select(.status == "failed") | {name, child_id: .downstream_pipeline.id}]'
# For each failed child_id:
CHILD_ID=<child_id>
FAILED_JOB_ID=$(glab api "/projects/:id/pipelines/$CHILD_ID/jobs" | \
jq -r '[.[] | select(.status == "failed")] | first | .id')
# Fetch logs
glab api "/projects/:id/jobs/$FAILED_JOB_ID/trace"
Analyze logs, fix the issue (Step 4), then repeat from top of Step 7.
You must ask for confirmation to merge the MR, if not confirmed stop here.
Before merging:
glab mr note <mr-id> --message "Generated by Claude: ..."then merge with: glab mr merge <mr-id> --squash
After each merge, wait 5 seconds before merging the next MR to let the platform recover:
sleep 5
If a merge fails due to conflicts, rebase the branch and retry once: Rebase locally so conflicts can be resolved:
git fetch origin
git checkout <renovate-branch>
git rebase origin/<base-branch>
# resolve any conflicts, then:
git push --force-with-lease
After the push triggers a new pipeline and it passes, re-run the merge command.
If the retry also fails, leave the MR for now and move on.
Each playbook is self-contained. Jump to the one matching the ecosystem detected in Step 1. When a project uses multiple ecosystems, apply each relevant playbook.
Detect: go.mod or go.sum changed.
Post-update tidy (run in each affected module directory after editing):
go mod tidy
Verify:
go build ./...
go test ./...
Common patterns:
github.com/foo/bar → github.com/foo/bar/v2 — update all import statements in affected .go files.go mod tidy is usually all that's needed.Detect: pom.xml changed.
Post-update sync (Maven resolves dependencies on the next build; no explicit sync needed):
# Optional: pre-download deps to check for resolution errors
mvn dependency:resolve -q
Verify (in the affected module directory, or root for full build):
mvn verify
Lint only:
mvn verify -Plint
Common patterns:
@Bean, SecurityFilterChain, or property key changes.javax.* → jakarta.*): search all .java files for old namespace and update imports.pom.xml property version variables: Renovate typically updates the <version> inside <dependency> blocks — confirm the right property was updated if the project uses <properties>.Detect: package.json, package-lock.json, yarn.lock, or pnpm-lock.yaml changed.
Post-update sync (install to update lockfile and node_modules):
npm install # or: yarn install / pnpm install
Verify:
npm run build # if a build step exists
npm test # or: npm run test / npx vitest run / npx jest
npm run lint # if a lint step exists
Common patterns:
@types/*): search for type usages that match changed types, update annotations.require() usage that needs to become import.peerDependencies — other packages may need updating too.npm install to sync lockfile, then run tests.npm install fails with peer dep errors, do not add --legacy-peer-deps. That flag masks real incompatibilities and can cause subtle runtime failures. Instead, identify which packages conflict and resolve them properly.Detect: requirements*.txt, pyproject.toml, poetry.lock, or setup.py changed.
Post-update sync:
pip install -r requirements.txt # or: pip install -e . / poetry install
Verify:
python -m pytest # or: python -m unittest discover
Common patterns:
Detect: Cargo.toml or Cargo.lock changed.
Post-update sync:
cargo update # syncs Cargo.lock to the new version pins
Verify:
cargo build
cargo test
Common patterns:
Cargo.toml and check for API changes.Detect: Gemfile or Gemfile.lock changed.
Post-update sync:
bundle install
Verify:
bundle exec rspec # or: bundle exec rake test
To add a new language/ecosystem to this skill, add a new ### subsection under Language Playbooks with:
No code changes needed (most minor/patch bumps):
Clean patch bump checklist:
go mod tidy → go test ./...mvn verifynpm install → npm testpip install -r requirements.txt → python -m pytestcargo update → cargo testProvides UI/UX resources: 50+ styles, color palettes, font pairings, guidelines, charts for web/mobile across React, Next.js, Vue, Svelte, Tailwind, React Native, Flutter. Aids planning, building, reviewing interfaces.
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.
npx claudepluginhub d-rk/claude-skills --plugin renovate