/platform-environment-validate
Validate and configure the local Salesforce development environment. Runs a prerequisite scan showing ๐ด/๐ก/๐ข status for all required tools (Salesforce CLI, Code Analyzer plugin, Node.js, NPM, Git, Salesforce MCP, Source Tracking) and offers to install or update
$ npx -y skills add forcedotcom/sf-skills --skill platform-environment-validate --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition โ
- You can call itInvoke it directly when you want it.
- Slash command
/platform-environment-validate
Context preview
The summary Claude sees to decide when to auto-load this skill.
Validate and configure the local Salesforce development environment. Runs a prerequisite scan showing ๐ด/๐ก/๐ข status for all required tools (Salesforce CLI, Code Analyzer plugin, Node.js, NPM, Git, Salesforce MCP, Source Tracking) and offers to install or update
SKILL.md
platform-environment-validate.SKILL.mdname: platform-environment-validate
description: "Validate and configure the local Salesforce development environment. Runs a prerequisite scan showing ๐ด/๐ก/๐ข status for all required tools (Salesforce CLI, Code Analyzer plugin, Node.js, NPM, Git, Salesforce MCP, Source Tracking) and offers to install or update missing/outdated items. TRIGGER when the user runs /salesforce-development:platform-environment-validate, asks to 'check my setup', 'validate tools', 'verify prerequisites', 'am I set up correctly', or reports that a tool is missing or not working. DO NOT TRIGGER for: org authentication issues (use /salesforce-development:login), deployment problems (use platform-metadata-deploy), or general status checks (use /salesforce-development:status)."
allowed-tools:
- Bash
- Read
Validating: Salesforce Development Environment
Validate all required prerequisites and surface a clear, actionable status report. This skill is on-demand โ it does not run automatically on session start. Run it explicitly to check or repair your local setup.
Phase 1: Prerequisite Scan
Run the tool check:
${CLAUDE_PLUGIN_ROOT}/scripts/sf-context check-toolsThe output is a JSON object with a `tools` array. Parse it and render a status report grouped by severity:
=========================
๐ด Critical (N):
<tool>: <message>
๐ก Warnings (N):
<tool>: <message>
๐ข Successfully Configured (N):
<tool> <version>
โน๏ธ Informational (N):
<tool>: <message>
=========================
**Status definitions:**
- ๐ด Critical (`critical`) โ tool is missing or below minimum version; Salesforce development cannot proceed without it
- ๐ก Warning (`warn`) โ tool is installed but on an old version, non-LTS release, or has a configuration issue
- ๐ข OK (`ok`) โ tool is installed and meets all requirements
- โน๏ธ Info (`info`) โ not a problem; a contextual note that cannot be auto-verified (e.g. MCP process health). Informational rows do **not** count against an "all green" result.
A setup is "all green" when there are no ๐ด or ๐ก rows; โน๏ธ rows are expected and fine.
**Deterministic results โ do NOT override a failure:** the JSON report is the authoritative, machine-readable result. If a tool reports ๐ด/๐ก, report it as-is. Do **not** re-run the tool a different way (PowerShell, a raw shell probe, a different command) and then present the result as ๐ข โ a fallback that happens to find the tool does **not** mean the deterministic check passed. A failed check must stay failed until that **same** `check-tools` check passes. When the report includes a `diagnostic` block (attached on any critical failure), surface it: it carries the platform, active shell, working directory, plugin root, and the **resolved executable paths** โ the fastest way to see why a tool didn't resolve (e.g. a Windows `sf.cmd` not on `PATH`). The diagnostic is secret-free by design; never add tokens or org auth to it.
**MCP is reported as three distinct rows โ never inferred from one another:** `Salesforce MCP (config)` (is `.mcp.json` + the `sf-mcp-proxy.bundled.js` present?), `Salesforce MCP (endpoint)` (is the platform endpoint reachable?), and `Salesforce MCP (process)` (is the MCP process actually healthy?). The process row is reported as โน๏ธ **informational** (not a warning) โ this script cannot see the MCP subprocess that Claude Code owns, so a green config/endpoint must **not** be presented as a working MCP. Confirm process health with `/mcp` or `/doctor`. The endpoint row probes the org **instance URL** as a connectivity proxy, not the platform-MCP endpoint itself.
Tools Checked
| Tool | Minimum Requirement | Verification | |---|---|---| | Salesforce CLI | Present, and on the latest release | `sf --version` (๐ก when an update is available) | | Code Analyzer plugin | Installed **or** JIT-registered | `sf plugins inspect @salesforce/plugin-code-analyzer`, falling back to the CLI's `oclif.jitPlugins` registry | | Node.js | >= 18 (even/LTS) | `node --version` | | NPM | >= 3.10 | `npm --version` | | Git | Must be present | `git --version` | | Salesforce MCP (config) | `.mcp.json` configured + proxy bundle present | Plugin root `.mcp.json` check + `sf-mcp-proxy.bundled.js` presence | | Salesforce MCP (endpoint) | Org instance URL reachable (connectivity proxy) | HTTP probe of org instance URL | | Salesforce MCP (process) | โน๏ธ informational โ not verifiable here | Confirm with `/mcp` or `/doctor` | | Source Tracking | Enabled for connected org | `sf project deploy preview` |
All external tools (`sf`, `npm`, `node`, `git`) are launched through a single cross-platform resolver: `shutil.which` (PATHEXT-aware) finds the tool, and a Windows `.cmd`/`.bat` shim (`sf.cmd`, `npm.cmd`) is invoked via a COMSPEC-wrapped argv array โ never a shell string โ so this scan and `/salesforce-development:org` detect `sf`/`npm`/the default org correctly on Windows, macOS, and Linux.
**Code Analyzer is a JIT plugin โ registered โ installed.** The Salesforce CLI declares `@salesforce/plugin-code-analyzer` as a "just-in-time" (JIT) plugin: it is only physically installed the first time a `sf code-analyzer` command runs. Until then, `sf plugins inspect` **fails** for it even though it is fully available to the user. The check therefore treats JIT registration as success โ if `inspect` returns no version, it falls back to the CLI's own `oclif.jitPlugins` registry (read from the root entry of `sf plugins --json`) and reports ๐ข with the pinned version and a note that it auto-installs on first use. Only a plugin that is neither installed nor JIT-registered is ๐ด critical.
Phase 2: Install / Update
**If all green:** Confirm setup is complete. The user is ready to develop.
**If warnings or critical items exist:** Present the user with options:
Some tools need attention. What would you like to do?
[1] Fix all items
[2] Choose which items to fix
[3] Skip for now
For each tool the user wants to fix, provide the
Read more
name: platform-environment-validate description: "Validate and configure the local Salesforce development environment. Runs a prerequisite scan showing ๐ด/๐ก/๐ข status for all required tools (Salesforce CLI, Code Analyzer plugin, Node.js, NPM, Git, Salesforce MCP, Source Tracking) and offers to install or update missing/outdated items. TRIGGER when the user runs /salesforce-development:platform-environment-validate, asks to 'check my setup', 'validate tools', 'verify prerequisites', 'am I set up correctly', or reports that a tool is missing or not working. DO NOT TRIGGER for: org authentication issues (use /salesforce-development:login), deployment problems (use platform-metadata-deploy), or general status checks (use /salesforce-development:status)." allowed-tools: - Bash - Read
Validating: Salesforce Development Environment
Validate all required prerequisites and surface a clear, actionable status report. This skill is on-demand โ it does not run automatically on session start. Run it explicitly to check or repair your local setup.
Phase 1: Prerequisite Scan
Run the tool check:
${CLAUDE_PLUGIN_ROOT}/scripts/sf-context check-toolsThe output is a JSON object with a `tools` array. Parse it and render a status report grouped by severity:
========================= ๐ด Critical (N): <tool>: <message> ๐ก Warnings (N): <tool>: <message> ๐ข Successfully Configured (N): <tool> <version> โน๏ธ Informational (N): <tool>: <message> =========================
**Status definitions:**
- ๐ด Critical (`critical`) โ tool is missing or below minimum version; Salesforce development cannot proceed without it
- ๐ก Warning (`warn`) โ tool is installed but on an old version, non-LTS release, or has a configuration issue
- ๐ข OK (`ok`) โ tool is installed and meets all requirements
- โน๏ธ Info (`info`) โ not a problem; a contextual note that cannot be auto-verified (e.g. MCP process health). Informational rows do **not** count against an "all green" result.
A setup is "all green" when there are no ๐ด or ๐ก rows; โน๏ธ rows are expected and fine.
**Deterministic results โ do NOT override a failure:** the JSON report is the authoritative, machine-readable result. If a tool reports ๐ด/๐ก, report it as-is. Do **not** re-run the tool a different way (PowerShell, a raw shell probe, a different command) and then present the result as ๐ข โ a fallback that happens to find the tool does **not** mean the deterministic check passed. A failed check must stay failed until that **same** `check-tools` check passes. When the report includes a `diagnostic` block (attached on any critical failure), surface it: it carries the platform, active shell, working directory, plugin root, and the **resolved executable paths** โ the fastest way to see why a tool didn't resolve (e.g. a Windows `sf.cmd` not on `PATH`). The diagnostic is secret-free by design; never add tokens or org auth to it.
**MCP is reported as three distinct rows โ never inferred from one another:** `Salesforce MCP (config)` (is `.mcp.json` + the `sf-mcp-proxy.bundled.js` present?), `Salesforce MCP (endpoint)` (is the platform endpoint reachable?), and `Salesforce MCP (process)` (is the MCP process actually healthy?). The process row is reported as โน๏ธ **informational** (not a warning) โ this script cannot see the MCP subprocess that Claude Code owns, so a green config/endpoint must **not** be presented as a working MCP. Confirm process health with `/mcp` or `/doctor`. The endpoint row probes the org **instance URL** as a connectivity proxy, not the platform-MCP endpoint itself.
Tools Checked
| Tool | Minimum Requirement | Verification | |---|---|---| | Salesforce CLI | Present, and on the latest release | `sf --version` (๐ก when an update is available) | | Code Analyzer plugin | Installed **or** JIT-registered | `sf plugins inspect @salesforce/plugin-code-analyzer`, falling back to the CLI's `oclif.jitPlugins` registry | | Node.js | >= 18 (even/LTS) | `node --version` | | NPM | >= 3.10 | `npm --version` | | Git | Must be present | `git --version` | | Salesforce MCP (config) | `.mcp.json` configured + proxy bundle present | Plugin root `.mcp.json` check + `sf-mcp-proxy.bundled.js` presence | | Salesforce MCP (endpoint) | Org instance URL reachable (connectivity proxy) | HTTP probe of org instance URL | | Salesforce MCP (process) | โน๏ธ informational โ not verifiable here | Confirm with `/mcp` or `/doctor` | | Source Tracking | Enabled for connected org | `sf project deploy preview` |
All external tools (`sf`, `npm`, `node`, `git`) are launched through a single cross-platform resolver: `shutil.which` (PATHEXT-aware) finds the tool, and a Windows `.cmd`/`.bat` shim (`sf.cmd`, `npm.cmd`) is invoked via a COMSPEC-wrapped argv array โ never a shell string โ so this scan and `/salesforce-development:org` detect `sf`/`npm`/the default org correctly on Windows, macOS, and Linux.
**Code Analyzer is a JIT plugin โ registered โ installed.** The Salesforce CLI declares `@salesforce/plugin-code-analyzer` as a "just-in-time" (JIT) plugin: it is only physically installed the first time a `sf code-analyzer` command runs. Until then, `sf plugins inspect` **fails** for it even though it is fully available to the user. The check therefore treats JIT registration as success โ if `inspect` returns no version, it falls back to the CLI's own `oclif.jitPlugins` registry (read from the root entry of `sf plugins --json`) and reports ๐ข with the pinned version and a note that it auto-installs on first use. Only a plugin that is neither installed nor JIT-registered is ๐ด critical.
Phase 2: Install / Update
**If all green:** Confirm setup is complete. The user is ready to develop.
**If warnings or critical items exist:** Present the user with options:
Some tools need attention. What would you like to do? [1] Fix all items [2] Choose which items to fix [3] Skip for now
For each tool the user wants to fix, provide the
This repository provides a curated collection of Salesforce agent skills for building applications.
Repo: forcedotcom/sf-skills
Other skills on sf-skills.
- /agentforce-generate
Build, modify, optimize, debug, and deploy agents with Agentforce Agent Script. TRIGGER when: user creates, modifies, optimizes, or asks about .agent files or aiAuthoringBundle metadata; changes agent behavior, responses, or conversation logic; designs agent actions, tools,
Open skill - /agentforce-observe
Analyze production Agentforce agent behavior using session traces and Data Cloud. TRIGGER when: user queries STDM session data or Data Cloud trace records; investigates production agent failures, regressions, or performance issues; asks about session traces, conversation logs,
Open skill - /agentforce-test
Write, run, and analyze structured test suites for Agentforce agents โ functional AND security. TRIGGER when: user writes or modifies test spec YAML (AiEvaluationDefinition); runs sf agent test create, run, run-eval, or results commands; asks about test coverage strategy, metric
Open skill - /automation-flow-generate
Generate Salesforce Flows using the MCP tool execute_metadata_action. Use when the user asks to create, build, or generate a flow โ including Screen, Autolaunched, Record-Triggered (before/after-save), Scheduled. Also trigger for flow-like requests such as \"when a record is
Open skill - /dx-code-analyzer-configure
Set up, configure, and troubleshoot Salesforce Code Analyzer for any project. Handles installation, prerequisite checks, diagnosing broken setups, creating and editing code-analyzer.yml overrides, engine-specific settings, ignore patterns, severity overrides, and CI/CD pipeline
Open skill - /dx-code-analyzer-custom-rule-create
Create custom Code Analyzer rules for Regex (pattern matching), PMD (XPath/AST for Apex and metadata XML), and ESLint (LWC/JavaScript/TypeScript). Use when users want to enforce coding standards, ban patterns, detect hardcoded values, govern metadata, or add rules not in the
Open skill

