home/common/ai/resources/codex/skills/fix-pr/SKILL.md
Fix PR review feedback and code scanning alerts. Use when the user asks to fix PR comments, address review feedback, resolve PR issues, or fix SAST alerts.
npx skillsauth add kamushadenes/nix fix-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.
Address all review feedback, comments, and code scanning alerts on a PR.
If the user provided a PR number, use it. Otherwise:
gh pr view --json number,title,url 2>/dev/null
If no PR exists on the current branch, ask the user which PR to fix.
query=$(cat <<'GRAPHQL'
query($owner: String!, $repo: String!, $number: Int!, $cursor: String) {
repository(owner: $owner, name: $repo) {
pullRequest(number: $number) {
reviewThreads(first: 100, after: $cursor) {
pageInfo { hasNextPage endCursor }
nodes {
id
isResolved
path
line
comments(first: 20) {
nodes {
body
author { login }
createdAt
}
}
}
}
}
}
}
GRAPHQL
)
gh api graphql -f query="$query" -f owner=OWNER -f repo=REPO -F number=NUMBER
gh api repos/{owner}/{repo}/pulls/{number}/comments --paginate
gh api repos/{owner}/{repo}/code-scanning/alerts?ref=HEAD --paginate 2>/dev/null
Show the user a summary of all feedback:
For each piece of feedback, classify as:
For VALID items, fix file by file, processing line changes from bottom to top (to preserve line numbers):
For each addressed thread:
# Reply to thread
gh api graphql -f query='
mutation($threadId: ID!, $body: String!) {
addPullRequestReviewThreadReply(input: {pullRequestReviewThreadId: $threadId, body: $body}) {
comment { id }
}
}' -f threadId="$THREAD_ID" -f body="Fixed: <description of change>"
# Resolve thread
gh api graphql -f query='
mutation($threadId: ID!) {
resolveReviewThread(input: {threadId: $threadId}) {
thread { isResolved }
}
}' -f threadId="$THREAD_ID"
For INVALID items, reply with technical explanation before resolving.
git add -A
git commit -m "fix: address PR review feedback
Resolved N review threads, dismissed M as invalid/outdated."
git push
| Category | Count | Details | |-|-|-| | Fixed | N | List of fixes applied | | Dismissed (invalid) | M | Reasons provided | | Outdated | O | Already addressed | | Skipped | P | Requires discussion |
data-ai
Show MemPalace status — room counts, storage usage, and palace health.
tools
Search your MemPalace — semantic search across all mined memories, projects, and conversations.
tools
Mine a project or conversation into your MemPalace — extract and store memories for later retrieval.
development
Initialize a new MemPalace — guided setup for your AI memory palace with ChromaDB backend.