forcedotcom/sf-skills / plugins/builder/experience-react/skills/experience-ui-bundle-deploy
experience-ui-bundle-deploy
VerifiedMUST activate when the project has a uiBundles/*/src/ directory and the task involves deploying to an org or post-deploy org setup. Deploys a UI bundle app and runs ordered setup: org auth, build, metadata deploy, permission-set and role assignment, Experience Cloud self-registration, social login / SSO / IDP linking (Auth Providers + SAML on a React site), site logout URL, seed-data import, and GraphQL schema fetch + codegen. Trigger signals: *.network-meta.xml, org-setup.config.json (socialLogin/logoutUrl), data-plan.json, sfdx-project.json, or mentions of deploy, org setup, social login/SSO, or logout URL on an Experience site. DO NOT TRIGGER when: creating a new UI bundle project (use experience-ui-bundle-project-generate); styling pages without deploying (use experience-ui-bundle-frontend-generate); adding a feature such as auth, search, or file upload without deploying (use the matching experience-ui-bundle-*-generate skill); configuring MFA permission sets (use experience-ui-bundle-mfa-configure).
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 17.4 KB |
| assets/Communities.settings-meta.xml | config | 1001 B |
| assets/data-delete.apex | other | 1.6 KB |
| assets/data-import.apex | other | 3.0 KB |
| assets/network-selfreg-xml-recipe.md | markdown | 3.5 KB |
| assets/network-selfreg.apex | other | 2.1 KB |
| assets/org-setup.config.template.json | config | 662 B |
| assets/prepare-import-unique-fields.js | script | 1.7 KB |
| assets/social-login-auth-providers.apex | other | 6.7 KB |
| references/config-scaffold.md | markdown | 5.6 KB |
| references/data-import.md | markdown | 5.1 KB |
| references/dev-preview.md | markdown | 3.2 KB |
| references/graphql.md | markdown | 1.1 KB |
| references/license-checks.md | markdown | 2.8 KB |
| references/logout-url.md | markdown | 4.8 KB |
| references/role-assignment.md | markdown | 1.4 KB |
| references/self-registration.md | markdown | 4.0 KB |
| references/social-login.md | markdown | 10.9 KB |
| scripts/derive-site-name.shexecutable | script | 1.3 KB |
| scripts/find-data-plan.shexecutable | script | 1.3 KB |
| scripts/find-prep-script.shexecutable | script | 1.1 KB |
| scripts/get-source-root.shexecutable | script | 989 B |
| scripts/set-logout-url.mjsexecutable | script | 10.8 KB |
references/logout-url.md
View on GitHub# Logout URL — steer Sign Out back to this site
Detail for the **logoutUrl** step (SKILL.md step 3b). The step is executed by the
deterministic helper `scripts/set-logout-url.mjs` (a faithful port of the
reference `org-setup.mjs` logout-URL logic); this file covers **why** it exists
and **how** to run it, not a re-specification of the algorithm.
Source of truth for the behavior: reference `org-setup.mjs` `ensureLogoutUrl`
(1103-1169) and the `main()` logout-URL step (2137-2148); the pure resolution
helpers in `org-setup-url.mjs` (`isAbsoluteLogoutUrl`, `firstPathSegment`,
`pickCommunityBaseUrl`, `resolveLogoutUrl`) and the XML helpers in
`org-setup-xml.mjs` (`assertSafeLogoutUrl`, `setLogoutUrl`) — all reproduced in
`scripts/set-logout-url.mjs`. Config schema: `org-setup-config-schema.mjs`
(93, `logoutUrl: z.string().min(1).optional()`).
Provenance: this step ports the "logout redirects to the login page of a
different site" fix, added to `org-setup.mjs` but not previously reflected in this
skill.
Run this step **only** when a top-level `logoutUrl` is set in
`org-setup.config.json`. If it is absent, the step is a clean no-op — say so.
Unlike self-registration and data import, it is **non-destructive and
idempotent**, so it does **not** require asking first.
## Why it matters
An Experience Cloud site with no `<logoutUrl>` on its Network sends a logging-out
member to the **org default-site login page**. In an org hosting more than one
Experience/CLWR site, that default is a *different* community — so Sign Out drops
the user on the wrong site's login page. Setting `<logoutUrl>` to this site's own
URL steers logout back here (the user reloads as Guest on the same site).
## Why it runs AFTER deploy (step 3b, not folded into deploy)
The platform **rejects a relative logout URL** at deploy time: *"The logout page
URL must be an absolute URL."* But a shipped template must stay
domain-independent, so apps ship a **site-relative** path (e.g.
`"logoutUrl": "/propertyrentalapp/"`) that is valid on every org they deploy to.
Resolving that to the absolute URL the platform requires needs the site's
Experience Cloud **origin**, which is only discoverable (via the Connect
communities API) once the site exists — i.e. after the main deploy. An
already-absolute config value (`http(s)://…`) is used as-is, with no lookup.
## How to run
```bash
node scripts/set-logout-url.mjs \
--logout-url "<logoutUrl from org-setup.config.json>" \
--network-file <sourceRoot>/networks/<site>.network-meta.xml \
--target-org <org> \
--site <site> \
--deploy
```
Derive `<site>` first with `scripts/derive-site-name.sh` (it prints the base name
of the single `*.network-meta.xml`, or exits non-zero when zero or more than one
exist — an ambiguous site is skipped, never guessed). Omit `--deploy` to resolve
and write the file **without** deploying (e.g. to inspect the change first).
### What the helper does (so you don't re-derive it)
- **Resolves** the config value to an absolute URL: already-absolute → used
verbatim; site-relative → its origin is matched from the org's communities
(`/connect/communities`, at the org's current API version), **path-first** then by site name, and it
refuses to fall back to an arbitrary community (resolving against the wrong
origin would silently produce a valid-but-wrong URL).
- **Writes** `<logoutUrl>` into the network metadata idempotently — replaces an
existing value in place, or inserts a new node in the canonical alphabetical
position; an already-correct value is a byte-for-byte no-op (no deploy).
- **Rejects** a URL containing an XML-special character (`& < > " '`) rather than
escaping it.
- **Deploys** only the one network file (with `--deploy`).
### Exit-code contract (best-effort)
| Exit | Meaning | What the step should do |
|------|---------|-------------------------|
| `0` | Applied (changed), already-correct (unchanged), or deployed | Report success; continue. |
| `3` | **Recoverable skip** — network file missing, origin unresolvable, XML-special char, or deploy failed | **Do not treat as a setup failure.** Continue the rest of setup; tell the user to set the logout URL manually. |
| `1` | Usage / argument error | Fix the invocation. |
On a skip, tell the user to **set the logout URL manually in the site's
Administration settings** (Setup → Digital Experiences → the site →
Administration → Login & Registration → Logout URL).
## Config shape
```json
{ "logoutUrl": "/propertyrentalapp/" }
```
- Top-level key (a sibling of `permsetAssignments` / `socialLogin`), optional.
- A **site-relative path** (recommended — domain-independent) or an absolute
`http(s)` URL. A relative value is resolved to absolute at deploy time; an
absolute value is used as-is.
- Like `selfRegistration` / `socialLogin`, there is **no `siteName`** — the site
is derived from the single `networks/<site>.network-meta.xml`.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deployment | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |