/tend-ci-runner:resolve-conflictsfrom tend-ci-runner
Resolves merge conflicts on configured-bot PRs (Dependabot, Renovate) by fetching branches, testing merge-tree, and applying resolution strategies.
Ships in tend-ci-runner. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Resolve configured-bot PRs. Include Dependabot and Renovate only when the calling skill requests dependency bots.
/tend-ci-runner:run-tend before acting./tend-ci-runner:push-commits before pushing a resolution and /tend-ci-runner:post-to-github before composing a deferral comment./tend-ci-runner:monitor-ci after pushing a conflict resolution.List up to 100 open PRs per author, including the head and base names and SHAs.
Test each PR locally against its own base; GitHub's mergeable field can remain
UNKNOWN while it computes.
git fetch --quiet --force origin \
"refs/heads/<base>:refs/tend/base/<number>" \
"refs/pull/<number>/head:refs/tend/pr/<number>"
git merge-tree --write-tree \
"refs/tend/base/<number>" "refs/tend/pr/<number>" >/dev/null
Treat a failed query or fetch as unverified, not clean. Remove any prior
conflict-deferral comment from any PR this skill handles that test-merges
clean. When called from notifications, use every issue-comment page and skip
a PR whose bot-authored marker names the live headRefOid. Nightly ignores the
marker and retries.
When the caller requests dependency bots, include app/dependabot and
app/renovate.
Read every commit author first — it decides the path.
| Commit authors | Path |
|---|---|
| The owning bot alone | Rebuild, per the trigger table. |
| The owning bot plus this bot | Merge and push it yourself, per Configured-bot PRs. |
| Anyone else | Leave for manual resolution. |
| PR author | Required commit-author login | Rebuild trigger |
|---|---|---|
app/dependabot | dependabot[bot] | Comment @dependabot recreate. |
app/renovate | renovate[bot] | In the PR body, check <!-- rebase-check -->. |
A rebuild overwrites the branch, so it fits only row 1, where the owning bot is
every commit's author. /tend-ci-runner:review pushes fixes to dependency-bot PRs by design,
and the owning bot stops resolving conflicts on a branch that has been altered
— leaving a rebuild that would discard the fix as the only trigger, and the PR
wedged at its first conflict. That same commit is what makes the branch this
bot's to merge: resolve it under the exact head lease, as for a configured-bot
PR. Never force-push over a commit from anyone else.
Consider dispatching one subagent per conflicted PR. Give each PR an isolated
$TMPDIR/pr-<number> worktree.
For each PR:
headRefOid, headRefName, headRepository, baseRefName,
and state. Stop unless the PR is open and its head is in this repository.
Check out that exact head.<baseRefName> from the remote and pin the SHA that fetch resolves
to; merge that SHA. Resolve the conflicts, stage them, and commit with
git commit --no-edit. Never merge the PR's baseRefOid: it trails the
base branch, so the merge can succeed without touching the conflict.HEAD, then run git push --force-with-lease="refs/heads/<headRefName>:<headRefOid>" origin "HEAD:refs/heads/<headRefName>". The exact lease is the final head guard.git merge-tree.
If it conflicts, merge the new base and repeat. Once clean, remove the bot's
conflict-deferral comment and monitor CI per /tend-ci-runner:monitor-ci.If resolution is too complex, abort the merge and re-read the PR. When it is still open at the original head and has no same-head deferral, create one bot-authored comment that explains manual resolution is needed. Its final line must be exactly:
<!-- tend-conflict-deferred head=<head SHA> -->
Find prior deferrals through the paginated issue-comment API. After creating a comment, re-read the head and comments. Delete only the new comment if the head changed or an older same-head deferral won a concurrent race. Never edit another head's deferral. The frequent poll skips the marked head; nightly retries it, and a new head is eligible immediately.
Remove the temporary worktrees when every PR is done.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
merge-conflicts, dependabot, renovate, pr-resolution, git-merge
npx claudepluginhub max-sixty/tend --plugin tend-ci-runner24 skills in this plugin
/act-in-other-reposAct in another repository. Use before filing an issue, commenting, or contributing anywhere other than this repo./check-requester-accessCheck a requester's access tier. Use when a request aims you at someone else's work — close, lock, label, revert, dismiss, push./code-reviewStructured second pass over a diff — correctness and cleanup angles, a verify pass, ranked findings returned to the caller.Other plugins' skills for the same job