Salesforce SOQL Constraints

•
9
•

Enforces Salesforce SOQL and SOSL best practices, query selectivity, and governor limit compliance to prevent performance issues and security vulnerabilities.

The sf-soql-constraints skill provides a rigorous framework for writing and reviewing Salesforce database queries within Claude Code. It automatically enforces critical rules such as avoiding queries in loops, ensuring index selectivity for Large Data Volumes (LDV), and preventing SOQL injection through bind variables. By integrating governor limit awareness and security enforcement like USER_MODE, this skill helps developers build scalable, secure, and performant Salesforce applications that pass security reviews and avoid production outages.

主要功能

01Optimization recommendations for relationship queries and aggregate functions.
029 GitHub stars
03Enforcement of secure query practices using USER_MODE and bind variables.
04Automatic detection of non-selective queries on large objects to prevent table scans.
05Prevention of SOQL/SOSL inside loops to ensure governor limit compliance.
06Validation against hardcoded IDs and leading wildcards in LIKE filters.

使用场景

01Ensuring FLS and sharing security compliance for queries in LWC or Aura controllers.
02Reviewing Apex code for governor limit compliance and database bulkification.
03Refactoring legacy SOQL queries for Large Data Volume (LDV) performance.