forcedotcom/sf-skills / plugins/builder/mobile-development/skills/mobile-platform-offline-validate
mobile-platform-offline-validate
FlaggedReview 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`).
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 7.8 KB |
| references/grounding.md | markdown | 1.0 KB |
| references/inline-graphql.md | markdown | 2.8 KB |
| references/komaci-eslint.md | markdown | 7.6 KB |
| references/lwc-if.md | markdown | 3.2 KB |
| scripts/komaci.config.mjs | script | 579 B |
| scripts/package.json | manifest | 286 B |
| scripts/run-komaci.shexecutable | script | 2.3 KB |
scripts/run-komaci.sh
View on GitHub#!/usr/bin/env bash
#
# Komaci offline static analysis runner
#
# Runs @salesforce/eslint-plugin-lwc-graph-analyzer against an LWC bundle
# with the plugin's recommended ruleset and emits ESLint's JSON
# formatter output on stdout.
#
# The plugin's `bundleAnalyzer` processor expects the JS file to live
# next to its sibling HTML templates so the offline data graph can be
# resolved across the bundle.
#
# Plugin + ESLint versions are pinned in scripts/package.json and
# installed into scripts/node_modules on first run so the runner is
# isolated from whatever versions the host project happens to ship.
#
# Usage:
# run-komaci.sh path/to/component.js
#
# Arguments:
# $1 Path to the LWC component's JS file (required). The component's
# sibling HTML templates must live in the same directory; the
# plugin discovers them automatically via the bundle processor.
#
# Environment:
# KOMACI_ESLINT_BIN Override the eslint binary (default: scripts/node_modules/.bin/eslint)
#
# Output:
# ESLint --format json on stdout. Non-zero exit if eslint reports
# errors; the JSON is still emitted on stdout in either case.
set -euo pipefail
if [ $# -lt 1 ]; then
echo "Usage: $0 path/to/component.js" >&2
exit 2
fi
JS_PATH="$1"
if [ ! -f "$JS_PATH" ]; then
echo "Error: $JS_PATH does not exist" >&2
exit 2
fi
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
CONFIG_PATH="$SCRIPT_DIR/komaci.config.mjs"
PLUGIN_DIR="$SCRIPT_DIR/node_modules/@salesforce/eslint-plugin-lwc-graph-analyzer"
# Install the pinned ESLint + plugin versions on first run. We resolve
# them from SCRIPT_DIR so Node ESM picks up the right copy regardless
# of the caller's cwd or the host project's node_modules.
if [ ! -d "$PLUGIN_DIR" ]; then
echo "Installing pinned Komaci runner deps in $SCRIPT_DIR ..." >&2
(cd "$SCRIPT_DIR" && npm install --no-fund --no-save --silent) >&2
fi
ESLINT="${KOMACI_ESLINT_BIN:-$SCRIPT_DIR/node_modules/.bin/eslint}"
# Run eslint with the plugin's recommended config and emit JSON.
# `--no-config-lookup` ignores any host-project ESLint config so only
# the Komaci recommended ruleset applies; `--no-error-on-unmatched-pattern`
# avoids hard failure if the component path is empty.
$ESLINT \
--no-config-lookup \
--no-error-on-unmatched-pattern \
--config "$CONFIG_PATH" \
--format json \
"$JS_PATH"
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |