plugins/azure-devops/skills/review-pr/SKILL.md
Review an Azure DevOps pull request. Use the helper script for eligibility checks, thread payloads, label sync, code links, and attachment uploads.
npx skillsauth add scaryrawr/scarypilot review-prInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Provide a code review for the given Azure DevOps pull request.
./scripts/... resolves from this skill directory)../scripts/review-pr.mts --help.eligibilityStart here before reviewing:
./scripts/review-pr.mts eligibility --id {prId} --detect true
Use these fields directly:
eligible, status, isDraftsourceBranch, targetBranch (Azure refs like refs/heads/main)repositoryId, repositoryNameprojectId, projectNamereviewers, urlSkip review when eligible is false.
thread-payloadUse the helper instead of hand-writing review thread JSON:
./scripts/review-pr.mts thread-payload \
--content "<brief issue title>\n\n<why it matters>\n\n<actionable fix>\n\n🤖 Generated with AI" \
--file-path /src/path/to/file.ts \
--line-start 42 \
--line-end 42 \
--out-file /tmp/review-thread.json
If you pass --out-file, the script returns { outFile, payload }; otherwise it returns the payload directly.
sync-labelsUse the helper after the review is complete:
./scripts/review-pr.mts sync-labels \
--id {prId} \
--model gpt-5.4 \
--model claude-opus-4.6 \
--detect true
Use desiredLabels, addedLabels, removedLabels, and finalLabels from the JSON result.
code-linkBuild Azure DevOps code links with:
./scripts/review-pr.mts code-link \
--org {org-or-url} \
--project {project} \
--repo {repo} \
--commit {fullCommitSha} \
--file-path /src/path/to/file.ts \
--line-start 40 \
--line-end 44
The script returns { url }.
upload-attachmentUpload PR attachments with:
./scripts/review-pr.mts upload-attachment \
--org {org-or-url} \
--project {project} \
--repository-id {repositoryId} \
--pull-request-id {prId} \
--file /absolute/path/to/image.png
Use id and url from the JSON result.
Check eligibility with the helper script before reviewing:
./scripts/review-pr.mts eligibility --id {prId} --detect true
Skip review when the PR is not active or is a draft.
Gather context:
.github/copilot-instructions.md, AGENTS.md, and CLAUDE.md in affected directories.targetBranch, projectName, and repositoryId from the eligibility output instead of immediately re-querying them.az repos pr checkout --id {prId}refs/heads/ prefix before using targetBranch as a git ref, then generate the diff: git diff "origin/${targetBranch#refs/heads/}"...HEADReview the changes:
Validate issues:
Confirm before posting unless the user explicitly asked you not to confirm.
Post inline comments:
Post one thread per issue.
Use the exact file and line range.
Prefer a single-line range when possible.
Build payloads with thread-payload before posting.
Post them with:
az devops invoke --area git --resource pullRequestThreads \
--route-parameters project={projectName} repositoryId={repositoryId} pullRequestId={prId} \
--http-method POST --api-version 7.1-preview \
--detect true --in-file /tmp/review-thread.json
Determine line numbers from the right side of the diff (+ side), then verify against the checked-out file.
Sync review labels after the review completes:
Always include ai-reviewed plus one ai-model-<model-id> label per model used.
If no issues are found, post one short top-level comment:
### Code review
No issues found. Checked for bugs and instruction file compliance.
🤖 Generated with AI
code-link for file-specific references in comments or summaries.upload-attachment when the review needs screenshots or other uploaded artifacts.testing
Manage parallel git worktrees with Worktrunk (`wt`) and enforce disk-fit preflight checks before creating new worktrees.
data-ai
Generate images from text prompts using Ollama's local image generation models.
tools
Create Ghostty windows/tabs/splits and drive terminals with focus/input for multitasking workflows on macOS.
testing
Quickly bootstrap repo-specific Copilot instructions with high signal and low context bloat.