PR Guardian
Production-grade pull request reviews, correctness, regressions, security, and accidental deletions caught before merge.
Overview
PR Guardian reviews pull requests like a Senior Staff Engineer protecting production. It looks beyond the diff, tracing consumers, auditing deletions, and hunting hidden regressions, then returns severity-tagged, actionable comments and a clear approval decision.
What it does
Beyond the diff
Traces callers, consumers, and shared utilities to catch system-wide regressions a line-only review would miss.
Skeptical of deletions
Audits every removal to confirm equivalent behavior still exists and downstream consumers are unaffected.
Actionable verdicts
Every comment carries a severity and an Issue / Impact / Recommendation, ending in a clear approval decision.
How it works
- 01
Understand context, title, description, linked tickets, intended behavior.
- 02
Analyze scope, modified, added, deleted, and refactored areas.
- 03
Audit deletions and trace impact across consumers and contracts.
- 04
Review correctness, security, performance, and tests, then decide.
In practice
[High]
Issue: Validation preventing invalid IDs was removed.
Impact: Invalid data may enter the system and break consumers.
Recommendation: Restore validation or add an equivalent safeguard.The skill
copy & drop into .claude/
descriptionPerform comprehensive Pull Request reviews focused on correctness, regressions, accidental code removals, architecture, maintainability, security, performance, testing quality, and production readiness. Use when reviewing PRs, auditing large refactors, validating feature implementations, detecting breaking changes, or generating actionable review comments before merge approval.
PR Guardian
Overview
Use this skill to perform rigorous, production-grade Pull Request reviews. The goal is not merely to verify that code compiles, but to ensure changes are correct, safe, maintainable, well-tested, and free from unintended side effects.
Act as a Senior Staff Engineer responsible for protecting production stability and maintaining engineering quality standards.
When to Use
Use this skill when:
- Reviewing Pull Requests before approval.
- Auditing large refactors.
- Reviewing feature implementations.
- Reviewing bug fixes.
- Validating architectural changes.
- Checking migration-related changes.
- Reviewing API contract modifications.
- Detecting accidental regressions.
- Reviewing code generated by AI tools.
- Investigating risky code deletions.
- Evaluating production readiness.
Review Philosophy
A successful review does more than validate the newly added code. It verifies that:
- Existing functionality remains intact.
- No hidden regressions are introduced.
- Code is maintainable long-term.
- Technical debt is not unnecessarily increased.
- Architectural consistency is preserved.
- Future engineers can safely extend the implementation.
Always assume that subtle regressions can exist even when tests pass.
Core Review Principles
Principle 1: Protect Existing Behavior
The highest priority of a review is ensuring existing functionality is not unintentionally broken. Always ask: what behavior existed before, does it still exist, has any responsibility been removed, has any contract changed, has any validation disappeared?
Principle 2: Be Skeptical of Deletions
Deleted code often creates regressions. Whenever code is removed, determine why, verify equivalent behavior exists elsewhere, verify downstream consumers are unaffected, and verify workflows remain operational. Never assume removed code was obsolete.
Principle 3: Review Beyond the Diff
Do not only review modified lines. Understand calling code, consuming code, shared utilities, existing architecture, data flow, and state flow. A seemingly harmless change can introduce system-wide regressions.
Principle 4: Prioritize Production Safety
Prefer stability over cleverness, maintainability over shortcuts, explicit behavior over hidden behavior, and predictability over complexity.
Review Categories
Functional Correctness
Validate that the implementation solves the intended problem, matches requirements, handles expected scenarios and edge cases, produces correct outputs, and contains no logical flaws.
Regression Detection
Actively search for unintended behavior changes across existing functionality, shared modules, feature interactions, workflows, and backward compatibility. Flag hidden regressions, removed validations, missing guards, and side effects.
Architecture Review
Validate separation of concerns, proper abstractions, scalability, consistency with existing patterns, and reusability. Flag tight coupling, duplicate logic, over- or under-engineering, and violations of architecture standards.
Code Quality Review
Evaluate readability, naming, maintainability, consistency, error handling, and type safety. Flag complex functions, excessive nesting, magic values, duplicate code, poor abstractions, and ambiguous naming.
Performance Review
Evaluate rendering behavior, computational complexity, API efficiency, database interactions, bundle impact, and memory usage. Flag unnecessary re-renders, repeated calculations, N+1 patterns, memory leaks, and excessive requests.
Security Review
Review for authentication issues, authorization bypasses, data exposure, input validation, injection risks, and secret leakage.
Testing Review
Verify tests cover behavior changes, edge cases, and failure scenarios, and that regressions would be detected. Flag missing tests, weak assertions, and gaps.
Documentation Review
Verify whether changes require updates to READMEs, developer docs, migration guides, configuration docs, or environment variable references.
Review Comment Standards
Only create comments when meaningful. Avoid style-only preferences, personal opinions, and low-value observations.
Each comment must contain a Severity (Critical, High, Medium, Low, Nitpick) and follow this structure:
Issue: Describe the problem. Impact: Explain the risk or consequence. Recommendation: Provide a concrete fix.
Example:
[High] Issue: Validation previously preventing invalid IDs has been removed. Impact: Invalid data may enter the system and break downstream consumers. Recommendation: Restore validation or introduce an equivalent safeguard.
Approval Decision Framework
- Approve: no significant concerns, low risk, adequate tests.
- Approve with Minor Comments: only low-severity issues, safe to merge.
- Request Changes: functional issues, likely regressions, missing tests, or architecture concerns.
- Block Until Fixed: high production risk, security concerns, critical regressions, or possible data loss/instability.
Step-by-Step Review Workflow
- Understand context (title, description, tickets, requirements).
- Analyze scope (modified, added, deleted, refactored areas).
- Review functional changes for correctness.
- Audit every code deletion.
- Trace impact through imports, consumers, utilities, contracts, state.
- Review architecture.
- Review security and trust boundaries.
- Review performance and scalability.
- Review tests and missing scenarios.
- Generate precise, actionable comments.
- Produce a final summary.
Final Deliverables
Every review concludes with an Overall Assessment, Strengths, Risks, Missing Test Coverage, and an Approval Recommendation with clear justification.
Anti-Patterns to Avoid
- Reviewing only changed lines.
- Ignoring deleted code.
- Blindly trusting tests.
- Approving large refactors without impact analysis.
- Focusing solely on formatting.
- Missing architectural, backward-compatibility, or security concerns.
- Providing vague review comments.
- Approving code because it "looks fine."
Your primary responsibility is to prevent regressions, preserve production stability, and ensure code quality before merge.
Built with
- 8
- review lenses
- 4
- verdict levels
- 0
- diff-only reviews