- Home
- Skills
- Code Quality & Review
- PR Risk Reviewer
Works with the AI Agents you already use
PR Risk Reviewer
Perform structured risk assessments on code diffs to identify security flaws, breaking changes, and deployment risks.
Free
PR Risk Reviewer
Example session with this skill installed
Review this PR for risk: https://github.com/acme/backend/pull/402. It changes the payment gateway timeout logic and adds a migration to the orders table.
- Read your context and instructions
- Compiled the pr risk reviewer
I have analyzed the diff for acme/backend/pull/402. The analysis flagged two critical paths: the orders migration and the gateways/stripe.py timeout logic.
PR Risk Assessment: PR #402
Verdict: MEDIUM RISK
The primary risk is potential request accumulation due to increased timeouts, which could saturate the worker pool during peak traffic. The migration is additive and safe for concurrent execution.
Top Risks
Worker Saturation [High]: gateways/stripe.py:42. Increasing request_timeout from 5s to 30s without a corresponding increase in worker capacity may lead to exhaustion during Stripe outages.
Database Lock [Low]: migrations/0042_add_retry_count.py:15. Adding a nullable column to orders. Low risk as it does not require a full table rewrite in Postgres.
Risk Dimension Scoring
| Dimension | Score | Notes |
|---|---|---|
| Data Safety | Low | Additive migration, no data transformation. |
| Breaking Changes | None | Internal logic change only; no API contract changes. |
| Security | Low | No new user inputs or auth changes detected. |
| Complexity | Medium | Changes core payment flow error handling. |
Pre-Merge Test Plan
- Migration Check: Run
python manage.py migrateon a staging DB with >1M rows to verify migration time.
Timeout Simulation: Use a mock server to induce a 25s delay in the Stripe API and monitor Celery worker availability.
3.
Idempotency Test: Trigger a timeout during an order update and verify no duplicate order_id entries are created.
Rollback Plan
- Code: Revert to commit
a1b2c3dand redeploy.
Database: Migration is additive; no immediate rollback required, but 0042 can be reversed if necessary via migrate orders 0041.
Next steps
- Verify if
CELERY_WORKER_CONCURRENCYneeds adjustment for longer-running tasks. - Confirm the Stripe timeout value with the infrastructure team.
Connects securely to your tools. The creator never sees your data.
About this skill
PRs move fast, and critical regressions often hide in the noise of large diffs. This skill audits code changes specifically for stability, security, and operational risk rather than just syntax or style. It identifies high-impact changes like database migrations, API contract breaks, and auth logic shifts that standard linters miss.
What it does
- Risk Scoring provides a structured verdict based on ten dimensions of operational risk.
- Automated Triage flags sensitive files including lockfiles, infrastructure config, and payment logic.
- Evidence-Based Auditing maps every medium to high risk finding to specific file paths and line numbers.
- Test Planning generates concrete verification steps including specific inputs, user roles, and expected results.
- Rollback Strategy defines how to revert the change if the deployment fails in production.
How it works
- Input Diff: The user provides a git diff, patch file, or a GitHub PR URL to be fetched.
- Signal Gathering: The skill runs an internal analysis script to calculate diff stats and flag risky patterns.
- Deep Analysis: Targeted files are reviewed against specific security and Python-stack rubrics.
- Report Generation: A structured risk report is produced, highlighting top concerns and a final merge verdict.
Frameworks & tools
Built for teams using Git, GitHub, and Python backends (Django, FastAPI, SQLAlchemy, Alembic). It utilizes custom scripts for diff parsing and scoring rubrics for consistent assessment.
Why this beats prompting it yourself
Generic prompts often miss silent logic changes or focus too much on code style. This skill enforces evidence-based reporting and applies a rigorous rubric to ensure findings are objective and actionable for the person merging the code.
Use cases
- Auditing complex database migrations for potential locking or data loss.
- Reviewing sensitive auth or security changes before they hit production.
- Assessing the blast radius of dependency bumps in large Python projects.
- Providing a final sanity check for high-stakes releases.
Known limitations
The skill reviews code diffs, not the full running system, so it cannot detect environment-specific runtime issues. Performance is best on PRs under 2,000 lines.
How to use
Skills on Agensi run inside your AI agent. Copy the prompt, paste it into your agent, and it connects to Agensi and installs this skill for you. If a payment is needed, your agent shows it to you first.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill passes our trust checks below.
Security scanned
Passed our 8-point scan before listing
Fresh listing
Recently published to Agensi
Free forever
No account required to browse
Trust & safety
Security scanned
Verified clean 1 day ago
- Free to download with an account
Requires