← ClaudeAtlas

babysit-pr-stoplisted

Cleanly stop an active /babysit-pr watcher for a PR. Sets the watcher's stop flag in session-state, stops its persistent Monitor task, and confirms. Invoke as `/babysit-pr-stop <PR>`.
auerbachb/claude-code-config · ★ 5 · Code & Development · score 73
Install: claude install-skill auerbachb/claude-code-config
Stop the `/babysit-pr` watcher for one PR. This is the clean-cancel companion to `/babysit-pr` — it does not merge, fix, or touch the PR itself; it only tears down the watcher Monitor and its state. Stopping is **exact and idempotent**: it records the stop request, stops the recorded Monitor task with `TaskStop`, and leaves the watcher's `T0` short-circuit armed for any tick that was already emitted. Running it on a PR with no active watcher is a safe no-op. ## Resolve the state helper Same three-candidate lookup as `/babysit-pr` (`fixpr/SKILL.md` pattern): ```bash resolve_script() { local name="$1" candidate for candidate in \ "$HOME/.claude/skills-worktree/.claude/scripts/$name" \ "$HOME/.claude/scripts/$name" \ ".claude/scripts/$name"; do if [[ -x "$candidate" ]]; then echo "$candidate"; return 0; fi done return 1 } SESSION_STATE_SH=$(resolve_script session-state.sh) || { echo "ERROR: session-state.sh not found" >&2; exit 1; } ``` ## Steps ### 1. Parse the PR number The first bare integer in `$ARGUMENTS` is `<PR>`. If none is given, stop: "Usage: /babysit-pr-stop <PR>". ### 2. Check for an active watcher Distinguish "no watcher" from "the state helper failed" — do **not** collapse every error into a clean no-op (that would silently skip a real stop request): ```bash ACTIVE=$("$SESSION_STATE_SH" --get ".prs[\"$PR\"].babysit.active"); GET_RC=$? case "$GET_RC" in 0) ;; # value read OK (may be true/false/nul