- Home
- Skills
- Code Quality & Review
- agentic pr gatekeeper
Works with the AI Agents you already use
agentic pr gatekeeper
Automated PR gatekeeper for architectural auditing, blast radius assessment, and concurrency safety checks.
$19
agentic pr gatekeeper
Example session with this skill installed
Review the current branch changes against main and check the blast radius especially for any database or billing logic.
- Read your context and instructions
- Compiled the agentic pr gatekeeper
I have completed the architectural audit of your current branch against main. I analyzed 4 files, focusing on the changes in the billing/ and dal/ directories.
🛡️ Agentic PR Gatekeeper Report
Evaluation Verdict: 🔴 REJECTED_BLOCKED
Overall Risk Score: 4 / 5 (Normalized: 80/100)
Blast Radius: MODULE
The PR introduces a critical concurrency risk in the invoice generation logic by updating balances without row-level locking. While the new API endpoints are correctly versioned, the database operations lack the necessary safety for high-concurrency environments.
📊 Deterministic Metrics:
- Files Changed:
4(+142 / -12) - Accompanying Tests: [Yes ✅]
- Critical Infrastructure Path: [Yes ⚠️]
📋 Findings:
| Location | Severity | Issue Detected | Actionable Suggestion |
|---|---|---|---|
services/billing.py:84 | CRITICAL | Missing row-level lock on balance update | Wrap the balance decrement in a SELECT FOR UPDATE within a transaction block. |
dal/models.py:112 | HIGH | Unindexed filter in lookup | Add a composite B-Tree index for the account_id and status columns. |
api/webhooks.py:45 | MEDIUM | Non-idempotent webhook | Implement a request payload hash check using a UUID to prevent double-processing. |
Next steps
- Implement row-level locking in
services/billing.pyto prevent race conditions during concurrent balance updates. - Add the missing database migration for the composite index in
dal/models.py. - Update the webhook handler to verify idempotency keys before processing.
Connects securely to your tools. The creator never sees your data.
About this skill
Reviewing pull requests manually is slow, inconsistent, and prone to human error when checking for deep architectural risks like race conditions or N+1 queries. This skill provides an automated quality gate that audits code against enterprise standards before a human ever looks at the diff.
What it does
- Deterministic Blast Radius: Measures the impact of changes by analyzing line counts and file locations within critical infrastructure paths.
- Concurrency Auditing: Detects missing row-level locks, race conditions, and non-idempotent API endpoints.
- Database Performance Check: Identifies N+1 query patterns and verifies if high-frequency filters have appropriate B-Tree indexes.
- Security Scans: Flags hardcoded secrets, non-parameterized SQL, and unsafe cryptographic comparisons.
- Auto-Approval Classification: Flags low-risk changes for fast-tracking while blocking architectural regressions.
How it works
- Extraction: The agent runs
pr-gatekeeper reviewto pull git diffs and AST symbols from the target branch. - Blast Radius Analysis: It identifies if sensitive directories like
auth/,billing/, ormigrations/are modified. - Semantic Audit: The code is checked against four core pillars: concurrency, performance, test coverage, and security.
- Scoring: The agent assigns a risk score from 1 to 5 and generates a structured verdict report.
Frameworks & tools
Built for Python 3.9+ environments using git. It integrates via MCP to extract context from source files and AST symbols.
Why this beats prompting it yourself
Generic prompts often miss structural dependencies or fail to enforce specific database locking strategies. This skill uses a deterministic workflow to ensure every PR is checked for high-stakes risks like inventory race conditions and unindexed loops that standard LLM prompts typically overlook.
Use cases
- Gatekeeping Production: Block merges that modify billing or security logic without adequate test coverage.
- Performance Optimization: Detect expensive database patterns in feature branches before they reach staging.
- Fast-tracking Docs: Automatically approve minor typos or documentation updates to reduce reviewer fatigue.
- Safety Audits: Verify that all monetary updates use
SELECT FOR UPDATEor serializable transactions.
Known limitations
Requires Python 3.9 or higher and local git access. Effective auditing depends on the presence of a structured ARCHITECTURE_GUIDELINES.md file for semantic alignment.
Requires Python 3.9+ and git. Best results require an ARCHITECTURE_GUIDELINES.md file. Works on local diffs via MCP context extraction.
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 today
Requires
Permissions
File Scopes