forcedotcom/sf-skills

platform-environment-validate

Validate and configure the local Salesforce development environment.

์†Œ์Šค ๋ณด๊ธฐ
์›๋ณธ Skill ๋ฌธ์„œ

์›๋ณธ ์ €์žฅ์†Œ์˜ ์ œ๋ชฉ, ์˜ˆ์‹œ, ์ฝ”๋“œ, ํ‘œ, ๋งํฌ, ์ด๋ฏธ์ง€๋ฅผ ์œ ์ง€ํ•ด ํ‘œ์‹œํ•ฉ๋‹ˆ๋‹ค.

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:

bash
${CLAUDE_PLUGIN_ROOT}/scripts/sf-context check-tools

The output is a JSON object with a tools array (plus a diagnostic block on any critical failure).

The banner is painted for you โ€” do not reproduce it. When check-tools runs, the plugin paints the framed "Ready to build on Salesforce?" banner deterministically on the visible channel โ€” one status row per tool, the footer verdict, and the wayfinding footer โ€” exactly like the SessionStart banner. It is a Tier-1 surface: read the JSON for your own understanding, but do NOT reproduce, redraw, or re-render the banner. Add only a short read of what the result means for the user, then go to Phase 2.

The painted banner looks like this (illustrative โ€” the version/message text in each row comes straight from the JSON: version for ๐ŸŸข, message + fix hint for ๐ŸŸก/๐Ÿ”ด, the note for โ„น๏ธ; the values below show the style, not fixed strings):

โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
 Ready to build on Salesforce?   checking your toolchainโ€ฆ
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
 ๐ŸŸข Salesforce CLI             v2.144.6
 ๐ŸŸข Code Analyzer              v5.14.0 ยท JIT, auto-installs on first use
 ๐ŸŸข Node.js                    v22.11.0 LTS
 ๐ŸŸข NPM                        v10.9.0
 ๐ŸŸข Git                        v2.50.1
 ๐ŸŸข Salesforce MCP (config)    .mcp.json + proxy present
 ๐ŸŸข Salesforce MCP (endpoint)  org instance reachable
 โ„น๏ธ  Salesforce MCP (process)   confirm with /mcp or /doctor
 ๐ŸŸข Source Tracking            enabled
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
 โœ“ toolchain ready                                (skill: platform-environment-validate)

Each row's status dot carries the state โ€” ๐Ÿ”ด critical (missing or below minimum โ€” Salesforce development cannot proceed), ๐ŸŸก warn (installed but outdated, non-LTS, or misconfigured), ๐ŸŸข ok, โ„น๏ธ info (a contextual note that can't be auto-verified, e.g. MCP process health) โ€” and the framed footer gives the verdict plus the single most relevant Next: step. The JSON status field is the source of truth per tool; use these states when you write your short read.

If the banner did not paint (an older Claude Code build, or a paint fallback), do not hand-render it from the JSON. Print it with the deterministic renderer instead:

bash
${CLAUDE_PLUGIN_ROOT}/scripts/sf-context readiness-banner

This reads the same scan result check-tools just recorded and prints the identical framed banner โ€” rows in fixed order, the footer verdict, and the "you don't memorize commands here" wayfinding footer with its Next: step โ€” so ordering, padding, counts, and next-step selection are decided once in the script, never re-derived by hand. The check-tools JSON stays the authoritative, machine-readable result.

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

ToolMinimum RequirementVerification
Salesforce CLIPresent, and on the latest releasesf --version (๐ŸŸก when an update is available)
Code Analyzer pluginInstalled or JIT-registeredsf plugins inspect @salesforce/plugin-code-analyzer, falling back to the CLI's oclif.jitPlugins registry
Node.js>= 18 (even/LTS)node --version
NPM>= 3.10npm --version
GitMust be presentgit --version
Salesforce MCP (config).mcp.json configured + proxy bundle presentPlugin 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 hereConfirm with /mcp or /doctor
Source TrackingEnabled for connected orgsf 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 correct install/update command for their OS. Do not run install commands automatically โ€” show the command and ask the user to confirm before running it.

Install / Update Commands by Tool

Salesforce CLI โ€” not installed:

bash
# macOS/Linux (npm)
npm install --global @salesforce/cli

# macOS (Homebrew)
brew install sf

Salesforce CLI โ€” update:

bash
sf update

Code Analyzer plugin โ€” not installed:

bash
sf plugins install @salesforce/plugin-code-analyzer

Code Analyzer plugin โ€” update:

bash
sf plugins update @salesforce/plugin-code-analyzer

Node.js โ€” not installed or below minimum:

bash
# macOS (nvm โ€” recommended, installs LTS)
nvm install --lts && nvm use --lts

# macOS (Homebrew)
brew install node

# Windows โ€” download from https://nodejs.org (LTS version)

NPM โ€” update:

bash
npm install --global npm@latest

Git โ€” not installed:

bash
# macOS (Xcode CLT)
xcode-select --install

# macOS (Homebrew)
brew install git

# Windows โ€” download from https://git-scm.com

Source Tracking โ€” not enabled:

bash
sf org enable tracking --target-org <alias>

Salesforce MCP โ€” misconfigured: If .mcp.json is missing or empty, reload the plugin:

/reload-plugins

Important Notes

  • After installing a tool that modifies PATH (Node.js, SF CLI), the user may need to exit and restart Claude Code for the change to take effect.
  • Source Tracking requires a connected org โ€” if no org is configured, prompt to run /salesforce-development:login first.
  • For org authentication issues (expired session, wrong org, INVALIDSESSIONID), run /salesforce-development:login instead of this skill.
  • SF CLI outdated โ†’ ๐ŸŸก in the readiness scan: readiness means latest. When the CLI's cached update check reports a newer release, check-tools reports the Salesforce CLI as ๐ŸŸก (installed but outdated) with the correct update command, rather than ๐ŸŸข. Unlike the session-start notice below, this warning ignores the per-version no-nag gate โ€” an explicit readiness scan always reports the factual state โ€” but it still honors the hard opt-out SFDX_SKIP_CLI_UPDATE_CHECK=1.
  • SF CLI update notice at session start: when the CLI reports an available update, the sf-context detect SessionStart hook surfaces it once and asks the agent to offer the update (sf update, or npm install --global @salesforce/cli@latest for npm-global installs). Declining or a failed update records a per-version no-nag gate (.sf/sf-cli-update-state.json) so the same version won't nag again, but a newer release will re-prompt. Set SFDX_SKIP_CLI_UPDATE_CHECK=1 to disable the check entirely.
๊ฐ™์€ ์ €์žฅ์†Œ์˜ Skills

๋” ๋งŽ์€ Skills

๋ชจ๋“  Skills
forcedotcom
์ปค๋ฎค๋‹ˆํ‹ฐ

agentforce-d360-analyze

Data Cloud 360ยฐ view of a single Agentforce session. TRIGGER when user asks to trace, inspect, summarize, or describe a specific Agentforce session by session id (Agent Session UUID 019dโ€ฆ or MessagingSession id 0Mwโ€ฆ). Also triggers on session discovery โ€” find/list/search sessions by time, agent, channel, outcome, or conversation text โ€” when the user has no session id yet. DO NOT TRIGGER for design-time architecture questions (use agentforce-architecture-analyze instead) or for runtime perf/latency/SLO questions that require platform telemetry beyond Data Cloud.

์„ค์น˜ ์ˆ˜
1
GitHub Stars
972
์—…๋ฐ์ดํŠธ
9์›” 7์ผ
forcedotcom
์ปค๋ฎค๋‹ˆํ‹ฐ

agentforce-generate

Build, modify, audit, repair, optimize, debug, and deploy agents with Agentforce Agent Script. TRIGGER when: user creates, reviews, or changes .agent files or aiAuthoringBundle metadata; asks to fix AgentScript, audit an existing agent, run an AgentScript health check, common-pitfall review, or baseline-versus-candidate repair loop; changes a response, action, subagent, route, state flow, or Agent Spec; previews, debugs, deploys, publishes, or tests agents; uses sf agent generate/preview/publish/test; or manages Agentforce MCP servers, tools, assets, or authentication. DO NOT TRIGGER when: Apex, Flow, Prompt Template, Experience Cloud, or general Salesforce CLI work is unrelated to Agent Script; or the primary input is a production session or trace ID rather than an agent artifact.

์„ค์น˜ ์ˆ˜
1
GitHub Stars
972
์—…๋ฐ์ดํŠธ
9์›” 7์ผ
forcedotcom
์ปค๋ฎค๋‹ˆํ‹ฐ

platform-quick-deploy

Deploy validated metadata to a Production Salesforce org without re-running tests. TRIGGER when the user wants to deploy to production, says 'quick deploy', 'promote', 'ship to prod', or has just validated and wants to push the change live. REQUIRES a recent sf project deploy validate job ID (โ‰ค10 days old, โ‰ค3 days for --use-most-recent). DO NOT TRIGGER for sandbox/scratch deploys (use platform-metadata-deploy) or unvalidated deploys (use platform-deploy-validate first).

์„ค์น˜ ์ˆ˜
1
GitHub Stars
972
์—…๋ฐ์ดํŠธ
9์›” 7์ผ
forcedotcom
์ปค๋ฎค๋‹ˆํ‹ฐ

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 selection, or custom evaluations; interprets test results or diagnoses test failures; asks about batch testing, regression suites, or CI/CD test integration; requests security testing, OWASP LLM Top 10, red-teaming, penetration testing, prompt-injection tests, a security grade, or a vulnerability assessment of an agent. DO NOT TRIGGER when: user creates, modifies, previews, or debugs .agent files (use agentforce-generate); deploys or publishes agents; writes Agent Script code; uses sf agent preview for development iteration; analyzes production session traces (use agentforce-observe); performs a static safety review of .agent file content (use agentforce-generate Section 15).

์„ค์น˜ ์ˆ˜
3
GitHub Stars
972
์—…๋ฐ์ดํŠธ
9์›” 7์ผ