/tend-ci-runner:push-commitsfrom tend-ci-runner
Guides git push workflow for PR branches, including merging upstream, force-push safety, and batching commits to avoid unnecessary review rounds.
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.
/tend-ci-runner:code-review when Review the change before the push calls for a structured pass.Always use git push without specifying a remote — gh pr checkout configures tracking to the correct remote, including for fork PRs. Specifying origin explicitly can push to the wrong place.
If pushing fails (fork PR with edits disabled), fall back to posting code snippets in a comment. Don't reference commit SHAs from temporary branches — post code inline.
Under yolo, record each push to a PR's branch, with the commit you pushed:
tend runtime land-pr pushed <sha>
It sets a tend/land/pushed status that only this bot's token can make. On a PR with a human or this bot as author, a review whose CI wait is off records a head for landing only where it finds one, since the pushing session is the one that knows who pushed; without it, that head's landing waits for a maintainer.
Before the push that opens a PR, and before pushing a fix to a PR under review, review the diff you are about to push, at a depth set by what the change touches and how likely it is to be wrong. A docs, config, or mechanical change gets a read-through. A change to the project's logic, to what it writes on a user's behalf, or to a helper with other call sites gets /tend-ci-runner:code-review over the diff and a search for the same pattern elsewhere. Fold what you find into the same push; the queued review is otherwise the first pass over the change, and each round that finds something is another session.
tend-review triggers on synchronize under a per-PR concurrency group with queue: max and without cancel-in-progress: pending PR events within GitHub's queue limit wait while a review session runs. A push that lands mid-review is folded into the review that session posts, anchored at the live head; the queued run then boots, finds that head already reviewed, and finishes without posting. Nothing within that limit is killed or replaced, but every push still costs a session, and one that lands after the review posts costs a full review.
gh pr create. Changelog entries, test pins, and formatting fixups belong in the initial push, not a follow-up thirty seconds later.synchronize too.A follow-up push that acts on information the session didn't have at push time — review feedback, a red check — earns its round. What's wasteful is splitting work you already have into several pushes.
Any wait that lets time pass — a CI poll, coverage fetch, sleep, background task — also gives a maintainer time to merge or close the PR. After waiting:
STATE=$(gh pr view <N> --json state --jq '.state')
[ "$STATE" = "OPEN" ] || { echo "PR #<N> is $STATE — skipping push"; exit 0; }
If the PR is merged, the work is superseded. Comment if a real gap remains; do not push to the now-orphan branch. After merge, gh pr view <N> --json headRefOid returns the SHA at merge time and never advances — polling it for a new push is a guaranteed deadlock.
Another tend session can push to the branch while you edit it: the session that opened the PR closing a red gate, a review applying its findings, or a repair tend-land started. Find that out at git push and the suite you just ran was scoped against a stale head, so the whole verify cycle is paid again after the rebase. Record the head before editing and re-check it immediately before each expensive step — full test suite, coverage or snapshot regeneration, a long build:
HEAD_OID=$(gh pr view <N> --json headRefOid --jq '.headRefOid')
# ...edits...
read -r NOW_OID NOW_STATE < <(gh pr view <N> --json headRefOid,state --jq '"\(.headRefOid) \(.state)"')
[ "$NOW_OID" = "$HEAD_OID" ] && [ "$NOW_STATE" = "OPEN" ] \
|| echo "sibling pushed or PR closed — fetch and re-scope before verifying"
state rides along on the same call because a merged or closed PR freezes headRefOid at its merge-time value (see above) — the OID comparison alone passes and the expensive step runs on work that is already superseded. On a non-OPEN state, stop per the subsection above rather than re-scoping.
If it moved, git fetch and read the new commits before verifying: drop whatever the sibling already landed, rebase what's left, and verify once against the new head. Expect the overlap rather than treating it as a surprise — a reviewer and a coverage gate reading the same new code ask for the same missing test. The runs API can't substitute for this check: a schedule or repository_dispatch run reports head_branch: main, not the branch it is editing, so a live sibling is invisible there.
tend-review fires on a PR you open. A review arriving while you poll belongs
to its reviewer: on bot-authored PRs that session applies its own findings.
Finish your verification without racing its edits, and identify that review
as the owner of the remaining work. A session dispatched to answer a specific
review owns it normally.
On a human-authored fork PR, the reviewer posts findings and does not apply them. If you pushed under a maintainer directive, act on findings against your commits before ending. Otherwise name them as unaddressed and unowned. Findings on the contributor's own commits already reached them.
When merging the default branch into a PR branch, never use --allow-unrelated-histories: if git merge fails because no merge base exists, the checkout is broken (usually shallow — re-checkout with fetch-depth: 0), and forcing the merge creates add/add conflicts in every file. If the merge fails because untracked files would be overwritten, stash them (git stash --include-untracked, merge, git stash pop) rather than deleting them.
The pre-post re-fetch in /tend-ci-runner:post-to-github counts comments and reviews, because that is what a duplicate post collides with. Closing a PR, reverting it, or force-pushing over it collides with commits instead, and a sibling session's pushed, CI-green commit is invisible to all three checks a session typically runs first: a comments-and-reviews re-fetch, the state == OPEN check under Re-check PR state before pushing a follow-up commit, and a re-read of the review bodies that prompted the action. --delete-branch turns that blind spot destructive — the branch ref goes and the commit survives only through the PR ref.
So before gh pr close, a revert, or a force-push, re-read the branch itself rather than the thread:
gh pr view <N> --json headRefOid,commits,comments,reviews \
--jq '{head: .headRefOid, commits: [.commits[].oid],
comments: (.comments | length), reviews: (.reviews | length)}'
If the head moved past the SHA you last pushed, a sibling acted on this PR while you waited — read its commits before deciding. Usually it applied one of the remedies you were weighing, which changes what the close is for, not whether to close: a PR whose premise a review invalidated is still yours to withdraw, and the session holding the PR is the one that can. Say what the sibling landed and why the close stands anyway, so the thread reads as one decision instead of two contradictory ones, and drop --delete-branch so that work stays reachable.
What SKILL.md sets; muted values are Claude Code's defaults
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./continue-prContinue an unfinished PR with no human author, including red CI and unresolved findings after a prior response or review./dismiss-approvalDismiss a standing bot approval. Use when you conclude that a PR the bot approved should not merge./fix-a-bugWrite a code fix for a bug. Use before writing any fix, whichever workflow you are running.Other plugins' skills for the same job