generating-flexipage

Generate and validate Salesforce Lightning FlexiPage XML using CLI templates.

1|Updated May 7, 2026
One-click install
npx skills add https://github.com/amanpraaj/sf-skill-hub --skill generating-flexipage-amanpraaj
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: generating-flexipage
Source: https://github.com/amanpraaj/sf-skill-hub/tree/main/skills/salesforce/generating-flexipage
Command: npx skills add https://github.com/amanpraaj/sf-skill-hub --skill generating-flexipage-amanpraaj

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Creating Salesforce Lightning pages (FlexiPages) by hand produces invalid XML, duplicate identifiers, and deployment failures. This Skill enforces a CLI-first workflow that generates valid FlexiPage metadata and prevents the most common deployment errors. ## Core Features & Use Cases - CLI-Bootstrapped Page Generation: Creates RecordPage, AppPage, and HomePage FlexiPages using the sf template generate flexipage command with proper regions, fields, and structure. - XML Validation Rules: Enforces critical rules for property encoding, Record.{Field} references, unique identifiers, and Region vs Facet typing to prevent deployment errors. - Deployment Error Troubleshooting: Maps common FlexiPage deployment errors (invalid field references, duplicate names, unencoded XML) 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 Salesforce RecordPage for the Account object with Name as the primary field and Phone, Industry, and AnnualRevenue as secondary fields.

Frequently Asked Questions about generating-flexipage

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, ready for dry-run deployment validation.

How to fix invalid field reference errors in FlexiPage deployment?▼

Invalid field reference errors occur when fields use ObjectName.Field format instead of Record.Field format. Change all fieldItem values to the Record.{FieldApiName} pattern, such as Record.Name instead of Account.Name.

Why does FlexiPage deployment fail with duplicate name errors?▼

Deployment fails 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 and region name is unique across the file.

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

Yes, editing existing FlexiPages is supported by inserting componentInstance blocks into existing regions. Check whether the target facet name already exists, reuse it with additional itemInstances if so, and follow encoding and unique identifier rules.

What Salesforce CLI plugin is needed for FlexiPage generation?▼

The templates plugin is required for the `sf template generate flexipage` command. Install it with `sf plugins install templates` if the command fails, then retry page generation before proceeding with deployment.