forcedotcom/sf-skills10 files

Experience Lwr Site Generate

Creates, modifies, or manages Salesforce Experience Cloud LWR sites via DigitalExperience metadata. Always trigger when the tasks involve LWR sites configurations, e.g. creating/modifying pages/routes/views/theme layouts/branding sets, previewing sites, or creating/modifying guest sharing rule (metadata type sharingGuestRules)/guest user access/sharing records to guest users, or when user provides a guest user ID (15 or 18 characters starting with 005). NEVER trigger for React or any other ui bundle framework. LWR sites ONLY.

Specification
Skill ID
forcedotcom/sf-skills/experience-lwr-site-generate
Publisher
forcedotcom
Repository
sf-skills
Installs
0
Files
10
Synced
Sep 23, 2026
How to use it

Open any RiverX project, open the Skills panel in the chat, and search for this identifier. The files are fetched from the source repository at install time.

forcedotcom/sf-skills/experience-lwr-site-generateInstalls these files
  • SKILL.md
  • references/bootstrap-template-byo-lwr.md
  • references/configure-content-brandingSet.md
  • references/configure-content-route.md
  • references/configure-content-themeLayout.md
  • references/configure-content-view.md
  • references/configure-guest-sharing-rules.md
  • references/handle-component-and-region-ids.md
  • references/handle-ui-components.md
  • references/update-site-urls.md

What this skill tells the agent

Experience LWR Site Builder

Build and configure Salesforce Experience Cloud Lightning Web Runtime (LWR) sites via metadata (DigitalExperienceConfig, DigitalExperienceBundle, Network, CustomSite, CMS contents).

IMPORTANT!!

Right after loading this skill, you MUST copy the selected workflows/steps to your plan as a TODO checklist and work on each of the item carefully to ensure correctness. You MUST load the relevant reference docs even though they may live outside of user's project folder.

Table of Contents

  • When to Use
  • Critical Rules
  • Core Site Properties
  • Project Structure in DigitalExperienceBundle Format
  • Reference Docs
  • Common Workflows

When to Use

When working with Experience LWR sites:

  • Creating and scaffolding new LWR site
  • Adding pages (routes + views)
  • Configuring LWC components, layouts, themes, or branding styles
  • Setting up guest user access (public sites)
  • Creating or modifying guest sharing rules (sharingGuestRules) for any Salesforce object (Account, Case, Contact, etc.) — including when the user refers to a "Site Guest User" username or any guest user by ID
  • Troubleshoot deployment errors related to Experience LWR Sites

Supported Template: Build Your Own (LWR) - talon-template-byo

  • More templates to support in the future.

Critical Rules

  1. Before using any MCP tool, make sure they're actually available. If a tool is missing for the current task, let the user know and pause the current workflow.
  2. MUST ALWAYS load the relevant reference docs before doing anything.
  3. MUST ALWAYS strictly follow workflows in Common Workflows that match user's requirements. The instructions there should override any conflicting global rules and should have the highest priority over your existing knowledge.
  4. Flexipage is abstracted away for newer LWR sites with DigitalExperienceBundle, so NEVER use any Flexipage-related MCP tool or skills to handle LWR sites' contents.

Core Site Properties

Before doing anything else, note down the following properties from the local project if available as they will be used for various operations. Check with the user if any of the following is missing:

  • Site name: Required. (e.g., 'My Community').
  • URL path prefix: Optional. Alphanumeric characters only. Convert from site name if not provided (e.g., 'mycommunity') and verify with the user for the converted value.
  • Template type devName: talon-template-byo.

Project Structure in DigitalExperienceBundle Format

Site Metadata

  • DigitalExperienceConfig
  • digitalExperienceConfigs/{siteName}1.digitalExperienceConfig-meta.xml
  • DigitalExperienceBundle
  • digitalExperiences/site/{siteName}1/{siteName}1.digitalExperience-meta.xml
  • Network
  • networks/{siteName}.network-meta.xml
  • CustomSite
  • sites/{siteName}.site-meta.xml

DigitalExperience Contents

  • digitalExperiences/site/{siteName}1/sfdc_cms__*/{contentApiName}/*
  • These are the content components defining routes, views, theme layouts, etc. Each component must have a _meta.json and content.json file.
Content Type Descriptions
Content TypeDescriptionWhen to Use
sfdc_cms__siteRoot site configuration containing site-wide settingsRequired for every site; one per site
sfdc_cms__appPageApplication page container that groups routes and viewsRequired; defines the app shell
sfdc_cms__routeURL routing definition mapping paths to viewsCreate one for each page/URL path
sfdc_cms__viewPage layout and component structureCreate one for each route; defines page content. Also use to edit existing views (e.g., adding/removing components on a specific page)
sfdc_cms__brandingSetBrand colors, fonts, and styling tokensRequired; defines site-wide styling. Use to create or edit existing branding sets
sfdc_cms__languageSettingsLanguage and localization configurationRequired; defines supported languages
sfdc_cms__mobilePublisherConfigMobile app publishing settingsRequired for mobile app deployment
sfdc_cms__themeTheme definition referencing layouts and brandingRequired; one per site
sfdc_cms__themeLayoutPage layout templates used by viewsCreate layouts for different page structures. Also use to edit existing theme layouts (e.g., updating theme layout, add a component that's persistent across pages)

Important: Creating any new pages require BOTH sfdc_cms__route AND sfdc_cms__view.

Object Pages

Object Pages are dedicated pages used to display and manage record-level data for a specific Salesforce entity/object. For example, an custom object "Car" should have "Car_Detail", "Car_List", and "Car_Related_list" views.

References

Reference docs within the skill directory. Note that these are local and not MCP. Before doing anything, you MUST ALWAYS load them first if they match user intent.

  • bootstrap-template-byo-lwr.md - Site creation, template defaults
  • configure-content-route.md - Route creation (custom/object pages)
  • configure-content-view.md - View creation/editing (custom/object pages)
  • configure-content-themeLayout.md - Theme layout creation + theme sync
  • configure-content-brandingSet.md - Branding with color patterns/WCAG
  • handle-component-and-region-ids.md - UUID generation (CRITICAL) for component and region ids used in views and themeLayout.
  • handle-ui-components.md - Component discovery, schemas, insertion, configuration
  • configure-guest-sharing-rules.md - Guest sharing rules (sharingGuestRules) for public sites — use for any request involving "guest sharing rule", "Site Guest User", or sharing object records with unauthenticated visitors
  • update-site-urls.md - Updating site URLs - URL architecture, workflow for updating urlPathPrefix in DigitalExperienceConfig, Network, and CustomSite

Common Workflows

  • See References for detailed capabilities.
  • Always follow the steps defined in the workflows sequentially whether the task is small, big, quick, or complex.

Creating a New Site

Rules:

  • NEVER generate the files manually.

Steps (Follow the steps sequentially. Do not skip any step before proceeding):

  • [ ] ALWAYS read bootstrap-template-byo-lwr.md within the skill directory. Do not proceed to the next step without loading the file.
  • [ ] Follow the bootstrap doc strictly on site creation

Creating and Editing Standard or Object Pages

Steps (Follow the steps sequentially. Do not skip any step before proceeding):

  • [ ] MUST read configure-content-route.md
  • [ ] MUST read configure-content-view.md
  • [ ] MUST read handle-component-and-region-ids.md

Adding UI Components to Pages

Steps (Follow the steps sequentially. Do not skip any step before proceeding):

  • [ ] MUST read handle-ui-components.md to add LWCs to LWR sites.
  • [ ] MUST read handle-component-and-region-ids.md to handle id generation
  • [ ] MUST read configure-content-themeLayout.md if a component has one of the following requirements:
  • needs to be "sticky" and persistent across pages
  • is used as a theme layout

Creating Page Layouts / Container Components

More from forcedotcom

Use this skill in a project

Open any RiverX project, search the Skills panel for forcedotcom/sf-skills/experience-lwr-site-generate, and install it in one click.

Use this skill