Install
$ agentstack add skill-nelsonbrandao-pi-agent-extensions-pr-review ✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
About
PR Review Skill
Address PR review feedback for the current branch.
Workflow: Address Reviews
When asked to address PR reviews, follow this sequence:
1. Get PR context
gh pr view --json number,title,state,body,reviewDecision,headRefName,baseRefName,statusCheckRollup
2. Read unresolved review comments
Only fetch unresolved threads — ignore anything already resolved:
gh api graphql -f query='
query($owner: String!, $repo: String!, $pr: Int!) {
repository(owner: $owner, name: $repo) {
pullRequest(number: $pr) {
reviewThreads(first: 100) {
nodes {
isResolved
comments(first: 10) {
nodes {
databaseId
author { login }
body
path
line
createdAt
diffHunk
}
}
}
}
}
}
}
' -f owner="{owner}" -f repo="{repo}" -F pr= --jq '
.data.repository.pullRequest.reviewThreads.nodes[]
| select(.isResolved == false)
| .comments.nodes[]
| "ID: \(.databaseId)\nFile: \(.path):\(.line // "?")\nAuthor: \(.author.login) (\(.createdAt | split("T")[0]))\n\(.diffHunk | split("\n") | .[-3:] | map(" │ \(.)") | join("\n"))\n💬 \(.body)\n"
'
3. Check changed files
gh pr view --json files --jq '.files[] | "\(.status) +\(.additions) -\(.deletions) \(.path)"'
4. Read diff for context
gh pr diff # full diff
gh pr diff | awk '/^diff --git.*/{show=1} /^diff --git/ && !/'""'/{show=0} show' # single file
5. Make the code changes
Read the files mentioned in review comments and address the feedback.
6. Commit and push
Write a commit message that describes what actually changed, not just "address review feedback".
git add -A && git commit -m "Refactor auth middleware to validate tokens before routing" && git push
7. Resolve or reply to comments
For each review comment, decide based on whether action was taken:
If code changes were made to address the comment — resolve the thread silently (no reply needed). Find the thread ID and resolve it:
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
comments(first: 1) {
nodes {
databaseId
}
}
}
}
}
}
}
' -f owner="{owner}" -f repo="{repo}" -F pr=
Then resolve the thread using its GraphQL node ID:
gh api graphql -f query='
mutation($threadId: ID!) {
resolveReviewThread(input: {threadId: $threadId}) {
thread { isResolved }
}
}
' -f threadId=""
If no action was taken (e.g., disagree, out of scope, already handled, intentional) — reply explaining why:
gh api "repos/{owner}/{repo}/pulls//comments//replies" -f body=""
8. Verify CI
gh pr checks
Top-level review summaries
gh api "repos/{owner}/{repo}/pulls//reviews" --jq '.[] | select(.state != "COMMENTED") | "[\(.state)] \(.user.login): \(.body)"'
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: NelsonBrandao
- Source: NelsonBrandao/pi-agent-extensions
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet — be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.