pr-security-review/SKILL.md
Use when the user wants a security-focused review pass on a PR with findings actioned as commits on the same branch. Trigger phrases - "/pr-security-review", "security review and fix".
npx skillsauth add paulund/ai pr-security-reviewInstall 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.
Security-focused review of a PR's diff, with findings actioned as commits on the same branch.
When invoked with arguments, the first line of the prompt may carry a context envelope as JSON:
{ "pr": 123, "branch": "agent/issue-582-foo" }
gh pr view <pr> --json number,title,body,headRefName,baseRefName
gh pr diff <pr>
Read the full diff. Note any imports, framework patterns, and existing security utilities (sanitizers, rate-limiters, auth middleware) referenced.
Identify the data flow boundaries the change touches:
getServerSession, middleware checks, RLS policies, RBAC decisionsIf the diff doesn't touch any of these, report no security-relevant changes and exit at Step 5.
Examine each modified file for the categories below. Trace data flow from the entry point to each sink.
Only flag findings where you are >80% confident of actual exploitability. Severity rubric:
Do NOT flag:
For every HIGH and MEDIUM finding: fix the code in this run. Do not defer.
For LOW findings: fix if trivial. Defer only if genuinely out of scope; create a tracking issue in that case:
gh issue create \
--title "security: <short description>" \
--body "Deferred from PR #<N> security review — accepted as-is because <reason>." \
--label "security,planned,afk"
git add <files>
git commit -m "Security review: <one-line summary>"
git push origin HEAD
gh pr comment <pr> --body "$(cat <<EOF
## Security review
### Fixed
- [HIGH/MEDIUM/LOW | file:line | category | what was wrong → how it was fixed]
### Deferred (LOW only)
- [item — reason — tracked in #N]
EOF
)"
{ "pr": <N>, "findings": <count>, "fixed": <count>, "deferred": <count> }
security label.quality-gate's job.development
Use when the user wants to run the project's lint + types + build sequence as a gate before pushing, opening a PR, or merging. Invoked by chained dev skills between phases. Trigger phrases - "/quality-gate", "run the quality gate", "check it builds".
tools
Use when the user wants to verify a PR's feature works at runtime by booting the dev server, exercising the affected UI via Chrome DevTools MCP, and posting a screenshot summary back to the PR. Idempotent — skips if `verified` or `verify-failed` is already on the PR. Trigger phrases - "/pr-verify", "verify this PR", "runtime check the pr".
testing
Use when the user wants to open a pull request for an already-pushed branch that implements a specific issue. Idempotent — returns the existing PR if one is already open for the branch. Trigger phrases - "/pr-open", "open the pr", "create pr for this branch".
testing
Use when the user wants to action external review feedback or fix CI failures on an open pull request. Single-purpose — does not handle merge conflicts (use merge-main) or open PRs (use pr-open). Trigger phrases - "/pr-fix", "fix the pr", "address review comments", "fix ci".