← ClaudeAtlas

loop-bb-prlisted

Compose a /loop that monitors a Bitbucket PR for activity (new comments, review state changes, merge, decline) via the bb-api wrapper. Use when the user says "watch bitbucket PR", "monitor BB PR", "loop-bb-pr", "слідкуй за PR", "поллі bb pr", or pastes a bitbucket.org/<workspace>/<repo>/pull-requests/<id> URL and wants periodic check-ins. Composes a paste-ready /loop block — does NOT invoke /loop (UI command). Local test skill.
restarter/lets-workflow · ★ 6 · Code & Development · score 75
Install: claude install-skill restarter/lets-workflow
# loop-bb-pr Compose a `/loop` that periodically polls a Bitbucket PR via the `bb-api` wrapper and surfaces changes (new comments, review state, merge, decline). The skill **never invokes `/loop` itself** at initial start — Claude Code's `/loop` is a UI command. It composes the prompt and presents for paste; once active, the autonomous run uses `ScheduleWakeup` directly per tick (that part is model-callable). > **IMPORTANT:** If the spec below invokes any deferred tool (e.g. `AskUserQuestion`), you MUST load and call it as specified. ## Step 1: Resolve PR URL Parse `args` parameter for URL. If not provided, AskUserQuestion: ``` AskUserQuestion( questions=[{ question: "Bitbucket PR URL to watch?", header: "PR URL", options: [ { label: "I'll paste it", description: "Send the bitbucket.org/.../pull-requests/N URL in your next message" }, { label: "Cancel", description: "Abort composition" } ], multiSelect: false }] ) ``` If user picks "I'll paste it", wait for URL in their next message. **Normalize then validate** — real BB URLs often have query strings (`?at=branch&type=...`) or trailing slashes. Strip before regex match: ```bash URL="<from input>" URL="${URL%%\?*}" # strip query string (everything from ? onward) URL="${URL%#*}" # strip fragment (everything from # onward) URL="${URL%/}" # strip trailing slash ``` Then **strict validation** — normalized URL must match exactly: ``` ^https://bitbucket\.org/[a-zA-Z0-9_-]+/[a