Agent skill · forcedotcom
experience-lds-graphql-generate
Use ALWAYS when a prompt mentions GraphQL, lightning/uiGraphQLApi, @wire(graphql, ...), or gql template tags in an LWC context — even if the surface ask is \"build an LWC\". Owns the ENTIRE flow: introspect the org's LDS GraphQL schema, identify entities/fields, construct the schema-validated gql query or mutation, wire it into the LWC via lightning/uiGraphQLApi, verify against a connected org. REQUIRED whenever a prompt asks to render, list, or edit Salesforce records (Account, Contact, Case, custom objects) via GraphQL — the .html and .js scaffolding IS in scope. DO NOT delegate to experience-lwc-generate: that skill has NO GraphQL schema introspection, NO create_lds_graphql_read_query binding, and defaults to getRecord/getRelatedListRecords wire adapters which will not satisfy a GraphQL prompt. DO NOT TRIGGER only if the prompt forbids GraphQL, chooses UIAPI/Apex (use experience-lds-best-practices-apply), or asks for data requirements (use experience-lds-data-requirements-generate).
What it needs
About 6k tokens when loaded.
What this skill does
<!-- adk-managed-skill --> Building LDS GraphQL 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. When to Use User wants to create, modify, or integrate a Salesforce GraphQL query (standard objects, custom objects, or setup objects). Building or updating an LWC that consumes/mutates LDS data through GraphQL. Introspecting an org's schema before writing a query. Validating a generated query end-to-end against a connected org. Do NOT use this skill for: REST-based UI API (use LDS wire adapters; see experience-lds-best-practices-apply). Apex callouts or custom GraphQL endpoints — this skill is LDS-scoped. Data-requirements discovery — that's experience-lds-data-requirements-generate. Prerequisites A connected Salesforce org (username or alias). User must confirm it before schema fetch — never assume. Salesforce CLI / sf available in the shell for the schema fetch. Decision on: Namespace — uiapi (default: standard + custom objects) or setup (setup objects like permission sets, profiles). Query type — read (default) or mutation. Output format — standalone (raw GraphQL + variables) or LWC integration (full component wiring). Core Rules These apply to every step — they are the rules this skill enforces: 1. Sequential execution — Steps 1→6 run in order. Every step is mandatory unless its triggering conditions are not met. 2. Hard stop on failure — A failed step blocks subsequent steps until remediation is complete. 3. Schema is the single source of truth — Every entity name, field name, field type, and relationship must come from schema.graphql introspection. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills forcedotcom/experience-lds-graphql-generate--4796b3