Claude Skills
CollectionsCompareWorkflowsNominate
Sign inSign up
© 2026 Curated Agent Skills·Learn more about Agent Skills
Back to repository

sf-cli-execution

verified

Salesforce CLI (sf) usage for running SOQL queries, authentication, and handling output. Use when executing queries or managing Salesforce connections.

View on GitHub

Marketplace

grail-automation

grailautomation/claude-plugins

Plugin

salesforce-soql

integrations

Repository

grailautomation/claude-plugins

salesforce-soql/skills/sf-cli-execution/SKILL.md

Last Verified

February 3, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/grailautomation/claude-plugins/blob/main/salesforce-soql/skills/sf-cli-execution/SKILL.md -a claude-code --skill sf-cli-execution

Installation paths:

Claude
.claude/skills/sf-cli-execution/
Powered by add-skill CLI

Instructions

# Salesforce CLI Execution Guide

This skill covers using the `sf` CLI to run SOQL queries against Salesforce orgs.

## Prerequisites

- Salesforce CLI installed: `npm install -g @salesforce/cli`
- At least one authenticated org

## Quick Reference

| Command | Purpose |
|---------|---------|
| `sf org list` | List connected orgs |
| `sf org login web` | Authenticate new org |
| `sf data query` | Run SOQL query |
| `sf data export bulk` | Export large datasets |
| `sf sobject describe` | Get object schema |

## Running Queries

### Basic Query

```bash
sf data query --query "SELECT Id, Name FROM Account LIMIT 10" --target-org production
```

### With JSON Output (Recommended)

```bash
sf data query --query "SELECT Id, Name FROM Account" --target-org production --json
```

### Limit Output Size

```bash
sf data query --query "SELECT Id, Name FROM Account" --target-org production --json 2>&1 | head -100
```

## Detailed References

- [Authentication](authentication.md) - Login, org management, aliases
- [Output Formats](output-formats.md) - JSON, CSV, table formats
- [Error Handling](error-handling.md) - Common errors and solutions

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
1133 chars