review-pr
Installation
SKILL.md
Review Pull Request
Purpose
Review a specific GitHub Pull Request by fetching its diff, analyzing it against the relevant .github/instructions files, and posting structured review comments directly on the PR using the GitHub CLI (gh).
Execution mode (read this first)
This skill runs in two possible modes. Detect the mode before doing anything else:
- CI mode: the environment variable
CIis set totrue(this is the case in the GitHub Actions pipeline that invokes this skill in non-interactive/print mode). - Interactive mode:
CIis not set (a human is chatting with the agent directly).
In CI mode there is no human available to answer questions. --print is a single-shot, non-interactive invocation — if this skill ever stops to ask a question and wait for a reply, the run silently wastes its turn budget and ends without doing anything useful. So in CI mode:
- Never ask for the PR number/repo. Read them from environment variables (see step 1).
- Never ask for confirmation before posting. The pipeline itself is the approval gate (a human triggered the workflow, or reviews the run logs). Post directly once the review is generated.
- Never wait for user input of any kind.
In Interactive mode, keep the original behavior: ask for the PR if not given, and ask for confirmation (sí/no) before posting.