본문으로 건너뛰기
Skillpedia
웹사이트 및 UI (프런트엔드)40k · #7413

salesforce-component-standards

하는 일

이 안내서는 안전하고 접근성이 좋으며 모범 사례를 따르는 Salesforce 사용자 인터페이스 구성 요소를 만드는 데 도움을 줍니다. 구성 요소가 Salesforce 디자인 시스템(SLDS)과 잘 어울리고 사용하기 쉽도록 합니다.

사용하는 경우

  • ✓Salesforce용 새 화면 구성 요소(컴포넌트)를 만들 때.
  • ✓기존 구성 요소가 안전하고 효율적인지 검토할 때.
  • ✓구성 요소가 Salesforce 품질 기준을 따르도록 하고 싶을 때.

스킬 링크

https://github.com/github/awesome-copilot/blob/main/skills/salesforce-component-standards/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/github/awesome-copilot/blob/main/skills/salesforce-component-standards/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“제 Lightning Web 컴포넌트가 모든 사용자에게 접근 가능하도록 하려면 어떻게 해야 하나요?”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

이 안내서는 구성 요소 유형(LWC, Aura, Visualforce)마다 구체적인 규칙을 설명합니다. 데이터, 보안, 시각적 스타일, 테스트를 다루는 방법을 알려 주며, 모든 것이 정해진 기준을 따르도록 합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

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

1.2 Security Rules

Rule Enforcement
No raw user data in innerHTML Use {expression} binding in the template — the framework auto-escapes. Never use this.template.querySelector('.el').innerHTML = userValue
Apex @AuraEnabled methods enforce CRUD/FLS Use WITH USER_MODE in SOQL or explicit Schema.sObjectType checks
No hardcoded org-specific IDs in component JavaScript Query or pass as a prop — never embed record IDs in source
@api properties from parent: validate before use A parent can pass anything — validate type and range before using as a query parameter

1.3 SLDS 2 and Styling Standards

  • Never hardcode colours: color: #FF3366 → use color: var(--slds-c-button-brand-color-background) or a semantic SLDS token.
  • Never override SLDS classes with !important — compose with custom CSS properties.
  • Use <lightning-*> base components wherever they exist: lightning-button, lightning-input, lightning-datatable, lightning-card, etc.
  • Base components include built-in SLDS 2, dark mode, and accessibility — avoid reimplementing their behaviour.
  • If using custom CSS, test in both light mode and dark mode before declaring done.

1.4 Accessibility Requirements (WCAG 2.1 AA)

Every LWC component must pass all of these before it is considered done:

  • All form inputs have <label> or aria-label — never use placeholder as the only label
  • All icon-only buttons have alternative-text or aria-label describing the action
  • All interactive elements are reachable and operable by keyboard (Tab, Enter, Space, Escape)
  • Colour is not the only means of conveying status — pair with text, icon, or aria-* attributes
  • Error messages are associated with their input via aria-describedby
  • Focus management is correct in modals — focus moves into the modal on open and back on close

1.5 Component Communication Rules

Direction Mechanism
Parent → Child @api property or calling a @api method
Child → Parent CustomEvent — this.dispatchEvent(new CustomEvent('eventname', { detail: data }))
Sibling / unrelated components Lightning Message Service (LMS)
Never use document.querySelector, window.*, or Pub/Sub libraries

For Flow screen components:

  • Events that need to reach the Flow runtime must set bubbles: true and composed: true.
  • Expose @api value for two-way binding with the Flow variable.

1.6 JavaScript Performance Rules

  • No side effects in connectedCallback: it runs on every DOM attach — avoid DML, heavy computation, or rendering state mutations here.
  • Guard renderedCallback: always use a boolean guard to prevent infinite render loops.
  • Avoid reactive property traps: setting a reactive property inside renderedCallback causes a re-render — use it only when necessary and guarded.
  • Do not store large datasets in component state — paginate or stream large results instead.

1.7 Jest Test Requirements

Every component that handles user interaction or retrieves Apex data must have a Jest test:

// Minimum test coverage expectations

…
자주 묻는 질문

LWC, Aura, Visualforce는 무엇인가요?

Salesforce 안에서 사용자 인터페이스를 만드는 데 쓰이는 서로 다른 기술입니다.

SLDS 2란 무엇인가요?

Salesforce 디자인 시스템으로, 시각적 일관성을 유지하도록 구성 요소의 모양과 느낌을 정합니다.

'접근성(WCAG 2.1 AA)'은 무엇을 뜻하나요?

시각, 청각, 운동 능력에 장애가 있는 사람을 포함해 모든 사람이 구성 요소를 사용할 수 있어야 한다는 뜻입니다. 국제 표준을 따릅니다.

상세 정보

작성자의 원본 설명

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

repo: github/awesome-copilot

인기도

GitHub 스타
40k
순위
#7413
라이선스
MIT
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬