lwc-app-builder-config

Use when an LWC needs to appear, be configured, and be constrained inside Lightning App Builder, Experience Builder, Home Page, or Flow screens via its js-meta.xml file — including isExposed, targets, targetConfigs, supportedFormFactors, objects scoping, and admin-facing design attributes. Triggers: 'lwc not appearing in app builder', 'expose lwc to record page', 'design attribute datasource picklist', 'supportedformfactors mobile small', 'targetconfigs for record page vs app page', 'masterlabel vs description'. NOT for custom property editors for Flow (see `custom-property-editor-for-flow`), and NOT for Experience Cloud theming at the page level.

Best use case

lwc-app-builder-config is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Use when an LWC needs to appear, be configured, and be constrained inside Lightning App Builder, Experience Builder, Home Page, or Flow screens via its js-meta.xml file — including isExposed, targets, targetConfigs, supportedFormFactors, objects scoping, and admin-facing design attributes. Triggers: 'lwc not appearing in app builder', 'expose lwc to record page', 'design attribute datasource picklist', 'supportedformfactors mobile small', 'targetconfigs for record page vs app page', 'masterlabel vs description'. NOT for custom property editors for Flow (see `custom-property-editor-for-flow`), and NOT for Experience Cloud theming at the page level.

Teams using lwc-app-builder-config should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/lwc-app-builder-config/SKILL.md --create-dirs "https://raw.githubusercontent.com/PranavNagrecha/AwesomeSalesforceSkills/main/skills/lwc/lwc-app-builder-config/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/lwc-app-builder-config/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How lwc-app-builder-config Compares

Feature / Agentlwc-app-builder-configStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Use when an LWC needs to appear, be configured, and be constrained inside Lightning App Builder, Experience Builder, Home Page, or Flow screens via its js-meta.xml file — including isExposed, targets, targetConfigs, supportedFormFactors, objects scoping, and admin-facing design attributes. Triggers: 'lwc not appearing in app builder', 'expose lwc to record page', 'design attribute datasource picklist', 'supportedformfactors mobile small', 'targetconfigs for record page vs app page', 'masterlabel vs description'. NOT for custom property editors for Flow (see `custom-property-editor-for-flow`), and NOT for Experience Cloud theming at the page level.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# LWC App Builder Config

Use this skill whenever the functional behavior of the LWC is fine but the component either does not appear in a builder, appears in the wrong builder, or offers admins the wrong set of configuration knobs. The js-meta.xml file is the single source of truth that controls exposure, surface targeting, per-surface configuration, form-factor fit, and the admin UX inside App Builder, Experience Builder, Home Page, Utility Bar, and Flow.

---

## Before Starting

Gather this context before editing a `.js-meta.xml`:

- Which surfaces must this component render on — Record Page, App Page, Home Page, Experience Cloud page, Utility Bar, Flow Screen, or several of these?
- Which sObjects is the component valid against? Record-page exposure without an `<objects>` element lets admins drop it on any object's page, which is almost always wrong.
- Which form factors must be supported — Large (desktop) only, Small (phone) only, or both? Form factors are declared inside `targetConfig`, not at the root.
- What admin-tunable inputs does the component need, and are any of them field-name pickers, picklist-value pickers, or free-text with defaults?
- Is translation of the admin-facing `masterLabel` and `description` required? That constrains your approach because `masterLabel` cannot be a Custom Label reference.

---

## Core Concepts

The meta.xml file is small, but every element changes how the builder treats the bundle. Five concepts cover almost every real situation.

### `isExposed` Controls Builder Visibility

Setting `<isExposed>true</isExposed>` is the gate: without it, the bundle is pure JS runtime and cannot be placed in App Builder, Experience Builder, Home Page, Utility Bar, or Flow. A missing or `false` value hides the component silently — there is no validation error — so admins open a ticket wondering where the component went.

### `targets` Enumerate The Surfaces

Inside `<targets>`, each `<target>` child names a surface the component supports: `lightning__RecordPage`, `lightning__AppPage`, `lightning__HomePage`, `lightning__UtilityBar`, `lightning__Tab`, `lightning__FlowScreen`, `lightningCommunity__Default`, `lightningCommunity__Page`, and a handful of device and app-specific targets. A single bundle may appear on many surfaces when its public API is generic enough.

### `targetConfigs` Customize Per-Surface Behavior

`targets` alone produces a component with no admin-configurable inputs. To add per-surface configuration, wrap the target name in a `<targetConfig targets="…">` block under `<targetConfigs>`. Inside each block go `<property>` elements (design attributes), `<supportedFormFactors>`, and — for record pages — the `<objects>` restriction. If a target name appears in `<targets>` but has no matching `<targetConfig>`, admins still see the component but with no configurable properties.

### Design Attributes Give Admins Typed Inputs

`<property>` elements are the admin UX. Each takes a `name`, `type` (`String`, `Integer`, `Boolean`, `Color`), `label`, `description`, optional `default`, optional `placeholder`, `required` flag, and — for `String` — an optional `datasource`. The `datasource` can be a static CSV (`"low,medium,high"`) for a fixed picklist, or `apex://MyPicklistProvider` to bind to an Apex class that implements `VisualEditor.DynamicPickList`, producing dynamic options such as field names or record-type values.

### Record-Page Scoping And Auto-Injected Context

Inside a `lightning__RecordPage` `targetConfig`, the `<objects>` element restricts where admins can drop the component (for example, Account and Opportunity only). Salesforce also auto-injects `@api recordId` and `@api objectApiName` public properties at runtime — you declare them in JS, but you do not declare them in meta.xml. Community targets behave differently: `lightningCommunity__Default` uses `propertyValues` internally, and some `property` types (such as `ContentReference`) are only valid in community targets.

---

## Common Patterns

### Multi-Surface Reusable Bundle

**When to use:** One component should appear on a Record Page for Account and Opportunity, on a custom App Page, and on an Experience Cloud page.

**How it works:** List all three targets in `<targets>`, then create one `<targetConfig>` per target. Scope the record-page target with `<objects>`, expose a `title` design attribute on the App Page with a default, and let the community target define its own distinct set of admin-facing properties.

**Why not the alternative:** Cloning the bundle per surface multiplies maintenance cost and drifts admin UX. A single bundle with per-surface `targetConfig` keeps behavior consistent.

### Apex-Backed Dynamic Picklist

**When to use:** Admins need to pick a field name, record-type developer name, or any other dynamic list.

**How it works:** Implement `VisualEditor.DynamicPickList` in Apex, then reference it from the design attribute as `<property type="String" datasource="apex://MyPicklistProvider" />`. App Builder calls the Apex class when the admin opens the property panel.

**Why not the alternative:** A static CSV datasource cannot reflect org-specific schema. Hardcoding the values inside the LWC hides configuration in code and forces a deploy for every change.

### Form-Factor Restriction Inside `targetConfig`

**When to use:** The App Page layout works only on phone, or an Experience page should appear on desktop only.

**How it works:** Add `<supportedFormFactors><supported formFactor="Small"/></supportedFormFactors>` inside the relevant `<targetConfig>`. Declaring it at the root has no effect.

---

## Decision Guidance

| Situation | Recommended Approach | Reason |
|---|---|---|
| Expose on record pages only, for a specific sObject | `lightning__RecordPage` target + `<objects>` with that object | Prevents admins from dropping it on unrelated records |
| Expose everywhere the component is generic | Multiple `<target>` entries, each with its own `<targetConfig>` | One bundle, per-surface admin UX |
| Admin needs to pick a field at design time | `<property type="String" datasource="apex://FieldPickProvider" />` | `Picklist` is not a valid type; use `String` + datasource |
| Admin needs a fixed small list (High/Medium/Low) | `<property type="String" datasource="high,medium,low" default="medium"/>` | No Apex needed for a static list |
| Component must work on mobile phone only | `<supportedFormFactors><supported formFactor="Small"/></supportedFormFactors>` inside the relevant `targetConfig` | Form factors are per-target, not global |

---

## Recommended Workflow

1. List every surface the component must appear on and, for record pages, the exact sObjects allowed.
2. Decide which admin inputs the component needs and whether any of them require a dynamic datasource (Apex) versus a static CSV.
3. Draft the meta.xml with `isExposed=true`, the full `<targets>` list, and a matching `<targetConfig>` block per configurable target, including `<objects>` on record-page targets and `<supportedFormFactors>` where needed.
4. Set `<masterLabel>` and `<description>` for the builder-side label and tooltip — remember `masterLabel` cannot be a Custom Label reference.
5. Run `python3 skills/lwc/lwc-app-builder-config/scripts/check_lwc_app_builder_config.py <path>` and fix any reported issues.
6. Deploy to a scratch org, drop the component from every configured surface in App Builder / Experience Builder, and verify each design attribute renders correctly.

---

## Review Checklist

- [ ] `<isExposed>true</isExposed>` is present; the component actually appears in the intended builders.
- [ ] Every target that needs configurable inputs has a matching `<targetConfig>`.
- [ ] Every `<targetConfig targets="lightning__RecordPage">` either restricts `<objects>` or has a documented reason not to.
- [ ] `<supportedFormFactors>` lives inside a `<targetConfig>`, never at the root.
- [ ] `<property>` types are limited to `String`, `Integer`, `Boolean`, `Color` (plus community-specific types where applicable) — no `Picklist`.
- [ ] `<masterLabel>` and `<description>` are filled in and read well in the builder.
- [ ] Default values are parsed or cast on read in JS (meta.xml defaults arrive as strings).

---

## Salesforce-Specific Gotchas

1. **`isExposed=false` fails silently** — the component never appears in any builder and the deploy succeeds. Admins see nothing, devs see no error.
2. **`supportedFormFactors` at the root is ignored** — it only takes effect inside a `<targetConfig>`.
3. **`masterLabel` is not translatable via Custom Labels** — use Translation Workbench for localization; Custom Label references do not resolve here.
4. **`objects` only scopes record-page targets** — it is irrelevant on App Page, Home Page, and Experience targets.
5. **Changes to `targetConfigs` can break existing admin placements** — when a required property is added or a type changes, admins may need to re-place or re-save the component on affected pages.
6. **Design-attribute defaults arrive as strings** — even `type="Integer"` default `"5"` is handed to JS as a string, so cast on read.

---

## Output Artifacts

| Artifact | Description |
|---|---|
| Deploy-ready meta.xml | `<bundle>.js-meta.xml` with correct `isExposed`, `targets`, `targetConfigs`, `objects`, and `property` blocks |
| Admin UX plan | The set of labels, descriptions, defaults, and datasources the builder will show |
| Checker report | File-level findings on hidden components, misplaced formFactors, invalid property types, and missing masterLabel |

---

## Related Skills

- `lwc/lwc-base-component-recipes` — once the component is exposed, use base components inside it for standard admin UX.
- `lwc/custom-property-editor-for-flow` — use when the builder-side UX goes beyond design attributes and needs a custom LWC editor (Flow-specific).
- `lwc/experience-cloud-lwc-components` — use for Experience Cloud-specific property types, CSP, and theming concerns.
- `lwc/lwc-in-flow-screens` — use when the component is also placed inside Flow Screens and needs Flow-specific input/output wiring.

Related Skills

org-hardening-and-baseline-config

8
from PranavNagrecha/AwesomeSalesforceSkills

Use when defining or reviewing baseline org hardening settings, especially Security Health Check gaps, clickjack and browser protections, CSP and CORS governance, password/session policies, network restrictions, and release-update hygiene. Triggers: 'org hardening', 'baseline security config', 'Health Check', 'CSP trusted sites', 'clickjack protection'. NOT for feature-level app permissions or record-sharing design.

slack-workflow-builder

8
from PranavNagrecha/AwesomeSalesforceSkills

Use this skill when designing or troubleshooting Slack Workflow Builder workflows that call Salesforce — especially the Salesforce connector step Run a Flow, mapping inputs/outputs, handling failures, and understanding limits. Triggers on: Slack Workflow Builder Salesforce, Run a Flow from Slack, autolaunched flow from Slack, Slack automation calling Salesforce. NOT for Salesforce Flow Builder tutorials unrelated to Slack (use flow skills), not for Flow Core Actions that send Slack messages from Salesforce (use flow-for-slack), not for initial org-to-workspace connection (use slack-salesforce-integration-setup), and not for building custom Slack apps outside Workflow Builder.

process-builder-to-flow-migration

8
from PranavNagrecha/AwesomeSalesforceSkills

Migrate Process Builder processes to record-triggered Flows using the native Migrate to Flow tool or manual rebuild. Covers conversion tool usage, pattern mapping, order-of-execution changes, testing migrated flows, and bulk behavior improvements. NOT for building new flows from scratch, NOT for Workflow Rule migration (use workflow-rule-to-flow-migration), NOT for net-new automation design.

prompt-builder-templates

8
from PranavNagrecha/AwesomeSalesforceSkills

Use when creating, reviewing, or troubleshooting Prompt Builder templates (Field Generation, Record Summary, Sales Email, or Flex types), including grounding with merge fields, Flow, or Apex. Trigger keywords: prompt template, Prompt Builder, field generation, record summary, sales email template, flex template, grounding, merge fields, LLM template, Einstein generative AI. NOT for agent topic instructions, Copilot action configuration, or Data Cloud segment activation.

model-builder-and-byollm

8
from PranavNagrecha/AwesomeSalesforceSkills

Use when configuring Model Builder in Salesforce to register external LLMs or select standard models for Agentforce and Einstein features. Covers model registration, API key configuration, model aliases, and cost/performance tradeoffs. NOT for Trust Layer configuration (use agentforce-trust-layer).

einstein-prediction-builder

8
from PranavNagrecha/AwesomeSalesforceSkills

Einstein Prediction Builder for creating custom binary classification predictions on Salesforce objects: field selection, training data requirements, model activation, score embedding, and monitoring. NOT for Einstein Discovery (Tableau CRM Analytics) or Agentforce agent creation.

service-console-configuration

8
from PranavNagrecha/AwesomeSalesforceSkills

Use this skill to configure a Lightning Service Console app in Salesforce — setting Console Navigation (split view), defining workspace tabs and subtabs, configuring the utility bar with Omni-Channel, Macros, and History, creating Quick Text entries, setting up keyboard shortcuts, and defining navigation rules per object. Trigger keywords: Service Console, console app, workspace tabs, subtabs, utility bar macros, Omni-Channel utility, split view, Quick Text, console navigation rules, keyboard shortcuts service console. NOT for generic Lightning app creation (use app-and-tab-configuration), NOT for Omni-Channel routing configuration (use omni-channel-routing), NOT for CTI adapter installation (use open-cti-setup), NOT for Einstein Bot or Messaging setup.

org-setup-and-configuration

8
from PranavNagrecha/AwesomeSalesforceSkills

Use when configuring org-wide platform settings: MFA enforcement, My Domain setup and deployment, session timeout and security settings, password policies, trusted IP ranges (Network Access), and CSP Trusted Sites. Trigger keywords: 'MFA setup', 'My Domain', 'session settings', 'password policy', 'trusted IP ranges', 'CSP trusted sites'. NOT for user-level login restrictions (use user-management), NOT for permission model design (use permission-sets-vs-profiles), NOT for security audit and hardening review (use security/org-hardening-and-baseline-config).

omnistudio-admin-configuration

8
from PranavNagrecha/AwesomeSalesforceSkills

Use when configuring OmniStudio at the org level: enabling Standard Runtime, selecting the Runtime Namespace, assigning Permission Set Licenses, toggling feature settings, and granting Experience Cloud community access. Trigger keywords: OmniStudio Settings, Standard OmniStudio Runtime, managed package runtime, runtime namespace, OmniStudio Permission Set, OmniStudio PSL. NOT for OmniScript design, DataRaptor authoring, or namespace migration away from Vlocity packages.

lightning-app-builder-advanced

8
from PranavNagrecha/AwesomeSalesforceSkills

Advanced Lightning App Builder usage: component visibility filters, custom page templates, Dynamic Forms, Dynamic Actions, page performance optimization, LWC targetConfig for record pages. Use when building complex record pages or custom app templates. NOT for basic page layout configuration. NOT for LWC component development (use lwc/* skills). NOT for Dynamic Forms basics (use dynamic-forms-and-actions).

journey-builder-administration

8
from PranavNagrecha/AwesomeSalesforceSkills

Use when setting up, configuring, or troubleshooting Marketing Cloud Journey Builder — including entry sources, activities, decision splits, wait activities, goals, exit criteria, journey versions, test mode, or journey analytics. Triggers: 'journey builder setup', 'entry source configuration', 'decision split not routing', 'exit criteria not removing contacts', 'goal not tracking conversion', 'journey version publishing', 'journey re-entry settings', 'wait activity date field'. NOT for Flow-based automation, Marketing Cloud Account Engagement (Pardot) engagement programs, or Salesforce core automation rules.

household-model-configuration

8
from PranavNagrecha/AwesomeSalesforceSkills

Use this skill when configuring the Financial Services Cloud (FSC) household data model — including Household record type setup, Primary Group assignment, ACR-based membership, rollup field inclusion, and batch rollup scheduling. NOT for NPSP household account configuration (use admin/npsp-household-accounts), non-FSC Account hierarchies, or standard Contact-Account relationships outside of FSC.