Detects existing PR review threads to prevent duplicate comments. Use BEFORE posting any inline comments. Fetches resolved and open threads, then matches against planned findings.
/plugin marketplace add bitwarden/ai-plugins/plugin install bitwarden-code-review@bitwarden-marketplaceThis skill inherits all available tools. When active, it can use any tool Claude has access to.
Prevent duplicate comments by detecting existing review threads before posting new findings.
Bash(gh pr view:*) - Get general PR commentsBash(gh api graphql -f query=:*) - Get resolved and open review threads (direct GraphQL)Use this priority order:
GitHub Actions environment:
GITHUB_EVENT_PATH environment variable.pull_request.numberGITHUB_REPOSITORY ("owner/repo" format)Conversation context:
https://github.com/org/repo/pull/456Local review mode:
Capture BOTH comment sources:
# General PR comments
gh pr view <PR_NUMBER> --json comments
# Inline review threads (resolved + open)
gh api graphql -f query='
query($owner: String!, $repo: String!, $pr: Int!) {
repository(owner: $owner, name: $repo) {
pullRequest(number: $pr) {
reviewThreads(first: 100) {
nodes {
id
isResolved
isOutdated
path
line
startLine
diffSide
comments(first: 10) {
nodes {
id
body
author { login }
createdAt
}
}
}
}
}
}
}
' -f owner="<OWNER>" -f repo="<REPO>" -F pr="<PR_NUMBER>"
Build this JSON structure from merged results:
{
"total_threads": 5,
"threads": [
{
"location": "src/auth.ts:45",
"severity": "CRITICAL",
"issue_summary": "SQL injection risk in query builder",
"resolved": false,
"author": "claude",
"path": "src/auth.ts",
"line": 45
}
]
}
Severity detection from emoji prefix:
CRITICALIMPORTANTDEBTSUGGESTEDQUESTIONBefore creating any new comment, check for matches:
| Match Type | Criteria | Action |
|---|---|---|
| Exact | Same file + same line | Use existing thread |
| Nearby | Same file + line within ±5 | Use existing thread |
| Content | Body similarity >70% | Use existing thread |
| No match | None of above | Create new comment |
Master binary analysis patterns including disassembly, decompilation, control flow analysis, and code pattern recognition. Use when analyzing executables, understanding compiled code, or performing static analysis on binaries.