/sf-experience:experience-lds-graphql-generatefrom Salesforce — Experience, LWC & Mobile
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 — Experience, LWC & Mobile. 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
npx claudepluginhub reej-consulting/reej-sf-skills --plugin sf-experience48 skills in this plugin
/commerce-b2b-open-code-components-integrateIntegrate Salesforce B2B Commerce open source components from GitHub into B2B Commerce stores. Use when users mention "integrate open code components", "open source B2B commerce", "add open code components", "forcedotcom/b2b-commerce-open-source-components", or want to add open source commerce components to their store. Copies all components and labels so they become available in Experience Builder./commerce-b2b-open-code-components-replaceReplace OOTB (out-of-the-box) B2B Commerce components with open source equivalents in site metadata content.json files, or look up the equivalent open code `site:` component for OOTB definitions. Use when users mention "replace OOTB components", "replace commerce components with open code", "swap OOTB for open source", "replace commerce_builder:", "replace OOTB in site", "replace component in site metadata", "replace component definition", "find open code equivalent", "equivalent open code component", "OOTB to open code mapping", "what is the site component for", components "in this view" or "for a given view", or a specific list of component names — and want to update or only discover mappings in their store metadata.3 plugins in 2 repositories ship this exact skill · first indexed Aug 23, 2026
Other plugins' skills for the same job