Skip to content

forcedotcom/sf-skills / plugins/builder/experience-lwc/skills/experience-lds-data-requirements-generate

experience-lds-data-requirements-generate

Verified

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).

references/api-name-validation.md

View on GitHub
# API Name Validation for Salesforce Objects and Fields

Validate every Salesforce API name reference in the LWC source before producing LDS code. For each reference, produce a `VERIFIED`, `UNVERIFIED`, or `AMBIGUOUS` entry per the output contract below.

## References that require validation

- **Unconfirmed object API names**: references to objects that may be custom or incorrectly named.
- **Ambiguous field references**: generic field names that map to multiple API names (e.g., "phone" → `Phone` vs `MobilePhone` vs `HomePhone`).
- **Suspected custom objects**: industry-specific terms or non-standard object references that likely end in `__c`.
- **Suspected custom fields**: field references that don't match standard Salesforce patterns.
- **Case-sensitivity issues**: API names that may have incorrect capitalization.
- **Missing `__c` suffixes**: custom objects/fields missing the required suffix.

## References that auto-validate

- Confirmed standard Salesforce objects (`Account`, `Contact`, `Lead`, `Opportunity`, `Case`, etc.) with exact casing.
- Confirmed standard fields with correct API names per the precision mapping below.
- Non-Salesforce data references.

## Validation Framework (Precision Mode)

**High-confidence object validation**

Standard Salesforce objects proceed with immediate validation confidence: `Account`, `Contact`, `Lead`, `Opportunity`, `Case`, `User`, `Task`, `Event`, `Product2`, `Pricebook2`, `Order`, `OrderItem`, `Asset`, `Contract`, `Campaign`.

Any deviation from exact standard naming triggers verification.

**Custom object detection and verification**

- Industry-specific terminology (e.g., `Gym`, `Property`, `Course`, `Equipment`) indicates potential custom objects.
- Non-standard object references require explicit API name confirmation.
- Objects with a `__c` suffix need org-specific verification of exact naming.
- Never assume custom object API names — always require explicit confirmation.

**Standard field precision mapping**

- `Account`: `Name`, `Phone`, `Website`, `BillingAddress`, `ShippingAddress`, `Industry`, `Type`, `Description`.
- `Contact`: `FirstName`, `LastName`, `Name`, `Email`, `Phone`, `MobilePhone`, `MailingAddress`, `Department`, `Title`.
- `Opportunity`: `Name`, `StageName`, `CloseDate`, `Amount`, `Probability`, `AccountId`, `Type`.
- `Case`: `Subject`, `Status`, `Priority`, `Origin`, `Description`, `ContactId`, `AccountId`.

**Field ambiguity resolution patterns**

- Generic "phone" → require confirmation: `Phone`, `MobilePhone`, `HomePhone`, `OtherPhone`, or `WorkPhone`.
- Generic "address" → require confirmation: `BillingAddress`, `ShippingAddress`, `MailingAddress`, or `OtherAddress`.
- Generic "name" → require confirmation: `Name` (full), `FirstName`, `LastName`, or `CompanyName` depending on object.
- Generic "status" → require confirmation: `Status`, `StageName`, or custom status field API name.

**Custom field identification criteria**

- Field names not matching standard Salesforce patterns for the object type.
- Technical or business-specific jargon.
- Fields missing the required `__c` suffix.
- Case-sensitivity violations in API name references.

## Output contract

For each API name reference in the source, produce one entry with these fields:

- **`reference`** — the object or field name as written in the source (e.g. `Account.Phone`, `Gym__c.Capacity__c`).
- **`status`** — exactly one of `VERIFIED`, `UNVERIFIED`, `AMBIGUOUS`.
- **`source`** — for `VERIFIED`, the source of truth consulted (e.g. "standard object — SObject describe", "FieldDefinition row for `Gym__c.Capacity__c`"). For `UNVERIFIED` or `AMBIGUOUS`, the missing input needed (e.g. "no SObject describe for `Gym__c` in target org", "ambiguous — caller must select between `Phone` and `MobilePhone`").
- **`resolution`** — the corrected API name with `__c` suffix, exact capitalization, and disambiguation applied. For `UNVERIFIED`, prefix with `UNVERIFIED:` followed by the best-guess name (e.g. `UNVERIFIED: Gym__c.Capacity__c`).

Do not emit TODO comments in the LWC code or PRD — the validation entry above is the production output. If every reference is `VERIFIED`, produce an empty list.
brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).Stars: 322kUpdated Claude CodeCodexVerifiedInstall
brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).Stars: 198kUpdated Claude CodeCodexVerifiedInstall