BeforeMerge

AI-native code review knowledge base. Structured rules that catch what linters miss.

Product

  • Features
  • Explore
  • Pricing
  • Docs
  • GitHub

Company

  • About
  • Blog
  • Contributors
  • Contributing

Legal

  • Privacy Policy
  • Terms of Service
  • MIT License

© 2026 BeforeMerge. Built by Peter Krzyzek

BeforeMerge
Features
Explore
PricingBlogContributorsInstall Guide
3Sign In
FeaturesExplore
RulesSkillsKnowledgePrompts
PricingBlogContributorsInstall Guide
Sign In

Explore

Browse 354 rules, 42 knowledge articles, and 28 prompt templates across security, performance, architecture, and quality.

Sort:
Previous12Next

Automate these checks on every PR

BeforeMerge scans your pull requests against these rules automatically. Get actionable feedback before code ships to production.

Join WaitlistLearn More

28 prompts

Database Schema Security Audit

Template

Comprehensive security audit of a database schema covering access control, RLS, encryption, and data exposure.

Security Auditdatabasesecurity

Database Migration Safety Review

Template

Analyze a database migration file for safety issues, lock risks, and best practices.

Code Reviewdatabasemigration

Database Query Performance Optimization

Template

Analyze and optimize a slow database query with EXPLAIN plan analysis.

Performancedatabasequery

Extract Reusable Component

Template

Extract a reusable, well-typed component from existing code with proper interface design and documentation.

Refactoringrefactoringcomponents

Refactor for Testability

Template

Restructure code to be more testable by applying dependency injection, interface segregation, and separation of concerns.

Refactoringrefactoringtesting

Diagnose Runtime Error

Template

Systematically debug a runtime error by analyzing the error message, stack trace, and surrounding code to find the root cause and fix.

Debuggingdebuggingerrors

Trace Data Flow

Template

Trace data through a system to find where it diverges from expected behavior, identifying the exact transformation or handoff that introduces the bug.

Debuggingdebuggingdata-flow

Identify Memory Leak

Template

Find and fix memory leaks by analyzing code patterns, symptoms, and environment for common leak sources.

Debuggingdebuggingmemory-leak

Audit Authentication Flow

Template

Review an authentication implementation for security vulnerabilities covering session management, token handling, password policies, and attack vectors.

Security Auditsecurityauthentication

Audit API Endpoint Security

Template

Review API endpoint security covering authentication, authorization, input validation, rate limiting, and data exposure.

Security Auditsecurityapi

Audit Dependency Vulnerabilities

Template

Review project dependencies for known vulnerabilities, outdated packages, and supply chain risks.

Security Auditsecuritydependencies

Evaluate System Design

Template

Review a system architecture for scalability, reliability, maintainability, and alignment with requirements.

Architecture Reviewarchitecture

Plan Database Schema

Template

Design a database schema from requirements, including tables, relationships, indexes, constraints, and migration strategy.

Architecture Reviewarchitecture

Write Technical Design Document

Template

Draft a complete technical design document covering problem statement, proposed solution, alternatives, risks, and implementation plan.

Documentationdocumentationdesign-doc

Optimize Database Queries

Template

Analyze and optimize slow database queries using EXPLAIN output, schema analysis, and query rewriting techniques.

Performanceperformancedatabase

Optimize Frontend Bundle Size

Template

Analyze and reduce JavaScript bundle size by identifying large dependencies, code splitting opportunities, and tree shaking improvements.

Performanceperformancefrontend

Generate Unit Tests

Template

Write comprehensive unit tests covering happy paths, error cases, edge cases, and boundary conditions.

Testingtestingunit-tests

Generate Integration Tests

Template

Write integration tests that verify the interaction between multiple components, services, or modules.

Testingtestingintegration-tests

Generate End-to-End Tests

Template

Write end-to-end test scenarios that simulate real user interactions through the full application stack.

Testingtestinge2e

Scaffold CRUD API

Template

Generate complete CRUD API endpoints for an entity with validation, error handling, pagination, and database integration.

Code Generationcode-generationcrud

Scaffold React Component

Template

Generate a complete React component with TypeScript types, accessibility, styling, tests, and Storybook stories.

Code Generationcode-generationreact

Migrate JavaScript to TypeScript

Template

Convert JavaScript code to TypeScript with proper type definitions, strict mode compliance, and incremental adoption strategy.

Migrationmigrationtypescript

Migrate Next.js Pages Router to App Router

Template

Convert Next.js Pages Router code to the App Router pattern with server components, server actions, and modern data fetching.

Migrationmigrationnextjs

Simplify Complex Function

Template

Break down a complex, hard-to-read function into smaller, well-named, testable functions with clear responsibilities.

Refactoringrefactoringclean-code
system-design
database