review-pr-clickup
Review Pull Request con Contexto ClickUp
Purpose
Review a specific GitHub Pull Request by fetching its diff, analyzing it against the relevant .github/instructions files and ClickUp ticket requirements, and posting structured review comments directly on the PR using the GitHub CLI (gh).
Step 1: Resolve context — always run the bundled script first
Steps 1, 2, 3, and 3.5 of the old workflow (resolving REPO/PR, computing an isolated WORKDIR, checking the working tree is clean, fetching the PR diff/metadata/comments via gh, and detecting/fetching a ClickUp ticket) are 100% mechanical — no judgement is required, so they are implemented once as a bundled script instead of being described in prose for you to reproduce by hand. Reproducing this logic yourself (recomputing WORKDIR, re-running individual gh calls) is exactly what causes drift and confusion about paths later in a run — always defer to the script instead.
Run this as your first action, every time, regardless of mode:
bash "$(dirname "$0")/../scripts/prefetch.sh" --repo "$REPO" --pr "$PR"
In practice, resolve the path to scripts/prefetch.sh relative to wherever this SKILL.md was installed (e.g. ~/.claude/skills/review-pr-clickup/scripts/prefetch.sh) and pass --repo owner/repo --pr NUMBER. If a caller (e.g. a CI pipeline) already ran this exact script before invoking you and told you so, you do not need to run it again — but if you are ever unsure, just run it anyway: it is idempotent (already-fetched files are reused, not re-fetched) and safe to call as many times as you want, including with no arguments beyond --print-workdir-only if you just need to recover WORKDIR cheaply without hitting the network.