From dev-flow
Manage Azure DevOps PR comments - post new code comments, read and assess existing threads. Trigger when user asks to add/post a comment on a PR, review PR feedback, or check PR comment status.
How this skill is triggered — by the user, by Claude, or both
Slash command
/dev-flow:azdo-pr-commentsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Read, assess, and post code-level comments on Azure DevOps pull requests.
Read, assess, and post code-level comments on Azure DevOps pull requests.
The az repos pr CLI does not support PR threads. Use az devops invoke for all thread operations.
Detect project and repositoryId from git remote or az devops configure --list.
az devops invoke \
--area git \
--resource pullRequestThreads \
--route-parameters \
project=<project> \
repositoryId=<repo-name-or-id> \
pullRequestId=<pr-id> \
-o json
az devops invoke \
--area git \
--resource pullRequestThreads \
--route-parameters \
project=<project> \
repositoryId=<repo-name-or-id> \
pullRequestId=<pr-id> \
--http-method POST \
--in-file <(cat <<'EOF'
{
"comments": [
{
"parentCommentId": 0,
"content": "Comment text (markdown supported)",
"commentType": 1
}
],
"threadContext": {
"filePath": "/path/to/file.vue",
"rightFileStart": { "line": 31, "offset": 1 },
"rightFileEnd": { "line": 38, "offset": 1 }
},
"status": 1
}
EOF
)
Thread status: 0 = unknown, 1 = active, 2 = fixed, 3 = won't fix, 4 = closed, 5 = by design, 6 = pending
Line targeting:
rightFileStart/rightFileEnd - new code (most common)leftFileStart/leftFileEnd - deleted codethreadContext entirely for a general (non-file) commentaz devops invoke \
--area git \
--resource pullRequestThreadComments \
--route-parameters \
project=<project> \
repositoryId=<repo-name-or-id> \
pullRequestId=<pr-id> \
threadId=<thread-id> \
--http-method POST \
--in-file <(cat <<'EOF'
{"content": "Reply text"}
EOF
)
Verify success: Response contains "id": field. Do NOT retry if first attempt returns valid JSON with an ID.
When posting review comments to PRs, be concise:
# Good
Orphaned `</a>` tags after refactoring.
# Good
`useI18n()` not called - `t` will be undefined.
# Bad
**C1. Broken HTML in PharmacistsCarousel**
Orphaned `</a>` tags and bare HTML attributes not attached to any element.
**Will cause template compilation error or mangled rendering.**
Extract code comments (threads with file context):
jq '[.value[] | select(.threadContext.filePath) | select(.status == "closed" | not) | {
id: .id,
file: .threadContext.filePath,
line: .threadContext.rightFileStart.line,
status: .status,
comment: .comments[0].content,
author: .comments[0].author.displayName
}]'
For each active/pending comment:
Priority:
az repos pr list --source-branch "$(git branch --show-current)" --status active --query '[0].pullRequestId' -o tsv
npx claudepluginhub lttr/claude-marketplace --plugin dfFetches GitHub PR review comments via gh CLI and Python script, creates task checklists for threads, links commits to reviews, and blocks completion until all resolved. Use for systematic PR feedback handling.
Fetches and filters PR review comments, extracts outside-diff-range feedback from review bodies, and resolves threads with proper attribution. Useful when addressing CodeRabbit, Cursor, or human reviewer feedback.
Posts code review findings as line-bound PR comments via the GitHub CLI. Maps issues to specific lines and supports severity filtering.