Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
forcedotcom avatar

Generating Ui Bundle Site

  • 1.5k installs
  • 763 repo stars
  • Updated July 24, 2026
  • forcedotcom/afv-library

This is a copy of generating-ui-bundle-site by forcedotcom - installs and ranking accrue to the original listing.

generating-ui-bundle-site is a Salesforce AFV Library skill that emits a complete CustomSite metadata XML file for developers provisioning a brand-new React-based Digital Experience site on Salesforce.

About

generating-ui-bundle-site is a forcedotcom/afv-library template skill that produces a net-new CustomSite metadata record for Salesforce Digital Experience React sites. It writes sites/{siteName}.site-meta.xml with defaulted SOAP metadata fields—active site flag, guest payment API toggles, standard page permissions, and related CustomSite properties—intended only for initial provisioning, not editing existing sites. Developers reach for generating-ui-bundle-site when standing up a fresh Experience Cloud React site and need deployable Metadata API XML aligned with AFV library conventions before connecting UI bundles and community routes.

  • Generates net-new CustomSite metadata record for React Digital Experiences
  • Produces sites/{siteName}.site-meta.xml with 20+ pre-configured security and rendering settings
  • Default template activates the site, enables Aura, sets clickjacking and XSS protections
  • Explicitly designed only for brand-new sites, not for editing existing records
  • Standardizes initial site configuration across Salesforce Experience Cloud projects

Generating Ui Bundle Site by the numbers

  • 1,484 all-time installs (skills.sh)
  • +1 installs in the week ending Jul 28, 2026 (Skillselion tracking)
  • Security screen: LOW risk (skills.sh audit)
  • Data as of Jul 28, 2026 (Skillselion catalog sync)
npx skills add https://github.com/forcedotcom/afv-library --skill generating-ui-bundle-site

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs1.5k
repo stars763
Security audit3 / 3 scanners passed
Last updatedJuly 24, 2026
Repositoryforcedotcom/afv-library

How do you create CustomSite metadata for Experience Cloud?

Instantly generate a complete, ready-to-deploy CustomSite metadata file when provisioning a brand-new React-based Digital Experience site on Salesforce.

Who is it for?

Salesforce developers provisioning a new React Digital Experience site who need a default CustomSite metadata file.

Skip if: Skip generating-ui-bundle-site when modifying an existing CustomSite record or building non-React Experience templates.

When should I use this skill?

A developer asks for CustomSite metadata, sites/*.site-meta.xml, or a new Digital Experience React site on Salesforce.

What you get

Deployable CustomSite .site-meta.xml with default Digital Experience React site settings.

  • sites/{siteName}.site-meta.xml

Files

SKILL.mdMarkdownGitHub ↗

Digital 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.

PropertyFormatHow to Resolve
siteNameUpperCamelCase (e.g., MyCommunity)Ask user or derive from context
siteUrlPathPrefixAll lowercase (e.g., mycommunity)User-provided, or convert siteName to all lowercase with alphanumeric characters only
appNamespaceStringnamespace in sfdx-project.jsonsf data query -q "SELECT NamespacePrefix FROM Organization" --target-org ${usernameOrAlias} → default c
appDevNameStringUIBundle metadata in the project → sf data query -q "SELECT DeveloperName FROM UIBundle" --target-org ${usernameOrAlias} → default to siteName
enableGuestAccessBooleanAsk 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 TypePath
Networknetworks/{siteName}.network-meta.xml
CustomSitesites/{siteName}.site-meta.xml
DigitalExperienceConfigdigitalExperienceConfigs/{siteName}1.digitalExperienceConfig-meta.xml
DigitalExperienceBundledigitalExperiences/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 TypeTemplate Reference
Networkconfigure-metadata-network.md
CustomSiteconfigure-metadata-custom-site.md
DigitalExperienceConfigconfigure-metadata-digital-experience-config.md
DigitalExperienceBundleconfigure-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 docs/*.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:
  • docs/configure-metadata-network.md
  • docs/configure-metadata-custom-site.md
  • docs/configure-metadata-digital-experience-config.md
  • docs/configure-metadata-digital-experience-bundle.md
  • docs/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
  • [ ] appSpace in content.json matches an existing UIBundle metadata 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)

Related skills

How it compares

Use for first-time React Experience site scaffolding; hand-edit metadata or retrieve existing XML when changing live site settings.

FAQ

Where does generating-ui-bundle-site write CustomSite metadata?

generating-ui-bundle-site targets sites/{siteName}.site-meta.xml in the Salesforce project. The XML uses the CustomSite xmlns http://soap.sforce.com/2006/04/metadata schema with defaulted boolean flags.

Can generating-ui-bundle-site update an existing site?

generating-ui-bundle-site is only for net-new CustomSite records when provisioning a brand-new React Digital Experience site. The readme states it is not intended to edit or modify existing CustomSite metadata.

Is Generating Ui Bundle Site safe to install?

skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.

Frontend Developmentfrontendintegrations

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.