
Generating Ui Bundle Site
Provision a brand-new Salesforce Digital Experience React site by generating the default CustomSite metadata XML in the correct repo path.
Overview
Generating UI Bundle Site is an agent skill for the Build phase that scaffolds default CustomSite metadata XML for a new Salesforce Digital Experience React Site at sites/{siteName}.site-meta.xml.
Install
npx skills add https://github.com/forcedotcom/afv-library --skill generating-ui-bundle-siteWhat is this skill?
- Creates only a net-new default CustomSite record—not for editing existing sites
- Fixed file location pattern: sites/{siteName}.site-meta.xml
- Full SOAP metadata template with portal, XSS, clickjack, and error page defaults
- Digital Experience React Site focus with CommunitiesLogin authorization page wiring
- Documents purpose and constraints so agents do not misuse the template for migrations
- File location: sites/{siteName}.site-meta.xml
- Scope limited to net-new CustomSite records only
Adoption & trust: 1.3k installs on skills.sh; 513 GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
You need a correct default CustomSite metadata file for a new Experience React site but do not want to hand-copy a long XML template or risk editing an existing site record.
Who is it for?
Salesforce DX projects spinning up a fresh Digital Experience React site with metadata-first workflows.
Skip if: Updating or patching an existing CustomSite, non-React legacy community templates, or teams not using Salesforce metadata source format.
When should I use this skill?
User is provisioning a brand-new Digital Experience React Site and needs the default CustomSite metadata XML template in the Salesforce DX sites folder.
What do I get? / Deliverables
You get a net-new, correctly pathed CustomSite.site-meta.xml with documented defaults ready to rename, commit, and deploy alongside your UI bundle work.
- sites/{siteName}.site-meta.xml with default CustomSite field values
- Documented file path and net-new-only usage constraints
Recommended Skills
Journey fit
CustomSite metadata is core build work when standing up a customer-facing Experience Cloud React surface. Frontend subphase fits net-new site shell configuration (portal pages, auth routes, security headers) before UI bundle work ships.
How it compares
A metadata template generator for one Salesforce object—not a full LWC/React app scaffolder or Heroku-style hosting guide.
Common Questions / FAQ
Who is generating-ui-bundle-site for?
Solo and indie builders using agent-assisted Salesforce DX who are adding a new Digital Experience React Site and need the CustomSite XML bootstrap in the right folder.
When should I use generating-ui-bundle-site?
Use it during Build/frontend when provisioning a brand-new React Experience site metadata record before you wire routes, auth, and UI bundles—never when altering an already-deployed CustomSite.
Is generating-ui-bundle-site safe to install?
It only emits local metadata XML, but wrong deployment can still create org configuration; review the Security Audits panel on this page and validate site names and settings in a sandbox before production deploy.
SKILL.md
READMESKILL.md - Generating Ui Bundle Site
# Configure Metadata: CustomSite ## Purpose This configuration file creates a **net-new, default** CustomSite metadata record for a Digital Experience React Site. It is not intended to edit or modify an existing CustomSite record. Use this template only when provisioning a brand-new React site. ## File Location ``` sites/{siteName}.site-meta.xml ``` ## Default Template ```xml <?xml version="1.0" encoding="UTF-8"?> <CustomSite xmlns="http://soap.sforce.com/2006/04/metadata"> <active>true</active> <allowGuestPaymentsApi>false</allowGuestPaymentsApi> <allowHomePage>false</allowHomePage> <allowStandardAnswersPages>false</allowStandardAnswersPages> <allowStandardIdeasPages>false</allowStandardIdeasPages> <allowStandardLookups>false</allowStandardLookups> <allowStandardPortalPages>true</allowStandardPortalPages> <allowStandardSearch>false</allowStandardSearch> <authorizationRequiredPage>CommunitiesLogin</authorizationRequiredPage> <bandwidthExceededPage>BandwidthExceeded</bandwidthExceededPage> <browserXssProtection>true</browserXssProtection> <cachePublicVisualforcePagesInProxyServers>true</cachePublicVisualforcePagesInProxyServers> <clickjackProtectionLevel>SameOriginOnly</clickjackProtectionLevel> <contentSniffingProtection>true</contentSniffingProtection> <enableAuraRequests>true</enableAuraRequests> <fileNotFoundPage>FileNotFound</fileNotFoundPage> <genericErrorPage>Exception</genericErrorPage> <inMaintenancePage>InMaintenance</inMaintenancePage> <indexPage>CommunitiesLanding</indexPage> <masterLabel>{siteName}</masterLabel> <redirectToCustomDomain>false</redirectToCustomDomain> <referrerPolicyOriginWhenCrossOrigin>true</referrerPolicyOriginWhenCrossOrigin> <selfRegPage>CommunitiesSelfReg</selfRegPage> <siteType>ChatterNetwork</siteType> <urlPathPrefix>{siteUrlPathPrefix}vforcesite</urlPathPrefix> </CustomSite> ``` # Configure Metadata: DigitalExperienceBundle ## Purpose This configuration file creates a **net-new, default** DigitalExperienceBundle metadata record for a Digital Experience React Site. It is not intended to edit or modify an existing DigitalExperienceBundle record. Use this template only when provisioning a brand-new React site. ## File Location ``` digitalExperiences/site/{siteName}1/{siteName}1.digitalExperience-meta.xml ``` ## Default Template ```xml <?xml version="1.0" encoding="UTF-8"?> <DigitalExperienceBundle xmlns="http://soap.sforce.com/2006/04/metadata"> <label>{siteName}1</label> </DigitalExperienceBundle> ``` # Configure Metadata: DigitalExperienceConfig ## Purpose This configuration file creates a **net-new, default** DigitalExperienceConfig metadata record for a Digital Experience React Site. It is not intended to edit or modify an existing DigitalExperienceConfig record. Use this template only when provisioning a brand-new React site. ## File Location ``` digitalExperienceConfigs/{siteName}1.digitalExperienceConfig-meta.xml ``` ## Default Template ```xml <?xml version="1.0" encoding="UTF-8"?> <DigitalExperienceConfig xmlns="http://soap.sforce.com/2006/04/metadata"> <label>{siteName}</label> <site> <urlPathPrefix>{siteUrlPathPrefix}</urlPathPrefix> </site> <space>site/{siteName}1</space> </DigitalExperienceConfig> ``` # Configure Metadata: DigitalExperience (sfdc_cms__site) ## Purpose These configuration files create **net-new, default** DigitalExperience content records (`sfdc_cms__site` type) for a Digital Experience React Site. They are not intended to edit or modify existing DigitalExperience content. Use these templates only when provisioning a brand-new React site. The `appContainer: true` field in `content.json` is what makes this a React site rather than a standard LWR site. The `appSpace` field should **be left empty if the UIBundle metadata record does not already exist**. When the UIBundle exists, populate the `appSpace` value following the forma