tend-pr-tick
БесплатноБез исполняемых скриптовНе проверенSingle iteration of PR tending. Reads PR state, classifies new events, routes fixes, reports status. Called by /loop via /tend-pr setup. Can be invoked…
от doodledood★ 40 звёзд на GitHubОб этом скилле
/tend-pr-tick - Single PR Tending Iteration
Goal
Execute one iteration of PR tending: read current state, classify new events, route fixes, update PR, report status. Designed to be called repeatedly by /loop.
Input
$ARGUMENTS = <pr-number> <mode> [<manifest-path> <log-path>]
<pr-number>: Required. The PR to tend.<mode>:manifestorbabysit.<manifest-path>and<log-path>: Required when mode ismanifest. Path to the manifest and execution log.
If arguments missing or malformed: error and halt with usage message.
Concurrency Guard
Use a lock file at /tmp/tend-pr-lock-{pr-number}. Skip this iteration if the lock exists and isn't stale (older than 30 minutes). Remove stale locks. Create the lock at iteration start, remove at end.
Read State
Read the PR's current state: open/closed/merged/draft, CI status, review status, new comments since last check, merge conflict status, unresolved threads.
Terminal states — Merged, Closed, or Draft. Handle per Output Protocol (end the loop).
First tick (tend-pr-log has no prior iterations): Everything is unprocessed — run the full pipeline.
Check categories:
- Every tick: CI status, merge conflicts, merge readiness — these change independent of comments (base branch updates, CI re-runs, review approvals).
- Comment-gated: Comment classification — only runs when new comments exist since last check.
- Conditional: Routing — runs when there are CI failures to handle or when new comments were classified.
CI Failure Triage
Runs every tick.
Compare against base branch first:
- Pre-existing: Same failure on base → skip.
- Infrastructure: Flaky/timeout/runner → retrigger.
- Code-caused: New failure from PR → actionable.
Merge Conflicts
Runs every tick.
Update the PR branch from the base branch. Preserve review comment history — rebase destroys it (see Gotchas). Flag ambiguous conflicts to the user.
Comment Classification
Runs when new comments exist since last check. Skip when no new comments.
Label source first (bot vs human — read ../tend-pr/references/known-bots.md), then classify intent (read ../tend-pr/references/classification-examples.md):
- Actionable: Genuine issue to fix.
- False positive: Intentional or not a problem.
- Uncertain: Ambiguous — needs clarification.
Routing
Runs when there are CI failures to handle or when new comments were classified.
Manifest mode: This is the same default-to-amend reflex documented canonically in do/SKILL.md Mid-Execution Amendment — PR comments and CI failures are external feedback that contradicts or extends the manifest, so they route through Self-Amendment. The only difference is the trigger source (PR thread vs. user message in a session).
- Identify which deliverable(s) the comment or CI failure targets (include all potentially affected when ambiguous). When the manifest declares
Repos:(multi-repo) and deliverables carryrepo:tags, look up this PR's repo via the platform adapter (e.g., GitHub MCP returnsowner/repofor the PR number); for each absolute path in the manifest'sRepos:map, rungit -C <path> remote get-url originand parse the URL to itsowner/repoform; the entry whose remote matches the PR'sowner/repois the corresponding repo. Use that entry'sname:as the deliverable filter — prefer deliverables tagged with the matching repo name. - Amend manifest via
/define --amend <manifest-path> --from-do. Multi-repo: the manifest is a shared canonical/tmpfile used by every repo's/tend-pr-tick— concurrent amendments are last-writer-wins (no locking; seetend-pr/SKILL.md§Multi-Repo PR Sets anddefine/references/MULTI_REPO.md§f). If you notice a missed amendment, re-trigger the lost tick. - Invoke
/do <manifest-path> <log-path> --scope <affected-deliverable-ids>. If/doescalates with "Deferred-Auto Pending": implementation is green — proceed to steps 4 and 5 normally (push the fix; reply to the originating thread). Append the deferred-auto reminder to this tick's Status Report so the user sees it: "Implementation green; run/verify <manifest> <log> --deferredwhen prerequisites are in place to reach /done." Do NOT terminate the tick — subsequent ticks continue normally toward merge-readiness. If/doescalates with any other type: log the blocker, report the escalation to the user, and end the loop. - Push changes.
- If the actionable item originated from a comment, reply on that thread.
Babysit mode: Fix directly, push. If the item originated from a comment, reply on that thread. (No manifest in scope = no amendment route; this is the no-manifest case from do/SKILL.md — fail-open inline handling.)
False positives: Reply with explanation.
Uncertain: Reply asking for clarification, leave thread open.
Thread resolution rule: Resolve all bot threads after addressing (fix, reply, or both). Never resolve human
Установить tend-pr-tick в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл tend-pr-tick?
Single iteration of PR tending. Reads PR state, classifies new events, routes fixes, reports status. Called by /loop via /tend-pr setup. Can be invoked manually to run a single tick.
Как установить скилл tend-pr-tick?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл tend-pr-tick запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic