Use this skill when the user asks to scaffold, develop, or test a Salesforce CLI plugin. This skill covers best practices for using @salesforce/sf-plugins-core, including command structure, message handling, flag definitions, and testing strategies.
This skill enables an AI agent to scaffold, develop, and test Salesforce CLI (sf) plugins using modern standards and @salesforce/sf-plugins-core.
@salesforce/sf-plugins-core and TypeScript.messages/ directory.To create a new plugin, use the generator:
npx @salesforce/plugin-generator@latest
Follow the interactive prompts to set the plugin name, description, and author.
Commands should be placed in src/commands/<topic>/<name>.ts.
SfCommand<T> where T is the return type of the run method.import { SfCommand, Flags } from "@salesforce/sf-plugins-core";
import { Messages } from "@salesforce/core";
Messages.importMessagesDirectory(__dirname).public static readonly flags.public async run(): Promise<T>.this.log(), this.styledHeader(), this.table(), etc., for formatted output.Create a Markdown or JSON file in messages/<command>.md.
Reference messages in code using:
const messages = Messages.loadMessages('plugin-name', 'command-file');
// ...
summary: messages.getMessage('summary'),
@oclif/test and chai.@salesforce/core/lib/testSetup.npm test.npm run buildsf plugins link./bin/dev <command>summary and optionally a description.SfError for user-facing errors.run method returns a data structure that makes sense when the --json flag is used.SF_LOG_LEVEL and other standard environment variables.Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer