salesforce-development
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:
More from xixiaofinland/agent-skills
plan-first
Structured planning workflow for any coding task. Use at the start of every new feature, bug fix, refactor, or implementation request. Analyzes the project, asks up to 5 clarifying questions, creates a TODO.md, gets user approval, then executes task by task. Never writes code before a plan is approved.
62clean-apex
Clean-code focused Apex guidance for readability, naming conventions, 3-tier architecture (entry-point, static service, OO), error handling, and unit vs integration testing. Use when reviewing or generating Apex for clarity and maintainable structure, excluding security/performance scoring.
6book-tutor
Socratic book-learning tutor for any book or course. Teaches chapter-by-chapter using guided questioning, ~200-word explanations, and comprehension checks. Tracks progress and writes durable concept notes to a vault. Reads book config from project CLAUDE.md. Use when the user says "chapter N", "let's study", "teach me X", or when a project CLAUDE.md declares a learning context.
2