sf-local-development

Guides the Salesforce local development loop using Live Preview, offline checks, and source tracking.

2|Updated Sep 12, 2026
One-click install
npx skills add https://github.com/grzmol/vibe-force --skill sf-local-development-grzmol
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sf-local-development
Source: https://github.com/grzmol/vibe-force/tree/main/skills/sf-local-development
Command: npx skills add https://github.com/grzmol/vibe-force --skill sf-local-development-grzmol

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Salesforce developers waste deploy cycles verifying changes that could be checked locally, and lose time when the Live Preview server does not reflect edits or source tracking reports conflicts. This Skill defines exactly which checks run offline (Prettier, ESLint, Code Analyzer, sfdx-lwc-jest), which require an org (Apex compilation, SOQL, FLS, Flow), and how to iterate on LWC and Apex before any deployment. ## Core Features & Use Cases - Live Preview workflows: Covers sf lightning dev app, sf lightning dev component, and sf lightning dev site, including the full reload matrix showing which changes hot-reload and which need a deploy plus server restart. - Offline gate composition: Documents the vf-check local gate (format, lint, analyzer, jest) with exit codes, coverage thresholds, and the fixture/harness pattern for previewing empty, error, and long-text component states without org records. - Source tracking hygiene: Explains sf project deploy preview, --dry-run check-only deploys, sf project retrieve start, and safe conflict resolution without abusing --ignore-conflicts. - Use Case: You are building a new LWC and the preview stops reflecting your edits after adding a new @api property. This Skill tells you the change is not hot-reloadable, and gives the exact deploy-and-restart recovery commands. ## Quick Start Ask the assistant to set up a local preview and offline verification loop for the LWC component you are currently editing against your scratch org.

Frequently Asked Questions about sf-local-development

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I preview a Lightning web component locally without deploying?

Run `sf lightning dev component --name <bundle> --target-org <alias>` to preview an LWC in isolation. The preview resolves Lightning Data Service wire adapters, @salesforce modules, and Apex controllers against the target org while serving your local source.

Which Salesforce checks can run offline without an org?

Prettier formatting, ESLint on LWC and Aura JavaScript, sf code-analyzer run, and sfdx-lwc-jest unit tests all run offline. Apex compilation, Apex tests, SOQL, Flow, and permission checks always require an org.

Why does my sf lightning dev preview not show my changes?

Only .js, .html, and .css edits hot-reload. New @api properties, wire adapter changes, new @salesforce imports, and .js-meta.xml edits require a deploy, then a browser refresh for component previews or a server restart for app and site previews.

Can I use Live Preview with Aura components or production orgs?

No. Live Preview supports Lightning web components only; Aura components never appear in any preview mode. Production orgs are technically allowed but Salesforce recommends scratch orgs or sandboxes, and the vibe-force hooks block production aliases.

How do I resolve source tracking conflicts between project and org?

Run `sf project deploy preview` to inspect conflicts, retrieve the org version with `sf project retrieve start`, diff it in git, and merge per component. Reserve `--ignore-conflicts` for disposable scratch orgs, since it silently overwrites the other side.

How do I test empty or error component states without org records?

Create a fixtures module (c/<component>Fixtures) defining each state, and a harness bundle in a separate non-default package directory that mounts the component per state. The Jest spec imports the same fixtures, and the harness never ships to production.