forcedotcom/sf-skills / plugins/builder/salesforce-development/skills/platform-flexipage-generate
platform-flexipage-generate
VerifiedUse when users create, generate, modify, or validate Salesforce Lightning pages (FlexiPages). Trigger on RecordPage, AppPage, HomePage, Lightning pages, adding components to a page, page customization (e.g. 'customize the record page'), or .flexipage-meta.xml files (regions, components, deployment errors). DO NOT TRIGGER for Visualforce pages, page layout assignments in the UI, UI Bundle/Experience Cloud site pages, or Aura/Lightning Web Component development without FlexiPage context.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 20.1 KB |
| references/cli_commands.md | markdown | 769 B |
| references/flexipage_fieldSection.md | markdown | 5.8 KB |
| references/flexipage_richText.md | markdown | 3.2 KB |
| references/identifiers_and_regions.md | markdown | 6.0 KB |
| references/mcp_action_examples.md | markdown | 3.8 KB |
| references/record_flexipage_dynamicHighlights.md | markdown | 4.7 KB |
| references/xml_rules.md | markdown | 13.7 KB |
| scripts/resolve-component-instructions.shexecutable | script | 1.2 KB |
| scripts/scan-lwc-components.shexecutable | script | 2.9 KB |
references/identifiers_and_regions.md
View on GitHub# Identifiers, Regions, and Container Facets
## Generating Unique Identifiers
**Before generating ANY new identifier or facet name, read the existing XML and extract all `<identifier>` and `<name>` values first.**
**Identifier Generation Algorithm**:
```text
1. Extract ALL existing <identifier> AND <name> values from XML
2. Generate base name: {namespace}_{componentType}_{context}
Examples: "lst_relatedList_contacts", "flexipage_richText_header"
3. Find first available number:
- Try "{base}_1"
- If exists, try "{base}_2", "{base}_3", etc.
- Use first available
```
**Examples**:
- First related list: `lst_relatedList_contacts`
- Second related list: `lst_relatedList_contacts_2`
- First rich text: `flexipage_richText_header`
- Second rich text: `flexipage_richText_header_2`
- Field section: `flexipage_fieldSection`
**Facet Naming - Two Patterns**:
1. **Named facets** (for major content areas):
- `detailTabContent` (detail tab content)
- `maintabs` (main tab container)
- `sidebartabs` (sidebar tab container)
- Use when facet represents meaningful content area
2. **UUID facets** (for internal structure):
- Format: `Facet-{8hex}-{4hex}-{4hex}-{4hex}-{12hex}`
- Example: `Facet-66d5a4b3-bf14-4665-ba75-1ceaa71b2cde`
- Use for field section columns, nested containers, anonymous slots
**When adding components to existing files:**
- Check if target facet name already exists
- If exists: Add new `<itemInstances>` to that existing region (see xml_rules.md section 5 for details)
- If doesn't exist: Create new region with unique name
---
## Region Selection
**Parse regions from file** - don't hardcode names. Templates vary:
- `flexipage:recordHomeTemplateDesktop` → `header`, `main`, `sidebar`
- `runtime_service_fieldservice:...` → `header`, `main`, `footer`
- Others may have different region names
**Default placement**: End of target region (after last `<itemInstances>`)
**Insertion pattern**:
```xml
<flexiPageRegions>
<name>main</name> <!-- or whatever region name exists -->
<type>Region</type>
<itemInstances><!-- Existing component 1 --></itemInstances>
<itemInstances><!-- Existing component 2 --></itemInstances>
<itemInstances>
<!-- INSERT NEW COMPONENT HERE -->
</itemInstances>
</flexiPageRegions>
```
---
## Container Components with Facets
Components like tabs, accordions, and field sections require a **3-layer facet pattern**. There is NO single "tabs" component — you must use `flexipage:tabset` + `flexipage:tab` + content facets.
**The 3-layer tab pattern:**
```xml
<!-- LAYER 1: Content facets — one per tab's body -->
<flexiPageRegions>
<itemInstances>
<componentInstance>
<componentName>force:detailPanel</componentName>
<identifier>force_detailPanel1</identifier>
</componentInstance>
</itemInstances>
<name>detailTabContent</name>
<type>Facet</type>
</flexiPageRegions>
<flexiPageRegions>
<itemInstances>
<componentInstance>
<componentInstanceProperties>
<name>relatedListComponentOverride</name>
<value>NONE</value>
</componentInstanceProperties>
<componentName>force:relatedListContainer</componentName>
<identifier>force_relatedListContainer1</identifier>
</componentInstance>
</itemInstances>
<name>relatedTabContent</name>
<type>Facet</type>
</flexiPageRegions>
<!-- LAYER 2: Tab definitions facet — each flexipage:tab points to a content facet via "body" -->
<flexiPageRegions>
<itemInstances>
<componentInstance>
<componentInstanceProperties>
<name>active</name>
<value>true</value>
</componentInstanceProperties>
<componentInstanceProperties>
<name>body</name>
<value>detailTabContent</value>
</componentInstanceProperties>
<componentInstanceProperties>
<name>title</name>
<value>Standard.Tab.detail</value>
</componentInstanceProperties>
<componentName>flexipage:tab</componentName>
<identifier>flexipage_tab1</identifier>
</componentInstance>
</itemInstances>
<itemInstances>
<componentInstance>
<componentInstanceProperties>
<name>active</name>
<value>false</value>
</componentInstanceProperties>
<componentInstanceProperties>
<name>body</name>
<value>relatedTabContent</value>
</componentInstanceProperties>
<componentInstanceProperties>
<name>title</name>
<value>Standard.Tab.relatedLists</value>
</componentInstanceProperties>
<componentName>flexipage:tab</componentName>
<identifier>flexipage_tab2</identifier>
</componentInstance>
</itemInstances>
<name>maintabs</name>
<type>Facet</type>
</flexiPageRegions>
<!-- LAYER 3: Tabset in the template region — references the tabs facet -->
<flexiPageRegions>
<itemInstances>
<componentInstance>
<componentInstanceProperties>
<name>tabs</name>
<value>maintabs</value>
</componentInstanceProperties>
<componentName>flexipage:tabset</componentName>
<identifier>flexipage_tabset1</identifier>
</componentInstance>
</itemInstances>
<name>main</name>
<type>Region</type>
</flexiPageRegions>
```
**Critical rules:**
- Facet regions are **siblings** of template regions (same level), NEVER nested inside them
- Each `flexipage:tab` has `body` pointing to a content facet name, `title` for the label, and `active` (true/false)
- The `flexipage:tabset` has a single `tabs` property pointing to the tabs facet name
- Standard tab titles: `Standard.Tab.detail`, `Standard.Tab.relatedLists`, `Standard.Tab.activity`, `Standard.Tab.news`
- The component is `flexipage:tabset` — NOT `flexipage:tabs`, `flexipage:tabset2`, or `lightning:tabset`
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deployment | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |