/experience-lwc:experience-lds-graphql-generatefrom Salesforce LWC
Generates schema-validated Salesforce LDS GraphQL queries and wires them into Lightning Web Components via lightning/uiGraphQLApi. Includes schema introspection and live-org validation.
Ships in Salesforce LWC. 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; scripts run unread.
Generate schema-validated Salesforce LDS GraphQL queries (read or mutation), either as standalone queries or wired into a Lightning Web Component via the lightning/graphql adapters. The skill encodes the schema-as-source-of-truth workflow end-to-end. Two bundled bash scripts handle the org-aware steps — scripts/fetch-lds-graphql-schema.sh for schema introspection and scripts/test-lds-graphql-query.sh for live-org validation.
Do NOT use this skill for:
experience-lds-best-practices-apply).experience-lds-data-requirements-generate.sf available in the shell for the schema fetch.uiapi (default: standard + custom objects) or setup (setup objects like permission sets, profiles).read (default) or mutation.standalone (raw GraphQL + variables) or LWC integration (full component wiring).These apply to every step — they are the rules this skill enforces:
schema.graphql introspection. Never use common Salesforce knowledge (e.g., do not assume Owner is a User — it may be polymorphic).The full normative workflow lives in references/generation-guide.md. Read it before starting. Read-query specifics are in references/generation-query.md; mutation specifics are in references/generation-mutation.md.
Collect and echo back:
Query type: [read | mutation]
Namespace: [uiapi | setup]
Output format: [standalone | LWC integration]
If any is unclear, ask once and wait.
usernameOrAlias. If a default is inferred from context, present it and wait for explicit confirmation.scripts/fetch-lds-graphql-schema.sh USERNAME_OR_ALIAS [OUTPUT_PATH] [API_VERSION] with the confirmed alias. The script writes the SDL to schema.graphql (or the path you pass) so the schema never enters the chat context. If a non-empty schema.graphql already exists at OUTPUT_PATH, the script exits early (set LDS_FETCH_FORCE=1 to re-fetch).The schema is 265,000+ lines. NEVER read the whole file — use targeted grep calls only.
^type <ObjectName> implements Record with -A 100.^input <ObjectName>_Filter with -A 50.^input <ObjectName>_OrderBy with -A 30.^input <ObjectName>(Create|Update)Input with -A 50.Search budget: max 4–5 grep calls per entity. Plan before executing.
^type <Name> implements Record matches.Identified entities:
- EntityName (Field1, Field2, ...)
Unknown entities:
- <textual name>
Step 3 status: SUCCESS | FAILED
Unknown entities is non-empty → status FAILED → ask for clarification → restart Step 3.Iteration limit: 3 cycles (primary entity → references → child relationships). Hard-stop after 3.
Per cycle:
Owner: User). Fields with the same name on different entities may have different types — check each entity independently. If a field resolves to multiple entity types, mark it polymorphic and plan to use inline fragments (... on TypeA, ... on TypeB).Contacts: ContactConnection). Add new entities to the unknown list.[PASS|FAIL] EntityName
- Standard fields: FieldName (type), ...
- Reference fields: FieldName → TargetType, ...
- Polymorphic fields: FieldName → [TypeA, TypeB], ...
- Child relationships: RelationshipName → ChildType, ...
- Unknown fields: FieldName, ...
Introspection cycles used: N/3
Step 4 status: SUCCESS | FAILED
[FAIL] → global FAILED → remediation → resume from cycle start.read)Author the read query per references/generation-query.md, feeding in the introspection data, entity list, field types, output format, and usernameOrAlias.
Apply the rules in references/generation-query.md — covers:
uiapi.query vs setup.query).eq, ne, in, nin, gt, gte, lt, lte, like, contains).first, after, last, before; edges.node, pageInfo).lightning/graphql, gql tagged template, refreshGraphQL for imperative refresh).If the tool returns an error, categorize it and ask the user how to proceed.
mutation)Author the mutation per references/generation-mutation.md — covers:
create, update, delete operation shape.<Entity>CreateInput, <Entity>UpdateInput) discovered via the input grep pattern.! annotation).Id only.record.errors[]).graphqlMutate from lightning/graphql.Run scripts/test-lds-graphql-query.sh USERNAME_OR_ALIAS 'QUERY' '<VARIABLES_JSON>' against the confirmed usernameOrAlias and present the response shape/sample to the user. Errors are categorized, not echoed verbatim.
scripts/fetch-lds-graphql-schema.sh — schema acquisition via a GraphQL introspection query against the org's /services/data/vX/graphql endpoint (LDS exposes no /graphql/sdl route); call once per org/session before query authoring.scripts/test-lds-graphql-query.sh — org-backed validation of the generated query against /services/data/vX/graphql.experience-lds-best-practices-apply — general LDS principles, cache semantics, and wire-vs-imperative choice.experience-lds-data-requirements-generate — pre-work that decides what to query before this skill decides how.experience-lwc-generate — host the generated wire adapter cleanly.Standalone read — minimal
query Accounts($limit: Int = 10) {
uiapi {
query {
Account(first: $limit) {
edges {
node {
Id
Name { value }
}
}
}
}
}
}
LWC integration — read with wire
import { LightningElement, wire } from 'lwc';
import { gql, graphql } from 'lightning/graphql';
export default class AccountList extends LightningElement {
@wire(graphql, {
query: gql`
query Accounts($limit: Int = 10) {
uiapi {
query {
Account(first: $limit) {
edges { node { Id Name { value } } }
}
}
}
}
`,
variables: '$variables'
})
accounts;
variables = { limit: 10 };
get records() {
return this.accounts?.data?.uiapi?.query?.Account?.edges ?? [];
}
}
Step 3 status: SUCCESS before Step 4; Step 4 status: SUCCESS before Steps 5/6.! in schema) is present.scripts/test-lds-graphql-query.sh returns without errors; or, on error, a categorized remediation is presented.LWC integration, the component imports from lightning/graphql, uses gql tagged template, and exposes data via a getter (not directly in HTML).What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
14 skills in this plugin
/experience-accessibility-validateUse this skill to determine whether a Lightning Web Component (LWC) is accessible and meets WCAG accessibility guidelines. TRIGGER when the user asks "is my component accessible?", "does my LWC meet accessibility guidelines?", "is this component WCAG compliant?", "find accessibility problems in this LWC", "is this LWC keyboard accessible?", "does this component work with a screen reader?", "does this component have sufficient color contrast?", "check ARIA usage in this LWC", or "WCAG 2.2 accessibility check". Also TRIGGER when the user wants to fix or improve accessibility (a11y, WCAG, ARIA) in an LWC's HTML, JS, or CSS — semantic markup, focus, keyboard nav, contrast, screen-reader labels, WCAG 2.2 SC. Produces `a11y-review.md` with WCAG-cited findings. DO NOT TRIGGER for general LWC generation (use `experience-lwc-generate`) or SLDS visual/design review not focused on accessibility (use `design-systems-slds-validate`)./experience-aura-lwc-migrateUse this skill to analyze a Salesforce Aura component bundle (.cmp, .app, .evt, .intf, Controller.js, Helper.js, Renderer.js) and produce a framework-agnostic migration blueprint (PRD.yaml / PRD.md / PRD.json) capturing public API, data requirements, slots, events, states, accessibility, styling, localization, and security posture. This is Phase 1 (analysis + PRD) only — it does NOT author or edit component code, wire adapters, or Jest tests, and does not write .html/.js/.css/.js-meta.xml. TRIGGER when the user says "analyze this Aura component", "migrate Aura", "convert .cmp", "produce a migration blueprint", "generate a PRD for this Aura component", or mentions aura:attribute, aura:handler, force:recordData, $Label, $Resource, component.get, cmp.find, or an input directory containing .cmp files. DO NOT TRIGGER when there is no Aura source (delegate downstream LWC authoring to experience-lwc-generate), for post-migration scoring, or for refactoring an existing modern component./experience-lds-best-practices-applyUse when reviewing or implementing Lightning Data Service best practices in an LWC (.js, .html, .js-meta.xml) — UIAPI vs Apex, refreshApex / notifyRecordUpdateAvailable, @salesforce/schema imports, LDS record-form data patterns. TRIGGER on "apply LDS best practices to this LWC", "review this LWC for LDS best-practice issues", "review this component for Lightning Data Service issues", "UIAPI or Apex for this data?", "fix stale data after record save", "sync LDS cache", "use @salesforce/schema for field names", "choose between getRecord and Apex". DO NOT TRIGGER when building a new LWC (use experience-lwc-generate), applying SLDS design tokens (use design-systems-slds-apply), picking or wiring a `lightning-*` base component's props/events/slots generically (use experience-lwc-base-components-integrate — this skill covers only the LDS data-layer rationale, even when the fix involves a base record form), or for security / RTL / accessibility reviews (separate passes)./experience-lds-data-requirements-generateUse when a Lightning Web Component data need is described in ambiguous natural language — turn "get contact info" or "show account data" into a clear, PRD-ready data-requirements spec. TRIGGER when the user says "define data requirements for this LWC", "turn this PRD data section into validated object/field names", "recommend GraphQL vs UIAPI for this data need", "validate these Salesforce API names", or "spec out the LDS adapter for this component", or references LWC bundle files (`.js`, `.js-meta.xml`) whose data layer is not yet specified. DO NOT TRIGGER when the data layer is already fully specified, when authoring the actual query or adapter code from a known spec, or when implementing an LWC end-to-end (use experience-lwc-generate)./experience-lwc-accessibility-jest-runUse ALWAYS when running Sa11y accessibility Jest tests for an LWC — locally before pushing, producing the command(s), running one file vs a suite, selecting tests by naming convention, saving Sa11y-rendered HTML, or reproducing a Sa11y/A11yBug failure. Covers core (Bazel; `bazel test //<module>:<target>`) and standalone `npx jest` (`.accessibility.test.js`, `@sa11y/jest`). REQUIRED for a `run-plan.md`, a failing a11y test's exit code, or `SA11Y_*`/`A11yBug`/core-Bazel test paths. DO NOT TRIGGER for functional Jest tests, a11y review without running tests (use experience-accessibility-validate), or Selenium-based a11y tests./experience-lwc-base-components-integratePick the right Lightning Base Component (`lightning-*`) for a given UI task, retrieve its full API (props, methods, events, slots) from the bundled per-component reference, and wire it into an LWC (LWC `.html`, `.js`, and `.css` files) without breaking SLDS. Use this skill when users say "I need a Lightning modal / datatable / combobox / record form", ask which `lightning-*` component fits a use case, want a shortlist of LBC candidates, are about to hand-roll a UI that a base component already provides, or are editing an LWC bundle's `.html` / `.js` / `.css` and need to select or wire a base component. Also triggers on "Lightning base component", "LBC", "lightning-combobox", "lightning-datatable", "use `lightning-` tag". DO NOT TRIGGER for applying SLDS design tokens, blueprints, or styling guidance in general — that is `design-systems-slds-apply`; this skill only selects and wires `lightning-*` base components.npx claudepluginhub forcedotcom/sf-skills --plugin experience-lwc3 plugins in 2 repositories ship this exact skill · first indexed Aug 23, 2026
Other plugins' skills for the same job