MCPInstall

experience-lwc-base-components-integrate

Pick the right Lightning Base Component (lightning-) for a given UI task, retrieve its full API (props, methods, events, slots) from the bundled per-component reference, and wire it into an LWC (LWC .html, .js, and .css files) without breaking SLDS. Use this skill when users say "I need a Lightning modal / datatable / combobox / record form", ask which lightning- component fits a use case, want a shortlist of LBC candidates, are about to hand-roll a UI that a base component already provides, or are editing an LWC bundle's .html / .js / .css and need to select or wire a base component. Also triggers on "Lightning base component", "LBC", "lightning-combobox", "lightning-datatable", "use lightning- tag". DO NOT TRIGGER for applying SLDS design tokens, blueprints, or styling guidance in general — that is design-systems-slds-apply; this skill only selects and wires lightning- base components.

Installs
2.6K
Last 24h
+16
Trending rank
#6720
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/forcedotcom/sf-skills --skill experience-lwc-base-components-integrate
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads experience-lwc-base-components-integrate automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

<!-- adk-managed-skill -->

Using Lightning Base Components

Lightning Base Components (LBC) are the lightning-* web components shipped by Salesforce. This skill routes an agent through the right decision sequence so the final component choice is as specific as possible and backed by real API docs — not a hand-rolled reimplementation of something that already exists.

When to Use This Skill

  • User describes a UI need ("searchable dropdown", "record edit form", "modal with footer") and asks which lightning-* component fits.
  • User is about to build a primitive (button group, combobox, toast) and should be using LBC instead.
  • User asks you to review LWC markup for LBC-related issues — specifically overriding SLDS classes or restyling LBC internals.
  • User needs the authoritative props/events/slots for a specific lightning-* tag.

Prerequisites

  • Knowledge of which LBC namespace your org uses (lightning is the default public namespace; some platforms expose lightning-community or others — the user's meta files will clarify).
  • The skill ships authoritative API docs for every Lightning Base Component in references/lightning-components.md. Each component is a # Component API Structure block; grep for **Name:** <camelCaseName> (e.g. **Name:** datatable) to jump to its Properties / Methods / Events / Slots. Read this rather than relying on cached knowledge — LBC evolves and the reference is the source of truth.

Workflow

Step 1 — Read the entire component index first

Open lightning-component-index.md and scan all entries before making any selection. This is non-negotiable: LBC's value comes from picking the most specialized component, and skipping the scan leads to reinventing compound widgets out of primitives.

As you scan, compile a candidate list — every component whose description touches any aspect of the use case. Do not filter or rank yet.

Step 2 — Narrow to the most specific fit per feature

Once the scan is complete:

  • For each feature in the use case, select the most specific component that covers it. Prefer a specialized compound (lightning-record-form, lightning-tabset, lightning-datatable) over a generic primitive (lightning-input, lightning-button) when the specialized one covers the scenario end-to-end.
  • Avoid duplication: if lightning-record-form already renders fields for a record, do not pair it with lightning-input-field unless you're explicitly overriding behavior.

Step 3 — Share the shortlist and confirm

Present the final shortlist to the developer with a one-line rationale per component. Wait for explicit confirmation before pulling full API docs. This prevents the agent from burning context on components the developer has already mentally ruled out.

Step 4 — Retrieve full API docs

Once confirmed, use the bundled helper to pull the exact API blocks — this avoids ad-hoc grepping across a large reference:

scripts/extract-component-docs.sh <camelCaseName> [<camelCaseName>...]

Convert lightning-<foo> tags to camelCase (no lightning- prefix):

  • lightning-datatable → datatable
  • lightning-record-edit-form → recordEditForm
  • lightning-button-icon → buttonIcon

Each returned block has the same shape: Basic Information (tag, namespace, type), Properties (name, type, default, description), Methods, Events, Slots, and (where applicable) usage notes. This skill is about picking the components; the bundled reference is about wiring them.

Step 5 — Produce integration guidance

Using the per-component reference, walk the developer through:

  • The exact <lightning-...> tag and required attributes.
  • Which events to bind (onchange, oncommit, onsuccess, …) and what the event payload contains.
  • Any slots to fill (headers, footers, custom content).
  • Known constraints from the component docs (e.g. lightning-record-form requires object-api-name and record-id for edit/view modes).

Step 6 — Respect LBC styling rules

Do not override SLDS classes on LBC internals. See lbc-expert-guidance.md for specifics. Common issues:

  • Targeting .slds-button or .slds-input in the host component's CSS to restyle an LBC — LBC ships inside a shadow root, so these selectors either leak into sibling components or get stripped entirely. Use the component's documented styling hooks (--sds-c-button-*, etc.) instead.
  • Wrapping an LBC just to mutate its internal markup. You can't — the markup is hidden behind the shadow root. If the component doesn't expose the slot/prop you need, that's a platform-level gap, not a restyling job.

Examples

Example — "I need a multi-select combobox with typeahead"

  1. Scan the component index end-to-end.
  2. Candidate list includes: lightning-combobox, lightning-dual-listbox, lightning-record-picker.
  3. Shortlist: lightning-dual-listbox (the documented multi-select base component). Rule out lightning-combobox — its documented API is single-select; it has no type="multi" and no multi-select mode. Flag that lightning-record-picker only fits if the values are record IDs.
  4. Developer confirms lightning-dual-listbox.
  5. Run scripts/extract-component-docs.sh dualListbox.
  6. Return the options, value, onchange payload, and required label props from the block's Properties / Events sections.

Example — "I'm going to write my own modal"

  1. Scan finds lightning-modal, lightning-modal-body, lightning-modal-footer, lightning-modal-header.
  2. Shortlist is the 4 modal components.
  3. Confirm.
  4. Run scripts/extract-component-docs.sh modal modalHeader modalBody modalFooter → full modal API (how to extend LightningModal, the static .open() pattern, slotting the header/body/footer).
  5. Steer the developer away from rolling their own dialog.

Verification Checklist

  • The full component index was scanned before any selection (no keyword-search shortcutting).
  • Candidate list included every component that touches the use case.
  • Final shortlist selects the most specific component per feature.
  • Developer confirmed the shortlist before the bundled component reference was opened.
  • Integration guidance cites props / events / slots from the real API docs (not inferred).
  • No suggestions to restyle LBC by overriding SLDS classes.

Troubleshooting

  • Grep for **Name:** <name> returns no match — name is wrong, or the reference uses a different camelCase. Double-check against the component index (lightning-record-form → recordForm, lightning-record-view-form → recordViewForm, lightning-button-icon → buttonIcon).
  • Proposed component doesn't have the prop you expected — trust the real API doc over memory. LBC evolves; cached knowledge lies.
  • Developer resists the shortlist — don't skip Step 4. Still retrieve the docs for the developer's preferred choice so they see the actual trade-offs.
  • Developer wants to restyle LBC internals — redirect to styling hooks (see the LBC Expert reference). Refusing shadow DOM penetration is the correct answer.

FAQ

What does the experience-lwc-base-components-integrate skill do?

Pick the right Lightning Base Component (lightning-) for a given UI task, retrieve its full API (props, methods, events, slots) from the bundled per-component reference, and wire it into an LWC (LWC .html, .js, and .css files) without breaking SLDS. Use this skill when users say "I need a Lightning modal / datatable / combobox / record form", ask which lightning- component fits a use case, want a shortlist of LBC candidates, are about to hand-roll a UI that a base component already provides, or are editing an LWC bundle's .html / .js / .css and need to select or wire a base component. Also triggers on "Lightning base component", "LBC", "lightning-combobox", "lightning-datatable", "use lightning- tag". DO NOT TRIGGER for applying SLDS design tokens, blueprints, or styling guidance in general — that is design-systems-slds-apply; this skill only selects and wires lightning- base components.

How do I install experience-lwc-base-components-integrate?

Run npx skills add https://github.com/forcedotcom/sf-skills --skill experience-lwc-base-components-integrate in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/experience-lwc-base-components-integrate/ (personal) or .claude/skills/experience-lwc-base-components-integrate/ (project).

Which AI agents can use experience-lwc-base-components-integrate?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is experience-lwc-base-components-integrate safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains experience-lwc-base-components-integrate?

It is published by forcedotcom in forcedotcom/sf-skills. It has 2,640 recorded installs.

More from forcedotcom/sf-skills

View all →

platform-apex-generate

forcedotcom/sf-skills

Primary Apex authoring skill for class generation, refactoring, and review. ALWAYS ACTIVATE when the user mentions Apex, .cls, triggers, or asks to create/refactor a class (service, selector, domain, batch, queueable, schedulable, invocable, DTO, utility, interface, abstract, exception, REST resource). Use this skill for requests involving SObject CRUD, mapping collections, fetching related records, scheduled jobs, batch jobs, trigger design, @AuraEnabled controllers, @RestResource endpoints, custom REST APIs, or code review of existing Apex.

platform-apex-test-generate

forcedotcom/sf-skills

Use to generate and validate Apex test classes with TestDataFactory patterns, bulk testing (251+ records), mocking, assertions, and disciplined test-fix loops. Use when creating Apex test classes (for triggers, services, controllers, batch jobs, queueables, and callouts), improving coverage, debugging or fixing failing Apex tests, or running test/coverage analysis. Triggers on Test.cls files, sf apex run test, coverage reports. Do NOT trigger for production Apex (use platform-apex-generate) or Jest/LWC tests.

Testing & QA7.1K installs

platform-apex-test-run

forcedotcom/sf-skills

Apex test execution, coverage analysis, and test-fix loops with 120-point scoring. Use when the user runs Apex tests, checks code coverage, fixes failing tests, or touches Test.cls / Test.cls files. DO NOT TRIGGER when writing Apex production code (use platform-apex-generate), Agentforce agent testing (use agentforce-test), or Jest/LWC tests (use experience-lwc-generate).

Testing & QA7K installs

platform-apex-logs-debug

forcedotcom/sf-skills

Salesforce debug log analysis and troubleshooting with 100-point scoring. TRIGGER when: user analyzes debug logs, hits governor limits, reads stack traces, or touches .log files from Salesforce orgs. DO NOT TRIGGER when: running Apex tests (use platform-apex-test-run), generating or fixing Apex code (use platform-apex-generate), or Agentforce session tracing (use agentforce-observe).

platform-soql-query

forcedotcom/sf-skills

Use when the user needs SOQL/SOSL authoring or optimization: natural-language-to-query generation, relationship queries, aggregates, query-plan/selectivity analysis, and performance or safety improvements. TRIGGER when the user writes, optimizes, or debugs SOQL/SOSL, touches .soql files, or asks about relationship queries, aggregates, or query performance. DO NOT TRIGGER for bulk data operations (use platform-data-manage), Apex DML logic (use platform-apex-generate), or report/dashboard queries.

platform-metadata-deploy

forcedotcom/sf-skills

Salesforce DevOps automation using sf CLI v2. TRIGGER when: user deploys metadata, validates a deploy or does a dry-run, deploys to a Production org, quick-deploys a validated job ID, ships/promotes to prod, creates/manages scratch orgs or sandboxes, sets up CI/CD pipelines, or troubleshoots deployment errors with sf project deploy. DO NOT TRIGGER when: writing Apex code, building LWC components (use experience-lwc-generate), creating metadata definitions (use platform-custom-object-generate), deleting metadata from an org (use platform-destructive-deploy), or querying org data (use platform-data-manage).

DevOps & Cloud6.8K installs

Popular frontend & design skills

View category →

setup-matt-pocock-skills

mattpocock/skills

Configure this repo for the engineering skills: set up its issue tracker, triage label vocabulary, and domain doc layout. Run once before first use of the other engineering skills.

Frontend & Design1.1M installs

frontend-design

anthropics/skills

Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.

OfficialFrontend & Design1M installs

hyperframes-animation

heygen-com/hyperframes

All animation knowledge for HyperFrames — atomic motion rules, multi-phase scene blueprints, scene transitions, broader motion-design techniques, AND the seven runtime adapters (GSAP default, plus Lottie, Three.js, Anime.js, CSS keyframes, Web Animations API, TypeGPU). Use for any motion or animation task: pick 2-4 rules and compose, or load a blueprint, or look up runtime-specific API (e.g. GSAP eases / Lottie player / Three.js mixer). Also covers auditing an existing composition's choreography (animation map) and 24 named text-animation effects. HyperFrames-native: single paused timeline, seek-safe, deterministic.

prototype

mattpocock/skills

Build a throwaway prototype to answer a design question. Use when the user wants to sanity-check whether a state model or logic feels right, or explore what a UI should look like.

Frontend & Design999.2K installs

hyperframes-core

heygen-com/hyperframes

The HyperFrames composition contract — build one renderable project. Use for composition structure, the data- timing attributes, class="clip", tracks, sub-compositions, variables, framework-owned media playback, deterministic-render rules, and validation. Read before writing composition HTML.

Frontend & Design930.5K installs

vercel-react-best-practices

vercel-labs/agent-skills

React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.

OfficialFrontend & Design843.1K installs