- Home
- Skills
- Code Quality & Review
- Automated PR Review & Pruner
More screenshots
Works with the AI Agents you already use
Automated PR Review & Pruner
Audits Git diffs and code modules to detect dead code paths, N+1 queries, and unhandled promise rejections.
$9.99
Automated PR Review & Pruner
Example session with this skill installed
Review this pull request diff for bugs, memory leaks, and dead code. Clean up any issues and output the optimized code:
import { fetchUser, fetchPermissions, unusedHelper } from './api';
export async function processUsers(userIds: string[]) {
const unusedVar = "debug_mode";
for (let i = 0; i < userIds.length; i++) {
const user = await fetchUser(userIds[i]);
const perms = await fetchPermissions(user.id);
console.log(user, perms);
}
return true;
console.log("Processing complete");
}
- Read your context and instructions
- Compiled the automated pr review
📋 Audit Findings & Severity Report
| Severity | Location | Issue Type | Summary |
|---|---|---|---|
| 🔴 Critical | processUsers() loop | Performance / N+1 | Sequential await calls inside for loop cause high latency. |
| 🟡 Warning | Line 13 | Unreachable Code | console.log placed directly after an unconditional return. |
| 🟡 Warning | Line 1 & Line 4 | Dead Code | Unused import unusedHelper and unused variable unusedVar. |
🔍 Detailed Fixes
Async Bottleneck Resolution: Converted sequential for loop await calls into parallelized Promise.all() execution to reduce total execution time from O(N) network requests to O(1) sequential delays.
2. Dead Code Stripping: Removed unused variable unusedVar and unused import unusedHelper.
3. Unreachable Code Removal: Purged execution block following the explicit return true statement.
✨ Cleaned Master Output
import { fetchUser, fetchPermissions } from './api';
export async function processUsers(userIds: string[]): Promise<boolean> {
const userResults = await Promise.all(
userIds.map(async (id) => {
const user = await fetchUser(id);
const perms = await fetchPermissions(user.id);
return { user, perms };
})
);
userResults.forEach(({ user, perms }) => {
console.log(user, perms);
});
return true;
}
Connects securely to your tools. The creator never sees your data.
About this skill
Automated PR Review & Dead-Code Pruner is a deterministic code review engine built for Agensi. Unlike generic AI code reviews that focus on superficial style formatting, this skill focuses strictly on high-impact architectural issues, runtime risks, dead code elimination, and database performance bottlenecks.
Core Capabilities
- Dead Code & Unreachable Logic Removal: Automatically flags and strips unused symbols, orphaned imports, unreachable branches, and redundant variable assignments.
- Async & Resource Management Audit: Catches floating promises, unhandled rejections, dangling event listeners/timers, and sequential
awaitbottlenecks that should be parallelized withPromise.all(). - Database & Algorithmic Efficiency: Identifies N+1 query patterns inside loops and high cyclomatic complexity (nested loops >3 levels deep) to suggest clean guard clauses.
- Refactored Code Delivery: Generates structured severity matrices alongside zero-fluff, copy-paste ready refactored code blocks.
Compatible Workflows
Ideal for continuous integration checks, pull request audits, legacy codebase refactoring, and daily developer code hygiene routines.
- Requires full access to code files or diff input: This skill audits provided code blocks or Git diffs; it does not directly query live database instances or external API endpoints.
- Code execution non-interference: The skill performs static logic checks, risk pattern matching, and structure analysis; it does not execute active unit test suites or compile binaries.
- Framework-agnostic pattern matching: Highly tailored for TypeScript, JavaScript, Python, and SQL workflows. Domain-specific DSLs may require explicit context in the prompt for optimal diff generation.
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 2 months ago
Permissions
No special permissions declared or detected