
Digital Experience Site Generator
OfficialFreeEffortlessly create Salesforce Digital Experience Sites for React apps.
Free · Opens the source repo
What Digital Experience Site Generator does
The Digital Experience Site Generator skill simplifies the process of creating and configuring Salesforce Digital Experience Sites specifically for hosting React UI bundles. By generating the essential site infrastructure, including Network, CustomSite, DigitalExperienceConfig, and DigitalExperienceBundle, this skill ensures that your React application can be served seamlessly from Salesforce. It is particularly useful for developers who need to set up a site quickly without delving into the complexities of standard Lightning Web Runtime (LWR) sites, which require additional elements such as routes and branding sets.
This skill operates by resolving five required properties: siteName, siteUrlPathPrefix, appNamespace, appDevName, and enableGuestAccess. Each property has a fallback mechanism to ensure that valid values are derived from the user input or existing project data. This attention to detail is crucial, as incorrect values can lead to deployment issues, such as blank pages when accessing the site. The skill guides users through a structured workflow that includes creating the necessary project directories and populating metadata fields with accurate information.
For those looking to update existing site URLs, the skill also provides a straightforward method to change or modify site URLs, ensuring that developers can maintain their applications with ease. The built-in verification checklist further enhances reliability by ensuring that all required properties are resolved and that the generated metadata adheres to Salesforce's standards before deployment.
Overall, this skill is designed for Salesforce developers and teams who are focused on deploying React applications efficiently while minimizing the manual configuration typically associated with setting up Digital Experience Sites.
When to use it
Use this skill when you need to create or configure a Digital Experience Site for hosting a React UI bundle on Salesforce.
When not to use it
This skill is not suitable for standard LWR sites that require more complex configurations, such as routes and branding.
What you can build with it
Creating a New Site
Use this skill to quickly set up a new Salesforce Digital Experience Site for your React application, ensuring all necessary metadata is generated.
Configuring Guest Access
Easily configure guest access for your Digital Experience Site by using the skill's property resolution features.
Updating Site URLs
Leverage the skill's built-in workflow to modify existing site URLs without the need for extensive manual changes.
How to install Digital Experience Site Generator
View source1. Install with the skills CLI
npx skills add forcedotcom/sf-skills/experience-ui-bundle-site-generate --agent claude-code2. Or install it manually
Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.
Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs
Inside SKILL.md
Written by forcedotcomDigital Experience Site for React UI Bundles
Create and configure Digital Experience Sites that host React UI bundles on Salesforce. This skill generates the minimum necessary site infrastructure — Network, CustomSite, DigitalExperienceConfig, DigitalExperienceBundle, and the sfdc_cms__site content type — so a React app can be served from Salesforce.
React sites differ from standard LWR sites: they don't need routes, views, theme layouts, or branding sets. The site acts as a thin container (appContainer: true) that delegates rendering to the React UI bundle referenced by appSpace.
Required Properties
Resolve all five properties before generating any metadata. Each has a fallback chain — work through each option in order until a value is found.
| Property | Format | How to Resolve |
|---|---|---|
| siteName | UpperCamelCase (e.g., MyCommunity) | Ask user or derive from context |
| siteUrlPathPrefix | All lowercase (e.g., mycommunity) | User-provided, or convert siteName to all lowercase with alphanumeric characters only |
| appNamespace | String | namespace in sfdx-project.json → sf data query -q "SELECT NamespacePrefix FROM Organization" --target-org ${usernameOrAlias} → default c |
| appDevName | String | UIBundle metadata in the project → sf data query -q "SELECT DeveloperName FROM UIBundle" --target-org ${usernameOrAlias} → default to siteName |
| enableGuestAccess | Boolean | Ask user whether unauthenticated guest users can access site APIs → default false |
The appNamespace and appDevName properties connect the site to the correct React application. Getting these wrong means the site deploys but shows a blank page, so take care to resolve them from real project data.
Generation Workflow
Step 1: Resolve All Required Properties
Determine values for all five properties before constructing anything. Use the resolution strategies in the table above, falling through each option until a value is found.
Step 2: Create the Project Structure
Use available Salesforce metadata schema and field context for Network, CustomSite, DigitalExperienceConfig, and DigitalExperienceBundle to ensure each file uses valid structure.
Create any files and directories that don't already exist, using these paths:
| Metadata Type | Path |
|---|---|
| Network | networks/{siteName}.network-meta.xml |
| CustomSite | sites/{siteName}.site-meta.xml |
| DigitalExperienceConfig | digitalExperienceConfigs/{siteName}1.digitalExperienceConfig-meta.xml |
| DigitalExperienceBundle | digitalExperiences/site/{siteName}1/{siteName}1.digitalExperience-meta.xml |
| DigitalExperience (sfdc_cms__site) | digitalExperiences/site/{siteName}1/sfdc_cms__site/{siteName}1/* |
The DigitalExperience directory contains only _meta.json and content.json. Do not create any directories other than sfdc_cms__site inside the bundle.
Step 3: Populate All Metadata Fields
Use the default templates in the docs below. Values in {braces} are resolved property references — substitute them with the actual values from Step 1.
| Metadata Type | Template Reference |
|---|---|
| Network | configure-metadata-network.md |
| CustomSite | configure-metadata-custom-site.md |
| DigitalExperienceConfig | configure-metadata-digital-experience-config.md |
| DigitalExperienceBundle | configure-metadata-digital-experience-bundle.md |
| DigitalExperience (sfdc_cms__site) | configure-metadata-digital-experience.md |
For URL updates, see update-site-urls.md.
Execution Note for Step 3: Load and use the docs
- Agents MUST read the full contents of each references/*.md file referenced in Step 3 before attempting to populate metadata fields.
- Use your platform's file-read tool (for example,
read_file) to load these files in full, then perform placeholder substitution for values in{braces}using the resolved properties from Step 1. - Files to load:
references/configure-metadata-network.mdreferences/configure-metadata-custom-site.mdreferences/configure-metadata-digital-experience-config.mdreferences/configure-metadata-digital-experience-bundle.mdreferences/configure-metadata-digital-experience.md
- Read entire file contents, replace placeholders (e.g.
{siteName}) with the resolved values, then use the expanded templates to populate the metadata XML/JSON content.
Step 4: Do Not Modify Non-Templated Properties
Do not modify any default property values for Network, CustomSite, DigitalExperience, DigitalExperienceConfig, or DigitalExperienceBundle metadata that are not expressed as variables wrapped in {braces}.
Verification Checklist
Before deploying, confirm:
- All five required properties are resolved
- All metadata directories and files exist per the project structure
- All metadata fields match the Step 3 templates with
{braces}substituted only; no other default property values were added or changed -
appSpaceincontent.jsonmatches an existingUIBundlemetadata record - Deployment validates successfully:
sf project deploy validate --metadata Network CustomSite DigitalExperienceConfig DigitalExperienceBundle DigitalExperience --target-org ${usernameOrAlias}
Common Workflows
Updating Experience Site URLs
Use when user wants to update or change site URLs (urlPathPrefix).
Steps:
- Read update-site-urls.md to understand the three-component architecture and URL update workflow
- Follow the step-by-step workflow in the doc to update URLs consistently across all three components (DigitalExperienceConfig, Network, CustomSite)
Frequently asked questions about Digital Experience Site Generator
Similar skills
Playwright Component Testing
Test React and Vue components in isolation with Playwright.
Fluent UI Blazor
Integrate Fluent UI components in Blazor applications effortlessly.
Build MCP App
Create interactive UI widgets for MCP servers.
Web Design Reviewer
Identify and fix design issues in websites efficiently.
Markstream Install
Seamlessly integrate Markstream for Markdown rendering.
GSAP & Framer Scroll Animation
Create advanced scroll animations effortlessly.
