Command Palette

Search for a command to run...

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

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от 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>: manifest or babysit.
  • <manifest-path> and <log-path>: Required when mode is manifest. 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).

  1. 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 carry repo: tags, look up this PR's repo via the platform adapter (e.g., GitHub MCP returns owner/repo for the PR number); for each absolute path in the manifest's Repos: map, run git -C <path> remote get-url origin and parse the URL to its owner/repo form; the entry whose remote matches the PR's owner/repo is the corresponding repo. Use that entry's name: as the deliverable filter — prefer deliverables tagged with the matching repo name.
  2. Amend manifest via /define --amend <manifest-path> --from-do. Multi-repo: the manifest is a shared canonical /tmp file used by every repo's /tend-pr-tick — concurrent amendments are last-writer-wins (no locking; see tend-pr/SKILL.md §Multi-Repo PR Sets and define/references/MULTI_REPO.md §f). If you notice a missed amendment, re-trigger the lost tick.
  3. Invoke /do <manifest-path> <log-path> --scope <affected-deliverable-ids>. If /do escalates 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> --deferred when prerequisites are in place to reach /done." Do NOT terminate the tick — subsequent ticks continue normally toward merge-readiness. If /do escalates with any other type: log the blocker, report the escalation to the user, and end the loop.
  4. Push changes.
  5. 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

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

Установить 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), без исполняемых скриптов.

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

Сравнить tend-pr-tick с