Reviews LWC for LDS best practices: UIAPI vs Apex, cache invalidation with refreshApex/notifyRecordUpdateAvailable, schema imports, and record-form data patterns.
Ships in sf-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Apply the Lightning Data Service guidelines to a Lightning Web Component. Three pillars: data consistency, referential integrity, and UIAPI vs Apex. Focused on the UI API path — GraphQL and upstream data-requirements analysis are handled out-of-band.
getRecord, getRecords, createRecord, updateRecord, deleteRecord, base record form components, or Apex.@salesforce/schema/...) to replace hard-coded field/object names.Do NOT use this skill for:
design-systems-slds-apply).@salesforce/schema imports (Setup → Object Manager → <Object> → Details → API Name; or, when GraphQL serves the read, an SDL pulled from the target org).refreshApex, notifyRecordUpdateAvailable, wire result propagation.@salesforce/schema imports, field constants, object-name resolution, and their propagation through refactors.Per-adapter API reference — references/adapter-apis.md holds Syntax / Parameters / Returns / Usage for every UI API adapter, grouped by family (uiRecordApis, uiListsApis, uiRelatedListApis, uiObjectInfoApis). Each adapter is a # `<name>` block; grep for the backticked name (e.g. # `getRecord`) to jump to its entry. Read this before wiring an adapter; do not paraphrase from memory.
Type catalog — references/wire-adapter-types.md holds every type the adapters return (Record, ObjectInfo, FieldValue, etc.), grouped by category and rendered with the same formatter the legacy MCP tool used. Grep for ## <TypeName> to jump to a specific entry.
Read the applicable reference before editing code.
refreshApex(wiredResult) or notifyRecordUpdateAvailable([{ recordId }]) after any mutation.@salesforce/schema — not string literals. This protects the component against metadata renames.lightning-record-form, lightning-record-edit-form, lightning-record-view-form) for single-record UIs. They ship with validation, SLDS styling, accessibility, and field-level security.Answer Yes / No to each. Any Yes triggers a refactor.
lightning-record-form, lightning-record-edit-form, or lightning-record-view-form would suffice?record.data.fields.Name.value without schema imports?@salesforce/schema import even though it interacts with Salesforce fields?getRecord, updateRecord, or a base record form could handle?List every data operation in the component:
@wire(getRecord, …), @wire(getRecords, …), @wire(someApexMethod, …)).updateRecord, createRecord, deleteRecord, Apex imperative).Walk sections §1–§4 in order. For each section, decide whether it applies to the component under review and record the result in the report. Use the shape below — every section must appear exactly once, either as an issue (violation) under ## LDS Best Practices, or as a compliant entry under ## Sections checked (no issue). Finish with a ## Summary line listing counts and a one-paragraph narrative.
Report shape:
## LDS Best Practices
- §<N> <section title> — <file>:<lines>
Issue: <what is wrong, specifically citing the pattern in the code>
Fix: <the corrective change, naming the exact import / API to use>
Applied: <yes | no>
## Sections checked (no issue)
- §<N> <section title> — <file>:<lines>
Status: Compliant (no action).
Evidence: <what in the code makes this section compliant — cite lines, imports, and the base component or schema token being used>
## Summary
- <X> issue(s) found; <Y> fixed; <Z> deferred.
- <one-paragraph narrative of the review — what the component does, why the flagged issues matter, and why the compliant sections are compliant.>
Rules for producing this report:
## Sections checked (no issue).## LDS Best Practices, only list actual violations. If there are no violations, write "No best-practice issues found." as the first line, then move every section to the compliant block.For every hard-coded API name:
import ACCOUNT_OBJECT from '@salesforce/schema/Account';
import NAME_FIELD from '@salesforce/schema/Account.Name';
import INDUSTRY_FIELD from '@salesforce/schema/Account.Industry';
Use these constants everywhere the object or field is referenced — wire configs, @wire field arrays, getFieldValue(record, NAME_FIELD) calls, and base-component object-api-name / fields attributes.
Full rules: references/lds-referential-integrity.md.
updateRecord, createRecord, deleteRecord), dispatch a refresh:
import { updateRecord, getRecord } from 'lightning/uiRecordApi';
import { refreshApex } from '@salesforce/apex';
async handleSave() {
await updateRecord({ fields: { Id: this.recordId, Name: this.name } });
await refreshApex(this.wiredRecord);
}
import { notifyRecordUpdateAvailable } from 'lightning/uiRecordApi';
await notifyRecordUpdateAvailable([{ recordId: this.recordId }]);
this.wiredRecord = result; return result.data;) so refreshApex can target them.Full rules: references/lds-data-consistency.md.
getRecord (with fields + schema imports).updateRecord or lightning-record-edit-form.createRecord or lightning-record-form with mode="edit".getRelatedListRecords.getPicklistValues.getObjectInfo / getObjectInfos.When in doubt about adapter shape, grep references/adapter-apis.md for the backticked adapter name (e.g. # `getRecord`) — it has the authoritative parameters, returns, and usage. For @salesforce/schema/<Object>.<Field> paths, confirm the exact API name in Setup → Object Manager → <Object> → Details → API Name. For unfamiliar return types, grep references/wire-adapter-types.md for the type name.
refreshApex called exactly once per mutation).experience-lwc-generate — when the review surfaces the need to regenerate rather than patch the component.design-systems-slds-apply — for SLDS class / design-token cleanup surfaced by the LDS review.Base-component first (preferred)
<template>
<lightning-record-form
record-id={recordId}
object-api-name="Account"
fields={fields}
mode="edit"
onsuccess={handleSuccess}>
</lightning-record-form>
</template>
import { LightningElement, api } from 'lwc';
import NAME_FIELD from '@salesforce/schema/Account.Name';
import INDUSTRY_FIELD from '@salesforce/schema/Account.Industry';
export default class AccountEditor extends LightningElement {
@api recordId;
fields = [NAME_FIELD, INDUSTRY_FIELD];
handleSuccess() {
this.dispatchEvent(new CustomEvent('saved'));
}
}
Imperative update with refresh
import { LightningElement, api, wire } from 'lwc';
import { getRecord, updateRecord } from 'lightning/uiRecordApi';
import { refreshApex } from '@salesforce/apex';
import ACCOUNT_NAME from '@salesforce/schema/Account.Name';
export default class RenameAccount extends LightningElement {
@api recordId;
wiredRecord;
@wire(getRecord, { recordId: '$recordId', fields: [ACCOUNT_NAME] })
wired(result) {
this.wiredRecord = result;
}
async handleRename(event) {
await updateRecord({ fields: { Id: this.recordId, Name: event.detail } });
await refreshApex(this.wiredRecord);
}
}
@salesforce/schema/ imports — they should cover every field/object the component references.'Account', 'Name') — none should appear in wire configs or field arrays.refreshApex, notifyRecordUpdateAvailable, or a base form handling it internally).What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
lightning-data-service, lwc, salesforce, cache-invalidation, ui-api
/sf-skills:experience-lds-best-practices-applyfrom sf-skills
sf-skills@sf-skills-plugin is listed by ccmalcom/sf-skills-plugin — review the source before installing
npx claudepluginhub ccmalcom/sf-skills-plugin --plugin sf-skills266 skills in this plugin
/afcc-setup-coordinateOrchestrates end-to-end headless setup of Agentforce Contact Center (AFCC) on a Salesforce org. Scans the org first, presents a delta plan for approval, then sequentially provisions demo users, Omni-Channel base settings, a human queue with routing config and members, presence statuses, permission sets, a PSTN voice number, and an active PstnVoice MessagingChannel wired to the queue. Interactive at key decision points — never assumes country, number type, queue names, or user counts. TRIGGER: set up AFCC, configure Agentforce Contact Center, stand up voice contact center, AFCC migration setup, provision AFCC org headlessly./agentforce-architecture-analyzeDeclared architecture snapshot for one Agentforce agent: planner, topics, actions, flows, Apex, prompt templates, and NGA plugins. Renders a human-readable architecture document and Mermaid invocation graph from design-time metadata (not runtime audit rows). TRIGGER when user asks to describe, diagram, inventory, audit, document, or diff (e.g. v3 vs v5) the architecture / action tree / topic structure / tool inventory of a specific agent by agent API name in a specific org. DO NOT TRIGGER for runtime session traces, conversation transcripts, generation timings, or gateway audit chains — this skill reads design-time metadata only (use agentforce-d360-analyze for session traces).3 plugins in 2 repositories ship this exact skill · first indexed Aug 23, 2026
Other plugins' skills for the same job