salesforce-clilisted
Install: claude install-skill abdullahkhawer/devops-skills
# Salesforce CLI Skill
Use the org alias table and rules below when constructing all `sf` commands.
## Configuration
Update the table below with your Salesforce org aliases before using this skill:
| Environment | Org Alias |
|---|---|
| Production | `<your-prod-org-alias>` |
| Staging / Sandbox | `<your-sandbox-org-alias>` |
If the target org is unclear, ask the user before running any command.
### Prerequisites (one-time setup by user)
If not already authenticated, inform the user that setup is required and ask them to complete the following steps manually. Do not perform these steps yourself.
```bash
brew install sf
sf org login web --alias <your-org-alias> --instance-url <your-instance-url>
sf org list
```
## Command Format
Always pass `--target-org` explicitly — never rely on the default org:
```bash
sf <topic> <command> --target-org <org-alias> [options]
```
### Examples
```bash
# Query records (SOQL)
sf data query --query "SELECT Id, Name FROM Account LIMIT 10" --target-org <your-sandbox-org-alias>
# List installed metadata components
sf project retrieve start --metadata ApexClass --target-org <your-sandbox-org-alias>
```
## Available Commands
### Read-only (safe, no confirmation needed)
| Command | Description |
|---|---|
| `sf org list` | List authenticated orgs |
| `sf org display --target-org <alias>` | Show org details |
| `sf data query --query "<SOQL>"` | Run a SOQL query |
| `sf data get record --sobject <type> --record-id <id>` | Get a specifi