前端开发

salesforce-component-standards

github/awesome-copilot

Quality standards for Salesforce Lightning Web Components (LWC), Aura components, and Visualforce pages. Covers SLDS 2 compliance, accessibility (WCAG 2.1 AA), data access pattern selection, component communication rules, XSS prevention, CSRF enforcement, FLS/CRUD in AuraEnabled methods, view state management, and Jest test requirements. Use this skill when building or reviewing any Salesforce UI component to enforce platform-specific security and quality standards.

  • 770 次安装
  • 4.1万 星标
  • 收录于

安装命令

npx skills add https://github.com/github/awesome-copilot --skill salesforce-component-standards

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