platform-flexipage-generate

Generate and validate Salesforce Lightning FlexiPage XML using CLI templates.

Updated Jul 2, 2026
One-click install
npx skills add https://github.com/padjei/SF_Build --skill platform-flexipage-generate-padjei
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: platform-flexipage-generate
Source: https://github.com/padjei/SF_Build/tree/main/.claude/skills/platform-flexipage-generate
Command: npx skills add https://github.com/padjei/SF_Build --skill platform-flexipage-generate-padjei

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Creating Salesforce Lightning pages (FlexiPages) by hand produces XML that frequently fails deployment due to duplicate identifiers, unencoded property values, invalid field references, and incorrect region or facet structures. This Skill enforces a CLI-first workflow and a strict validation checklist so generated pages deploy successfully. ## Core Features & Use Cases - CLI-Bootstrapped Page Generation: Creates RecordPage, AppPage, and HomePage FlexiPages using the sf template generate flexipage command with proper field parameters. - XML Structure Rules: Enforces unique identifiers and region names, correct Record.{Field} references, proper Region vs Facet typing, and HTML/XML encoding of property values. - Deployment Error Troubleshooting: Maps common FlexiPage deployment errors (invalid field references, duplicated fieldInstances, unused facets) to concrete fixes. - Use Case: A developer needs a custom Account record page with a highlights panel and detail fields. The Skill bootstraps the page via CLI with primary, secondary, and detail fields, then validates it with a dry-run deployment. ## Quick Start Ask the AI to create a new Account record page FlexiPage with Name as the primary field and Phone, Industry, and AnnualRevenue as secondary fields, then validate it with a dry-run deployment.

Frequently Asked Questions about platform-flexipage-generate

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a Salesforce Lightning record page with the CLI?▼

Run `sf template generate flexipage` with the RecordPage template, specifying --sobject, --primary-field, --secondary-fields, and --detail-fields. The CLI generates valid FlexiPage XML with proper regions and field references that you can deploy directly.

How to fix FlexiPage deployment errors in Salesforce?▼

Common fixes include changing field references to the Record.{Field} format, wrapping each fieldInstance in its own itemInstances block, adding uiBehavior fieldInstanceProperties, and encoding HTML characters in property values. Duplicate region names or identifiers also cause failures.

Why does my FlexiPage fail with duplicate name errors?▼

The error occurs when two flexiPageRegions blocks share the same name or when identifiers are reused. Combine components belonging to the same facet into one region with multiple itemInstances, and ensure every identifier is unique across the file.

Can I add components to an existing FlexiPage XML file?▼

Yes, but first read the entire file and extract all existing identifiers and region names to avoid duplicates. Insert new component instances at the end of the target region, and reuse existing facet names when components belong to the same section.

What field reference format does FlexiPage XML require?▼

FlexiPage field references must use the Record.{FieldApiName} format, such as Record.Name or Record.Custom_Field__c. Using the ObjectName.Field format like Account.Name causes an invalid field reference deployment error.