/mobile-development:mobile-platform-native-capabilities-integratefrom Salesforce Mobile Development
Guides building Salesforce LWCs that use native mobile device capabilities (barcode, biometrics, location, NFC, etc.) with availability gating and error handling.
Ships in Salesforce Mobile Development. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
The lightning/mobileCapabilities module exposes a set of factory functions
that return service objects for native device features (barcode scanning,
biometrics, location, etc.). Each service extends a common
BaseCapability with an isAvailable()
method, so an LWC can degrade gracefully on surfaces where the capability is
not present (desktop, mobile web).
This skill routes an agent through (1) picking the right capability, (2) loading the authoritative type definitions, and (3) wiring the service into an LWC with the correct availability gating, error handling, and deprecation-aware API choice.
lightning/mobileCapabilities, "mobile capability", or
"Nimbus" by name.Do NOT use this skill for:
mobile-platform-offline-validate.design-systems-slds-apply.isAvailable().lightning/mobileCapabilities module declaration
(see mobile-capabilities).| Capability | Reference | One-line use |
|---|---|---|
| App Review | App Review | Prompt the user for a native in-app review. |
| AR Space Capture | AR Space Capture | Capture a 3D scan of a physical space using AR. |
| Barcode Scanner | Barcode Scanner | Read QR / UPC / EAN / Code-128 / etc. from the camera. |
| Biometrics | Biometrics | Authenticate via Face ID / fingerprint. |
| Calendar | Calendar | Read or create events on the device calendar. |
| Contacts | Contacts | Read or create entries in the device address book. |
| Document Scanner | Document Scanner | Scan paper documents using the camera with edge detection. |
| Geofencing | Geofencing | Trigger logic when the device crosses a geographic boundary. |
| Location | Location | Read GPS coordinates and watch for updates. |
| NFC | NFC | Read or write NFC tags. |
| Payments | Payments | Take an Apple Pay / Google Pay payment. |
Map the user's feature ask to one row of the capability index. If the ask spans multiple capabilities (e.g. "scan a barcode and store it on a contact"), plan for each capability separately — there is one factory function per capability.
Read these two shared references once per session — they apply to every capability and are not duplicated in the per-capability files:
isAvailable() that every service extends.lightning/mobileCapabilities module declaration showing every
re-exported service.Then open the capability's reference file from the table above. Each per-capability reference contains the service-specific TypeScript API (factory function, service interface, options types, result types, error types) and assumes the two shared references above are already in context.
Do not infer the API from memory — read it. The services evolve and some
methods are explicitly @deprecated in favor of newer alternatives.
For each capability:
lightning/mobileCapabilities:
import { getBarcodeScanner } from 'lightning/mobileCapabilities';
const scanner = getBarcodeScanner();isAvailable():
if (!scanner.isAvailable()) {
// graceful fallback or user message
return;
}
@deprecated alongside the recommended one — always
prefer the recommended method in the reference.try/catch and handle the typed failure codes the
service exposes (e.g. BarcodeScannerFailureCode,
LocationServiceFailureCode). User-cancelled vs. permission-denied vs.
service-unavailable are distinct UX states.Each service defines its own failure-code enum. Translate codes into
user-actionable messages: a USER_DENIED_PERMISSION should ask the user to
grant permission; a USER_DISABLED_PERMISSION must direct them to the OS
settings; a SERVICE_NOT_ENABLED should be a developer-visible error, not
shown to the user.
Mobile capabilities are available only when the LWC runs inside a
supported Salesforce mobile app. If the same component is rendered on
desktop or mobile web, the factory will still return an object but
isAvailable() will return false. Never assume availability — gate every
call.
scan(options) (not the deprecated beginCapture / resumeCapture
/ endCapture triple).barcodeTypes to the symbologies needed (default is
all supported types) and enableMultiScan: false for a single read.result[0].value to the bound field. On reject,
inspect error.code against BarcodeScannerFailureCode.isAvailable().isAvailable().beginCapture /
resumeCapture / endCapture for barcode, etc.).lightning/mobileCapabilities, not from a private
path.isAvailable() returns false on a real device — the device is
running an unsupported app surface (not Salesforce Mobile or Field
Service Mobile), or the service is gated by an org-level setting. The
fix is org configuration, not code.lightning/mobileCapabilities. The module is declared globally inside
Salesforce mobile containers; outside that, the types must be installed
separately.scan() and dismiss(). Refactor any sample code the agent received
before returning it.references/app-review.md (opens in a new tab)references/ar-space-capture.md (opens in a new tab)references/barcode-scanner.md (opens in a new tab)references/base-capability.md (opens in a new tab)references/biometrics.md (opens in a new tab)references/calendar.md (opens in a new tab)references/contacts.md (opens in a new tab)references/document-scanner.md (opens in a new tab)references/geofencing.md (opens in a new tab)references/location.md (opens in a new tab)references/mobile-capabilities.md (opens in a new tab)references/nfc.md (opens in a new tab)references/payments.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub forcedotcom/sf-skills --plugin mobile-development3 skills in this plugin
/mobile-apps-createThe entry point for building any Salesforce native mobile app on iOS or Android. TRIGGER when the user says: "build a Salesforce iOS app", "add Salesforce login to my Android app", "set up Mobile SDK", "add MobileSync / SmartStore offline storage", "embed an Agentforce agent in my mobile app", "add Agentforce chat to iOS/Android", or otherwise asks to create, extend, or integrate a Salesforce mobile experience in Swift or Kotlin (MSDK, Agentforce SDK, or both). SKIP when the user is building a non-Salesforce mobile app, using React Native / Flutter / Ionic without Salesforce integration, asking about generic mobile UI design, or working on a Salesforce-adjacent web/desktop surface (LWC, Experience Cloud, Mobile Publisher branding-only)./mobile-platform-offline-validateReview a Lightning Web Component for **mobile offline** compatibility — the Komaci offline static analyzer that pre-primes the data graph for Salesforce Mobile App Plus and Field Service Mobile App. Produces a finding list with code-level fixes covering inline GraphQL queries in `@wire` configurations, modern `lwc:if` / `lwc:elseif` / `lwc:else` directives, and Komaci ESLint rule violations (private wire properties, non-local reactive references, getter side-effects). Use when the user asks for a "mobile offline review", "Komaci check", "offline priming audit", "offline priming failure", or "offline data graph error", or to validate an LWC against the `@salesforce/eslint-plugin-lwc-graph-analyzer` recommended ruleset. Do not use for generic LWC code review (use an appropriate domain review skill) or for building LWCs with native mobile capabilities (use `mobile-platform-native-capabilities-integrate`).3 plugins in 2 repositories ship this exact skill · first indexed Aug 23, 2026
Other plugins' skills for the same job