salesforce-cli-expert

Generate Salesforce CLI commands for authentication, SOQL queries, metadata retrieval, and deployments.

5|4|Updated Nov 9, 2025
One-click install
npx skills add https://github.com/takusaotome/claude-skills-library --skill salesforce-cli-expert
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: salesforce-cli-expert
Source: https://github.com/takusaotome/claude-skills-library/tree/main/skills/salesforce-cli-expert
Command: npx skills add https://github.com/takusaotome/claude-skills-library --skill salesforce-cli-expert

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

It removes the guesswork and syntax errors involved in generating the right Salesforce CLI (sf/sfdx) commands for authentication, SOQL querying, metadata retrieval, and deployments—especially for security and auditing tasks.

Core Features & Use Cases

  • Salesforce CLI command generation: Produces precise command syntax for common org operations, including authentication flows, org listing/display, and targeting orgs/aliases.
  • SOQL query assistance: Creates correct sf data query invocations with JSON/CSV output, bulk querying patterns, and security-focused query examples (profiles, permission set assignments, MFA-related checks).
  • Metadata retrieval and deployment: Generates commands to retrieve security-related metadata (SecuritySettings, SharingRules, Profile, PermissionSet, Role) and deploy configuration changes with validation and test-level controls.
  • Automation-ready patterns: Recommends JSON-output usage and supports CI/CD automation practices (JWT auth, manifest/package.xml workflows, and scripting integration).

Quick Start

Ask for the exact command to retrieve SecuritySettings and SharingRules for a given org alias using Salesforce CLI in JSON-friendly automation output.

Frequently Asked Questions about salesforce-cli-expert

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate Salesforce CLI commands for retrieving security metadata like profiles and permission sets?

You generate Salesforce CLI commands to retrieve security metadata by using manifest/package.xml-based retrieval targeting components like SecuritySettings, SharingRules, Profile, and PermissionSet, with JSON or CSV output flags for automation-friendly results.

What's the best way to authenticate to a Salesforce org for CI/CD automation?

Authenticating to a Salesforce org for CI/CD automation is best achieved using JWT-based authentication flows, which enable headless, secure login to target orgs via Salesforce CLI without interactive browser prompts.

Can I run SOQL queries with Salesforce CLI and export the results to JSON or CSV?

Yes, you can run SOQL queries using Salesforce CLI and export the results to JSON or CSV by applying sf data query commands with specific output flags, including bulk querying patterns for large datasets.

How do I deploy configuration changes safely using Salesforce CLI?

To deploy configuration changes safely using Salesforce CLI, you apply check-only and test-level flags during deployment, which validates metadata changes against the target org without committing actual changes.

Does Salesforce CLI support retrieving org-wide security settings for auditing purposes?

Salesforce CLI supports retrieving org-wide security settings for auditing by generating commands to extract SecuritySettings metadata from a target org using manifest-based retrieval patterns.

Why does my Salesforce CLI metadata deployment fail validation in CI/CD pipelines?

Your Salesforce CLI metadata deployment validation may fail in CI/CD pipelines when commands lack proper target-org targeting, miss check-only flags for safe testing, or use incorrect test-level controls required for the deployment context.