# PR Review Defense

> Your AI agent checks the code before it agrees with a review comment on your pull request.

PR Review Defense is a paid AI agent skill on Agensi by Arpit Jain, in Code Quality & Review. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $15 (one-time purchase)
- Creator: [Arpit Jain](https://www.agensi.io/creators/arpit-jain)
- Category: [Code Quality & Review](https://www.agensi.io/skills/code-quality-review)
- Version: 1.0
- Last updated: 2026-10-19
- Security: scan passed (2026-10-19); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/pr-review-defense
- Tags: code-review, github-cli, python, git, automation

## 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.

1. You use this skill to write a summary of your pull request.
2. The reviewer's agent uses Review This PR. It reads your summary before it reads the code.
3. Before it writes a comment, the reviewer's agent must give the file and line, and show what goes wrong.
4. When comments come, this skill helps you answer them with proof.

Each skill works alone. They work best together.

## Requires

- gh (GitHub CLI, authenticated)
- python3 (3.10+)
- Git

## Known limitations

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 this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the PR Review Defense skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### What does this skill do?

It helps your AI agent answer review comments on a GitHub pull request. The agent checks the code first. It agrees only when it has proof. It disagrees only when it has proof. It asks a question when a comment is not clear.

### What do I need?

You need Python 3.10 or later and the GitHub command-line tool (gh). You must be logged in to gh. Run the skill from a local copy of your repository.

### Which AI agents can use it?

Any agent that can read SKILL.md files and run commands. I tested it in Claude Code and Codex CLI. You get the skill instructions, a Python script, and a template for the reviewer summary.

### Why not just tell my agent to be careful?

An instruction is easy to forget. This skill uses a script that checks each answer. If the agent agrees or disagrees with no proof, the script stops and shows the problem. It does not write the replies until every answer passes the check.

### Does it post replies to GitHub for me?

No. It writes draft replies to a file. You read them and post them yourself. You can change the words before you post.

### Do I also need Review This PR?

No. This skill works alone. Review This PR is a separate skill for the person who reviews your code. It reads the summary that this skill writes, so the review starts with the facts. Use both to get the most from each.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
