Agent skill · forcedotcom

experience-ui-bundle-salesforce-data-access

MUST activate whenever a uiBundles/*/src/ project reads, writes, or displays Salesforce data — INCLUDING building a page, list, table, card grid, dashboard, or form that shows, filters, counts, or edits records of any object (e.g. Property__c, Account, Case), even when the prompt names only the UI or the object and never says query, GraphQL, or SDK. Records behind such a component come from Salesforce, so use this ALONGSIDE experience-ui-bundle-frontend-generate: that skill styles the component, this one wires its data. Also triggers on @salesforce/platform-sdk imports, sdk.graphql.query / mutate / sdk.fetch calls, *.graphql files, or stale data needing force-refresh. New read/write work uses the current @salesforce/platform-sdk API; migrate only EXISTING old @salesforce/sdk-data callable code. Not for pure styling/layout with no records, app shell, file upload, or auth/search scaffolding. DO NOT TRIGGER for OAuth, object/field schema changes, Bulk/Tooling/Metadata API, or declarative automation.

What it needs

About 10k tokens when loaded.

What this skill does

Salesforce Data Access (UI bundles) All Salesforce data access in a UI bundle goes through the @salesforce/platform-sdk data SDK. The SDK handles auth, CSRF, and base-URL resolution, and — on the WebApp surface — caches every GraphQL query by default. This file is the workflow + guardrail spine. Depth lives in linked docs: references/graphiti-cli.md — the graphiti CLI (sf-gql- commands) that compiles a small JSON spec into a schema-correct, guardrail-applied query + variables + types. The preferred way to author the GraphQL in steps below; falls back to the schema-grep script when unavailable. references/sdk-api.md — query/mutate call surface + generated-type placement; the behavior nuance (surfaces, error stances, QueryResult) grounds on tier-2b. references/caching.md — the on-by-default cache + two refresh modes; behavior grounds on tier-2b docs/data/ when installed, with the full version-stamped fallback here. references/graphql-hand-authoring.md — schema lookup, read / mutation templates, every platform guardrail (@optional, pagination, limits, semi-join, wrappers, error table…). references/rest-and-integration.md — sdk.fetch, the supported-API allowlist, and the reactive/lifecycle integration patterns. references/migration.md — old @salesforce/sdk-data callable code → new namespace. The only place the dead API appears as usable code. The one-paragraph mental model const sdk = await createDataSDK(). Then sdk.graphql is a namespace, not a function: sdk.graphql!.query({...}) for reads, sdk.graphql!.mutate({...}) for writes. On WebApp, every query() is cached by default (300s). HTTP 200 never means success — always check result.errors. Verify every entity and field against the schema before you query it: one unverified field fails the whole query at runtime, and schema.graphql is too large to eyeball — look it up. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills forcedotcom/experience-ui-bundle-salesforce-data-access--8e0fc0

View the source on GitHub

Browse the @skills marketplace