salesforce-component-standards
Installation
SKILL.md
Salesforce Component Quality Standards
Apply these checks to every LWC, Aura component, and Visualforce page you write or review.
Section 1 — LWC Quality Standards
1.1 Data Access Pattern Selection
Choose the right data access pattern before writing JavaScript controller code:
| Use case | Pattern | Why |
|---|---|---|
| Read a single record reactively (follows navigation) | @wire(getRecord, { recordId, fields }) |
Lightning Data Service — cached, reactive |
| Standard CRUD form for a single object | <lightning-record-form> or <lightning-record-edit-form> |
Built-in FLS, CRUD, and accessibility |
| Complex server query or filtered list | @wire(apexMethodName, { param }) on a cacheable=true method |
Allows caching; wire re-fires on param change |
| User-triggered action, DML, or non-cacheable server call | Imperative apexMethodName(params).then(...).catch(...) |
Required for DML — wired methods cannot be @AuraEnabled without cacheable=true |
| Cross-component communication (no shared parent) | Lightning Message Service (LMS) | Decoupled, works across DOM boundaries |
| Multi-object graph relationships | GraphQL @wire(gql, { query, variables }) |
Single round-trip for complex related data |