Back to Skills

mobile-platform-native-capabilities-integrate

Build a Salesforce LWC that uses native mobile device capabilities — barcode scanner, biometrics, location, NFC, calendar, contacts, document scanner, geofencing, AR space capture, app review, and payments. Use this skill when the user asks for an LWC that scans a barcode, captures a photo of a document, reads location or geofences, prompts for biometrics, reads/writes the device calendar or contacts, taps NFC, takes a payment, prompts for an app review, or scans an AR space. Also triggers on "l

753stars278forksUpdated 7/25/2026

Security Assessment

Safe(95/100)
Security Score95/100

About mobile-platform-native-capabilities-integrate

This skill helps developers build Salesforce Lightning Web Components (LWCs) that tap into native mobile device features through the `lightning/mobileCapabilities` module (also known as Nimbus). It solves the problem of correctly wiring device APIs — barcode scanning, biometrics, location, NFC, calendar, contacts, document scanning, geofencing, AR space capture, app review prompts, and payments — into an LWC that runs inside the Salesforce Mobile App or Field Service Mobile App, where these capabilities are available but must be gated so the component degrades gracefully on desktop and mobile web.

The skill routes an agent through a defined workflow: map the user's feature request to one capability in an index table, load two shared reference files (the common BaseCapability interface exposing `isAvailable()`, and the module declaration), then load the capability-specific reference containing authoritative TypeScript type definitions, method signatures, options objects, and failure codes. Each capability extends a common base with availability checks, and the references flag deprecation-aware API choices (for example, preferring `scan()` over the deprecated `beginCapture()`/`resumeCapture()`/`endCapture()` methods on the barcode scanner). The guidance emphasizes gating every call behind `isAvailable()` and handling documented error codes.

The target users are Salesforce LWC developers building mobile-first experiences on the Salesforce Mobile platform. Typical use cases include scanning a barcode onto a record, capturing a document photo with edge detection, reading GPS or geofencing, prompting for Face ID / fingerprint authentication, reading or writing the device calendar and contacts, tapping NFC tags, or taking Apple Pay / Google Pay payments. It explicitly excludes mobile-offline review and generic SLDS/base-component styling, deferring those to sibling skills.

FAQ

What Salesforce module and runtime does this skill target?

It targets the `lightning/mobileCapabilities` module (Nimbus) and produces LWCs intended to run inside supported mobile containers such as the Salesforce Mobile App and Field Service Mobile App.

Which device capabilities are covered?

Barcode scanner, biometrics, location, NFC, calendar, contacts, document scanner, geofencing, AR space capture, app review prompts, and payments (Apple Pay / Google Pay), each with its own reference file of type definitions.

Do these capabilities work on desktop or mobile web?

No. The skill states they are unavailable on desktop and mobile web, so every call must be gated behind the common `isAvailable()` method so the component degrades gracefully.

When should I not use this skill?

It should not be used for mobile-offline / Komaci-priming review of an LWC (use mobile-platform-offline-validate) or for choosing and styling generic Lightning base components / SLDS blueprints (use design-systems-slds-apply).

How does it handle deprecated APIs?

The reference type definitions mark older methods as deprecated (for example the barcode scanner's beginCapture/resumeCapture/endCapture) and steer you toward the current API such as scan() and dismiss().

All Files

14 files
references/barcode-scanner.md8.1 KB
View
references/contacts.md6.9 KB
View
references/mobile-capabilities.md2.1 KB
View
references/ar-space-capture.md3.3 KB
View
references/calendar.md7.2 KB
View
references/location.md5.4 KB
View
SKILL.md8.5 KB
View
references/base-capability.md0.6 KB
View
references/document-scanner.md9.7 KB
View
references/nfc.md6.2 KB
View
references/app-review.md2.2 KB
View
references/biometrics.md3.8 KB
View
references/geofencing.md4.2 KB
View
references/payments.md2.9 KB
View

Install mobile-platform-native-capabilities-integrate

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill