Salesforce Trigger Constraints

•
9
•

Enforces industry-standard Apex trigger patterns including bulkification, recursion prevention, and handler delegation.

This skill acts as an automated architectural guardrail for Salesforce developers, ensuring that every Apex trigger adheres to the 'One Trigger Per Object' rule and delegates logic to specialized handler classes. It identifies and prevents common anti-patterns such as SOQL or DML statements inside loops, hardcoded IDs, and missing recursion guards. By integrating these constraints directly into the Claude Code or Cursor workflow, it helps developers build scalable, enterprise-grade automation that respects Salesforce governor limits and order of execution.

주요 기능

01Detection of SOQL and DML statements within loops to ensure bulkification
02Validation of proper context variable usage in before vs. after contexts
039 GitHub stars
04Mandatory implementation of recursion guards and bypass mechanisms
05Verification of trigger handler delegation to keep trigger bodies logic-free
06Strict enforcement of one-trigger-per-object architecture

사용 사례

01Refactoring legacy Apex triggers into clean, handler-based patterns
02Scaffolding new enterprise-ready trigger frameworks like FFLIB or custom handlers
03Reviewing Salesforce pull requests for governor limit risks and best practices