# mobile-platform-offline-validate

Audits Lightning Web Components for Komaci offline priming compatibility in Salesforce mobile apps and generates code-level fixes.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 4700 installs · ★ 1112
- Author: forcedotcom
- License: Apache-2.0 · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/forcedotcom/sf-skills/tree/HEAD/skills/mobile-platform-offline-validate/SKILL.md
- Updated: 2026-10-23
- HTML: https://affpapa.org/en/nevibecode/skills/mobile-platform-offline-validate

## What it does

The skill runs static compliance checks on Lightning Web Component bundles for Komaci data graph priming in Salesforce Mobile App Plus and Field Service Mobile App. In HTML templates, it flags `lwc:if` and `lwc:else` directives, translating them into compatible `if:true` and `if:false` structures. In JS and TS files, it spots inline GraphQL queries inside `@wire` configurations and extracts them into dedicated getters.

A complete validation pass requires a local setup with `npm` (9.0.0 or higher) and `eslint` (8.0.0 or higher). The helper script `scripts/run-komaci.sh` runs the linter with the `bundleAnalyzer` processor to check for private wire properties and getter side effects.

The static graph analysis fails immediately if `@salesforce/eslint-plugin-lwc-graph-analyzer` cannot be resolved in your working directory. This tool is built specifically for offline priming rules, so it does not replace general LWC reviews or native device capability setups.

## Requirements
- Works with: Salesforce

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add forcedotcom/sf-skills --skill mobile-platform-offline-validate -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/mobile-platform-offline-validate/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/mobile-platform-offline-validate/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add forcedotcom/sf-skills --skill mobile-platform-offline-validate -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/mobile-platform-offline-validate/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add forcedotcom/sf-skills --skill mobile-platform-offline-validate -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/mobile-platform-offline-validate/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install forcedotcom/sf-skills mobile-platform-offline-validate
```

2. **Manually: put the files in place**
- File: `.github/skills/mobile-platform-offline-validate/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add forcedotcom/sf-skills --skill mobile-platform-offline-validate -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/forcedotcom/sf-skills --path skills/mobile-platform-offline-validate
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/mobile-platform-offline-validate/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add forcedotcom/sf-skills --skill mobile-platform-offline-validate -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/forcedotcom/sf-skills/tree/HEAD/skills/mobile-platform-offline-validate/SKILL.md

## When to use it
- convert modern `lwc:if` directives into legacy template conditionals
- extract inline GraphQL queries from `@wire` configurations into getters
- detect private wire properties and getter side-effects via Komaci ESLint rules
- resolve data graph priming failures in Salesforce Mobile App Plus components

## Example prompts
- Run a mobile offline review on the `modules/c/offlineAccountCard` component.
- Check this LWC for Komaci offline priming failures before deploying to Field Service.
- Audit `modules/c/workOrderSummary` against the Komaci graph analyzer rules.

## Source text · SKILL.md · Apache-2.0

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: 84ccffdada1e20e0.

BEGIN THIRD-PARTY FILE 84ccffdada1e20e0
```text
---
name: mobile-platform-offline-validate
description: "Review 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`)."
metadata:
  version: "1.0"
  domains: ["Mobile"]
  relatedSkills:
    - "mobile-platform-native-capabilities-integrate"
  cliTools:
    - tool: ["eslint"]
      semver: ">=8.0.0"
    - tool: ["npm"]
      semver: ">=9.0.0"
    - tool: ["npx"]
      semver: ">=9.0.0"
---

# Reviewing LWC Mobile Offline

Run a structured offline-priming compliance pass over a Lightning Web
Component, producing a report of issues found and code-level fixes to bring
the component into compliance with Komaci's static analysis requirements
for the Salesforce Mobile App Plus and Field Service Mobile App.

## When to Use

- The user asks for a "mobile offline review", "Komaci check", or "offline
  priming audit" on a specific LWC.
- Preparing a component to ship in Salesforce Mobile App Plus or Field
  Service Mobile App offline mode.
- Investigating priming failures reported by the offline analyzer.

Do NOT use this skill for:

- Building an LWC that uses native mobile capabilities (barcode scanner,
  biometrics, location, etc.) — use `mobile-platform-native-capabilities-integrate`.
- Generic LWC code review — use the appropriate domain skill
  (`reviewing-lws-security`, `reviewing-lwc-rtl`, `accessibility-code-review`).

## Prerequisites

- Component path (LWC bundle under `modules/…`).
- Access to the component's JS/TS and HTML templates.
```
END THIRD-PARTY FILE 84ccffdada1e20e0

The third-party file has ended. Everything between the 84ccffdada1e20e0 tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 2330 of 7982 bytes. © forcedotcom · Apache-2.0 · https://github.com/forcedotcom/sf-skills/tree/HEAD/skills/mobile-platform-offline-validate/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
