- Home
- Skills
- Code Quality & Review
- PR Review Defense
More screenshots
Works with the AI Agents you already use
PR Review Defense
Your AI agent checks the code before it agrees with a review comment on your pull request.
$15
PR Review Defense
Example session with this skill installed
Help me answer the review comments on PR 349. The reviewer says three things: the time limit is hard-coded, line 31 has no test, and line 52 could be slow.
- Read your context and instructions
- Compiled the pr review defense
This is a sample pull request. The commands and the output are real.
Summary
There were three open comments. The agent agreed with one, disagreed with one, and asked a question about one. It changed code for one comment only. It did not post anything.
First try: the script stopped the agent
The first draft agreed with every comment and gave no proof. The script found five problems:
$ python3 pr_review.py check 349 --verdicts bad.json
evidence bar FAILED — 5 problem(s):
✗ comment 101: no citable evidence — needs a file:line, a test/tool invocation, or a CLAUDE.md rule, not prose
✗ comment 101: CONCEDE needs `repro` — how the reviewer is right. A failing test or traceback when you can get one; otherwise the mechanism spelled out concretely (inputs or interleaving -> wrong result), or the rule it breaks. Reasoning counts. Deference does not
✗ comment 101: CONCEDE needs `refutation_attempted` — what you tried in order to prove the reviewer wrong, and why it failed
✗ comment 102: DISPUTE carries a `fix` — you do not change code on a comment you did not concede
✗ comment 103 (senior-reviewer, src/alert_throttle.py): no verdict
Second try: with proof from the code
$ python3 pr_review.py check 349
evidence bar PASSED — CLARIFY=1, CONCEDE=1, DISPUTE=1
| Comment | Answer | Proof | Draft reply |
|---|---|---|---|
| The time limit is hard-coded (line 47) | Concede | Line 47 has the fixed value 300. The project rules do not allow fixed settings. The agent checked if 300 must never change. It can change, so the rule applies. | Agreed, this breaks our config rule. Moving it to settings. |
| Line 31 has no test | Dispute | tests/test_alerts.py:56 tests this line. All 21 tests pass. | This branch is covered at tests/test_alerts.py:56. Happy to add a case if you had a different input in mind. |
| Line 52 could be slow | Clarify | Line 52 does one dictionary lookup for each alert. | Which input size or call pattern are you worried about? Line 52 is one dict lookup per alert, so I want to make sure I test the case you have in mind. |
$ python3 pr_review.py replies 349
written: .claude/review-context/pr-349.replies.md
NOT posted. Read it, edit the wording, then run `post`.
Next steps
- Fix comment 101 only. Commit the fix.
- Read the drafts in
.claude/review-context/pr-349.replies.md. Change the words if necessary. - Run
python3 pr_review.py post 349to see what it will post. Then add--yesto post the replies.
Connects securely to your tools. The creator never sees your data.
About this skill
The problem
A reviewer leaves a comment on your pull request. The comment sounds correct, so your AI agent agrees and changes the code. But the reviewer did not have all the facts. The change was not necessary.
What this skill does
The agent reads the code before it answers a comment. Then it gives each comment one of four answers:
- Concede: the reviewer is correct. The agent must give proof, for example a failing test or the project rule that the code breaks. It must also say how it tried to prove the reviewer wrong.
- Dispute: the reviewer is not correct. The agent must give the file and line that show this, or a test run. It does not change the code.
- Clarify: the comment is not clear. The agent asks the reviewer a question. It does not change the code.
- No action: the comment is an approval or a thank-you. The agent cannot use this answer for a comment on a line of code.
A small Python script checks these rules. The script stops and shows the problem when:
- the agent agrees or disagrees with no proof,
- the agent changes code for a Dispute or a Clarify answer,
- the agent skips a comment.
The skill leaves out bot messages, resolved comments, and comments that you already answered.
You stay in control
The agent writes draft replies to a file. It does not post them. You read the drafts, change the words if necessary, and post them yourself.
Help your reviewers
The skill can also write a short summary of your pull request. The summary says what changed, what you already checked, and where you want the reviewer to look. You commit it with your branch. You can also add it to the pull request description.
What you need
- The GitHub command-line tool (
gh). You must be logged in. - Python 3.10 or later. You do not need other packages.
- A local copy of your repository.
Use it with Review This PR
This skill helps the author of a pull request. Review This PR is a separate skill for the reviewer.
- You use this skill to write a summary of your pull request.
- The reviewer's agent uses Review This PR. It reads your summary before it reads the code.
- Before it writes a comment, the reviewer's agent must give the file and line, and show what goes wrong.
- When comments come, this skill helps you answer them with proof.
Each skill works alone. They work best together.
Works with GitHub only. Needs the gh tool and Python 3.10 or later. Run it inside a local copy of your repository. The skill does not post replies. You post them.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 29 days ago
Requires
Permissions
Allowed Hosts
File Scopes
Terminal: the skill runs its Python script, git and gh. Read files: the agent reads the code that each comment is about. Write files: the skill saves its notes and draft replies in the .claude/review-context folder of your repository. Network: gh reads the comments from GitHub. The skill writes to GitHub only when you add --yes to a command.