Skip to main content
Bring your team and maximize your impact at Dreamforce. Register three or more to unlock $999 passes.

Learn About Salesforce APIs, CLIs, and Skills

Learning Objectives

After completing this unit, you’ll be able to:

  • Describe the reason for an API-first approach.
  • Explain CLIs and agentic skill support.

An API-First Approach

Headless architecture is built on an API-first approach. An API-first approach means that Salesforce designs, builds, and exposes robust application programming interfaces (APIs) for its features. Core principles of an API-first approach include:

  • Decoupled architecture: Logic and data are isolated from the visual screen design providing additional flexibility to a user.
  • System of execution: The CRM operates as a backend engine for both human and agent interactions.
  • Agentic readiness: Clean, deterministic endpoints allow automated AI agents to execute tasks without needing a browser.
  • Developer flexibility: Teams can construct unique, composable front ends using identical underlying capabilities.

Salesforce offers specialized APIs covering data operations (REST/SOAP/Bulk), managing metadata (Metadata API), real-time events, and modern patterns (GraphQL,Named Queries). Choose the type of API based on your integration pattern and data volume needs.

The Salesforce developer portal includes comprehensive references with code samples, rate limits, and versioning information. Salesforce maintains official postman collections with preconfigured auth and sample requests. This accelerates API exploration and testing without writing code.

APIs are also classified by the products. For example, the Connect REST API provides programmatic access to Salesforce Search, B2B Commerce, and Experience Cloud.

Salesforce is prioritizing a complete and usable API surface with every feature, delivering error messages that are independent of the user interface so agents can act on them, comprehensive reference documentation, and the ability to plug into any interface through these tools.

Salesforce Command-Line Interface

Salesforce CLI is the primary command-line interface for interacting with Salesforce orgs from any terminal or IDE. Use it to create orgs, deploy and retrieve metadata, run Apex, query data, manage authentication, and script CI/CD workflows.

A robust, scriptable CLI is another key tool for developers, architects, and admins to access Salesforce without a browser. Salesforce CLI is based on oclif, an open-source framework for building command-line interfaces in Node.js. You can access the CLI from Agentforce Vibes, Claude, or Cursor.

For example, to install SF CLI in Agentforce Vibes, check to see if the Salesforce CLI extension is listed. Install the latest version of Salesforce CLI executable with this command:

npm install --global @salesforce/cli

The executable, sf, comes bundled with the Salesforce CLI extension. After you install the extension, in the Agentforce Vibes interface, run the following commands to find out the SF CLI version and list of supported commands:

sf --version
sf --help
sf commands

Then you can start working with Salesforce. For example, to list orgs you are connected to and the metadata types that are enabled in a specific org, run:

sf org list
sf org list metadata-types --api-version 57.0 --target-org my-dev-org

What Are Skills?

Skills are specialized capabilities that you can invoke from an AI assistant like Claude or Cursor. They are prebuilt workflows with domain expertise that extend what natural language queries can do. They are invoked in a standard way, “/skill-name” and are context aware. They use specialized knowledge, and are composable.

Skills turn common multistep workflows into single commands. For example, instead of “read files, analyze them, and write reports,” you can enter “/code-review”. The AI assistant automatically identifies changed files in your working directory, analyzes the changes with security and quality guidance, evaluates test coverage, and generates a report with recommendations. All of this happens with the domain expertise built in. So you don’t need to remember every review criteria or guide the AI assistant through each step.

Skills can be distributed as individual files in a repository with authenticated access to the repository or grouped together as plugins. A skills directory typically includes these files and directories.

  • A SKILL.md file: Contains the skill name, description and set of instructions for an agent to complete a task.
  • Reference files: Supplementary documents that extend a skill for an AI agent.
  • Scripts: Executable code files bundled in a skill directory to automate certain repetitive tasks, validate outputs, or process data.
  • Evals: Short for skill evaluations, they are systematic tests used to measure whether an AI agent triggers, follows, and executes the instructions or workflows.

The Skills directory must contain a SKILL.md file while the rest of the files are optional.

Salesforce has been working on a curated collection of agent skills with domain expertise for Salesforce development and implementation workflows. For the latest set of skills see the sf-skills GitHub repository. These skills are auto-installed and auto-enabled with Agentforce Vibes. You can also install these skills on any AI interface such as Claude or Cursor using the command:

npx skills add forcedotcom/sf-skills

Use Salesforce agent skills to build applications. The Salesforce skills library includes skills for components such as Lightning apps, Apex, Flow, or Data 360 functionality. These skills are optimized for the Agentforce Vibes environment but can be used with any AI interface.

For example, let’s look at the platform-sandbox-configure skill that helps manage Salesforce sandbox environments. Use the skill to list sandbox inventory, communicate the status of a specific sandbox, create a new sandbox, and refresh a sandbox with the latest production data.

When to Use the Tools

Each tool has its advantages and use cases.

  • MCP acts as a universal, OAuth-based connector, with a range of server types that all respect the standard security model. Use MCP servers and their standard capabilities to let an AI agent act on a Salesforce org securely.
  • The Salesforce API-first approach exposes robust, deterministic endpoints that let AI agents execute tasks without a browser. Use APIs to integrate Salesforce with third-party systems programmatically.
  • Salesforce scriptable CLIs provides developers, architects, and admins access to Salesforce from a terminal or any AI interface. Use CLIs to automate development or deployment tasks through scripts.
  • Skills package domain expertise into composable, reusable commands that turn complex multistep workflows into single actions. Use skills to give AI agents repeatable workflows to run with expertise and consistent outputs.

Summary

In this module, you explored how headless tools decouple the platform from any fixed UI, making every layer accessible to AI agents, models, and third-party tools. You learned about the four key technologies that power this approach—Model Context Protocol (MCP), APIs, CLIs, and Skills.

Together, these capabilities make Salesforce a fully accessible, agent-ready platform. You can build, integrate, and automate in whatever AI interface you choose.

Resources

Share your Trailhead feedback over on Salesforce Help.

We'd love to hear about your experience with Trailhead - you can now access the new feedback form anytime from the Salesforce Help site.

Learn More Continue to Share Feedback