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…
от forcedotcom★ 1 200 звёзд на GitHubОб этом скилле
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
graphitiCLI (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/mutatecall 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-datacallable 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.
import { createDataSDK, gql } from "@salesforce/platform-sdk"; // gql tags the query string so codegen + eslint validate it
const sdk = await createDataSDK();
const result = await sdk.graphql!.query({ query: GET_ACCOUNTS, variables });
if (result.errors?.length) throw new Error(result.errors.map((e) => e.message).join("; "));
const rows = result.data?.uiapi?.query?.Account?.edges?.map((e) => e.node) ?? []; // unwrap edges/node; read field values via .value
Typed call params (query<GetAccountsQuery, GetAccountsQueryVariables>), the CacheControl
type, and NodeOfConnection<T> (extracts a node type from a Connection for clean typing) all
live in references/sdk-api.md.
This changed (breaking — PR #502). The previous callable
sdk.graphql(...)form and the previous package name are dead — the code above is the only correct form. If you encounter the old API in existing code (or a staledist/artifact), don't copy it; convert it per Working on existing code.
sdk.graphql!is WebApp-only. The non-null assertion above is correct only if the bundle runs solely on WebApp. On other surfaces it can crash — decide before you write it. See Surfaces —!vs guard below.
Ground the SDK contract on the installed types (tier-2a)
@salesforce/platform-sdk force-publishes on a shared version line and moves
fast. This SKILL's prose is a point-in-time snapshot of the call contract; the
installed declarations are authoritative for the version you actually have.
Before writing any query/mutate, read the installed types and let them win:
node_modules/@salesforce/platform-sdk/dist/core/data.d.ts—query/mutatesignatures,QueryResult(hassubscribe/refresh) vsMutationResult(has neither, by design), theCacheControlunion, the default TTL.node_modules/@salesforce/platform-sdk/dist/data/index.d.ts—createDataSDK,gql,NodeOfConnection.
Precedence — installed .d.ts beats this SKILL's prose. If a signature,
type, or default here disagrees with the installed declaration, follow the
declaration and note the drift; do not "correct" the types to match the prose.
Grounding ladder (one model, two axes):
| Tier | Grounds | Answers | Via |
|---|---|---|---|
| tier-1 | GraphQL schema | what data exists | graphiti / graphql-search.sh (Precondition #2) |
| tier-2a | SDK contract | how you call it | the installed .d.ts above |
| tier-2b | SDK behavior | how it behaves | the installed docs/data/ folder (below) |
| spine | this SKILL.md | workflow + guardrails that orchestrate all three; the fallback when a tier can't ground |
*Fallback when the .d.ts is absent
Установить experience-ui-bundle-salesforce-data-access в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл 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.
Как установить скилл experience-ui-bundle-salesforce-data-access?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл experience-ui-bundle-salesforce-data-access запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic