Browse 354 rules, 42 knowledge articles, and 28 prompt templates across security, performance, architecture, and quality.
BeforeMerge scans your pull requests against these rules automatically. Get actionable feedback before code ships to production.
28 prompts
Comprehensive security audit of a database schema covering access control, RLS, encryption, and data exposure.
Analyze a database migration file for safety issues, lock risks, and best practices.
Analyze and optimize a slow database query with EXPLAIN plan analysis.
Extract a reusable, well-typed component from existing code with proper interface design and documentation.
Restructure code to be more testable by applying dependency injection, interface segregation, and separation of concerns.
Systematically debug a runtime error by analyzing the error message, stack trace, and surrounding code to find the root cause and fix.
Trace data through a system to find where it diverges from expected behavior, identifying the exact transformation or handoff that introduces the bug.
Find and fix memory leaks by analyzing code patterns, symptoms, and environment for common leak sources.
Review an authentication implementation for security vulnerabilities covering session management, token handling, password policies, and attack vectors.
Review API endpoint security covering authentication, authorization, input validation, rate limiting, and data exposure.
Review project dependencies for known vulnerabilities, outdated packages, and supply chain risks.
Review a system architecture for scalability, reliability, maintainability, and alignment with requirements.
Design a database schema from requirements, including tables, relationships, indexes, constraints, and migration strategy.
Draft a complete technical design document covering problem statement, proposed solution, alternatives, risks, and implementation plan.
Analyze and optimize slow database queries using EXPLAIN output, schema analysis, and query rewriting techniques.
Analyze and reduce JavaScript bundle size by identifying large dependencies, code splitting opportunities, and tree shaking improvements.
Write comprehensive unit tests covering happy paths, error cases, edge cases, and boundary conditions.
Write integration tests that verify the interaction between multiple components, services, or modules.
Write end-to-end test scenarios that simulate real user interactions through the full application stack.
Generate complete CRUD API endpoints for an entity with validation, error handling, pagination, and database integration.
Generate a complete React component with TypeScript types, accessibility, styling, tests, and Storybook stories.
Convert JavaScript code to TypeScript with proper type definitions, strict mode compliance, and incremental adoption strategy.
Convert Next.js Pages Router code to the App Router pattern with server components, server actions, and modern data fetching.
Break down a complex, hard-to-read function into smaller, well-named, testable functions with clear responsibilities.