Create a Safe Code-Review & Automated PR Gatekeeper Skill
Generate a Claude Skill (SKILL.md) for automated Pull Request code reviews focusing on architecture, security bugs, performance leaks, and standards.
System Directive • Copy and Paste Below
You are a Principal Engineering Reviewer and Security Architect.
Create a robust Claude Skill named `safe-code-reviewer` defined in a standard `SKILL.md` file.
### REPOSITORY & REVIEW CONTEXT:
- Primary Languages: [PRIMARY_LANGUAGES]
- Coding Standards Reference (CLAUDE.md, ESLint, Google Style Guide): [CODING_STANDARDS]
- Branching Model (GitFlow, Trunk-Based): [BRANCHING_MODEL]
### SKILL.MD DIRECTIVES & REVIEW PROTOCOL:
1. **Frontmatter**: Valid `name: safe-code-reviewer` with description triggering on `git diff`, PR review requests, or staged change inspections.
2. **Phase 1: Diff & Scope Analysis**:
- Read the incoming diff using `git diff main...HEAD` or patch file.
- Identify touched modules and calculate the blast radius.
3. **Phase 2: Security & Vulnerability Scan**:
- Check for SQL injection, unsanitized innerHTML/XSS, unvalidated inputs, exposed secrets, and insecure dependency additions.
4. **Phase 3: Performance & Resource Leaks**:
- Detect memory leaks, unclosed listeners, unindexed database queries, O(n^2) loops in render pathways, and missing pagination.
5. **Phase 4: Architectural & Clean Code Compliance**:
- Enforce single responsibility, proper error boundaries, and avoidance of anti-patterns defined in [CODING_STANDARDS].
6. **Phase 5: Actionable Feedback Formatting**:
- Categorize findings into:
- 🛑 **Blocker**: Must be resolved before merge.
- ⚠️ **Improvement**: High-value refactor or optimization.
- 💡 **Nitpick**: Minor stylistic preference.
- Provide concrete replacement code snippets for every requested change.
Generate the full `SKILL.md` file ready to commit to `.claude/skills/safe-code-reviewer/`.
Customization & Placeholders
Specify your language stack and standards. Claude will output an automated PR gatekeeper skill with structured review matrices.
Example Input Values
Languages: TypeScript + Go, Standards: CLAUDE.md + strict linter, Branching: Trunk-based with short-lived feature branches.
Expected Output Structure
A complete SKILL.md specifying git diff extraction, security audits, performance profiling, and blocker classification.
Code Review & Security Audits
Qubenix helps technology teams maintain pristine codebase health with architecture reviews, security auditing, and continuous code quality.
More Prompts in Claude Development Toolkit
Generate a Production-Ready CLAUDE.md for an Existing Repository
Inspect an existing codebase and generate a comprehensive, accurate CLAUDE.md with project architecture, build commands, and coding conventions.
Create a Professional design.md Specification from Current Website
Inspect an existing web application or website and extract a complete, structured design.md with design tokens, typography, and component specs.
Create a Reusable Claude Skill for React & Next.js Development
Generate a fully conformant SKILL.md for React and Next.js development that enforces type safety, component modularity, and zero-re-render patterns.