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 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; 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
/sf-skills:experience-lds-graphql-generatefrom 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-skills3 plugins in 2 repositories ship this exact skill · first indexed Aug 23, 2026
266 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).Other plugins' skills for the same job