npx skills add ...
npx skills add forcedotcom/sf-skills --skill experience-lds-data-requirements-generate
Use when a Lightning Web Component data need is described in ambiguous natural language — turn \"get contact info\" or \"show account data\" into a clear, PRD-ready data-requirements spec. TRIGGER when the user says \"define data requirements for this LWC\", \"turn this PRD data section into validated object/field names\", \"recommend GraphQL vs UIAPI for this data need\", \"validate these Salesforce API names\", or \"spec out the LDS adapter for this component\", or references LWC bundle files (`.js`, `.js-meta.xml`) whose data layer is not yet specified. DO NOT TRIGGER when the data layer is already fully specified, when authoring the actual query or adapter code from a known spec, or when implementing an LWC end-to-end (use experience-lwc-generate).
npx skills add forcedotcom/sf-skills --skill experience-lds-data-requirements-generate
Run a three-stage analyst workflow — requirements clarification, API name validation, API recommendation — so a downstream developer can implement a Lightning Data Service (LDS) solution without guessing.
@wire/Apex code for a new data need, or before handing the recommendation to a downstream implementation workflow.// TODO: fetch related records and need to turn them into precise specs.Do NOT use this skill when:
Run the three steps strictly in order. Do not skip a step unless the caller has already confirmed its output.
Goal: extract everything you know and surface every uncertainty before moving on.
Open every conversation with:
"I've analyzed your data requirement: ''. Here's what I understand and what I need clarification on…"
Apply the four actions from references/requirements-analysis.md:
<Term>__c? What's the exact API name?"), or unknown (ask for the API name from Object Manager).phone, address, name, status) to specific API names. If multiple candidates exist, enumerate them and ask.End-of-step gate. Consolidate into:
Proceed only when every question is answered with ≥90% confidence.
Goal: 100% accuracy on every object and field API name before code is written.
Apply the validation framework from references/api-name-validation.md:
Account, Contact, Lead, Opportunity, Case, User, Task, Event, Product2, Pricebook2, Order, OrderItem, Asset, Contract, Campaign pass immediately. Anything else triggers verification.__c suffixes. Ask: "Is this <Term>__c or a different custom object API name?" Point users to Setup → Object Manager → → Details → API Name.
__c suffix confirmation; case-sensitive.Confirmation template:
If any uncertainty remains, stop. Emit the outstanding verification requests and the Setup navigation instructions. Do not advance to Step 3 or generate code.
Skip this step only when the caller has explicitly stated that API names are already validated upstream, or the requirement does not involve records at all. Record the skip reason in the Step 4 output.
Goal: pick the right data access API using the decision framework in references/api-recommendation.md.
Priority order (non-negotiable):
lightning/graphql) — top choice for reads it can serve.Walk the six decision sub-steps:
Recommendation rules:
getRecordCreateDefaults + createRecord, list views.Present with the "Show Your Work" template — explicitly explain why not GraphQL / why not UI API / why not Apex.
Hand-off:
lightning/graphql wire adapter is the caller's next step.getRecord, getRelatedListRecords, createRecord, updateRecord, getRecordCreateDefaults, etc.) and any layout/picklist prerequisites.Produce a single block the caller can paste into a PRD or component file header:
| Vague ask | Clarifying question |
|---|---|
| "get contact info" | "Which Contact fields specifically? (Email, Phone, MailingAddress, Department, …)" |
| "show account data" | "Which Account fields do you need? And are we showing one record or a list?" |
| "custom gym records" | "Is this a custom object Gym__c? What specific fields are you looking for?" |
| "update the record" | "Which object? Which fields? Which record (ID at runtime)?" |
| "all customer information" | "Account or Contact? Which fields? Single record or query?" |
lightning/graphql, getRecord, createRecord, etc.) or the project's Apex workflow of record.experience-lwc-generate when wiring @wire adapters into a component.lightning/graphql wire adapter using the schema pulled from the target org.getRecord, createRecord, etc.).