salesforce-development

Installation
SKILL.md

Salesforce Development

This skill guides Salesforce development tasks using the modern sf CLI (Salesforce CLI v2+). All commands use sf, never the legacy sfdx.

Always pass --json to sf commands. JSON output is structured, unambiguous, and far easier to parse than human-formatted output. Exceptions: sf apex run test with -r human when showing results directly to the user, and sf generate commands (which produce local files, not JSON).

Key Concepts

The local repo is intentionally sparse. A Salesforce project does not contain all the metadata that exists in the org — only the components relevant to the current work are pulled down. This is normal. Do not treat an empty or partial force-app/ directory as an error. When the user needs to work on something not yet local, use the "Retrieve Org Metadata Not in Local Repo" workflow below.

Always verify command results. After every deploy, retrieve, or test command, parse the --json output. If the status field is not Succeeded (or the command returns a non-zero exit code), report the error to the user before proceeding. See references/deploy.md for common errors and recovery steps.

Safety Rules

These rules must never be violated without explicit user instruction:

Deploy/Retrieve:

Related skills
Installs
9
First Seen
Apr 23, 2026