salesforce
Query and manage Salesforce CRM data via the Salesforce CLI (`sf`). Run SOQL/SOSL queries, inspect object schemas, create/update/delete records, bulk import/export, execute Apex, deploy metadata, and make raw REST API calls.
What this skill does
# Salesforce Skill Use the Salesforce CLI (`sf`) to interact with Salesforce orgs. The CLI must be authenticated before use. Always add `--json` for structured output. If the `sf` binary is not available, stop and ask the user to install the Salesforce CLI using the repo's declared install metadata or the official Salesforce CLI guide. After the CLI is available, authenticate with `sf org login web` before touching org data. ## Safety Boundaries - Do not create, update, delete, deploy, or execute Apex without explicit user confirmation. - Do not reveal access tokens, auth URLs, refresh tokens, or verbose org-display output in chat. - Do not export data to files unless the user asked for a saved artifact or bulk workflow. - Do not target a production org by default when sandbox or staging access is available. ## Authentication and Org Management ### Log in (opens browser) ```bash sf org login web --alias my-org ``` Other login methods: ```bash # JWT-based login (CI/automation) sf org login jwt --client-id <consumer-key> --jwt-key-file server.key --username [email protected] --alias my-org # Login with an existing access token sf org login access-token --instance-url https://mycompany.my.salesforce.com # Login via SFDX auth URL (from a file) sf org login sfdx-url --sfdx-url-file authUrl.txt --alias my-org ``` ### Manage orgs ```bash # List all authenticated orgs sf org list --json # Display info about the default org (access token, instance URL, username) sf org display --json # Display info about a specific org sf org display --target-org my-org --json # Display with SFDX auth URL (sensitive - contains refresh token) sf org display --target-org my-org --verbose --json # Open org in browser sf org open sf org open --target-org my-org # Log out sf org logout --target-org my-org ``` ### Configuration and aliases ```bash # Set default target org sf config set target-org my-org # List all config variables sf config list # Get a specific config value sf config get target-org # Set an alias sf alias set [email protected] # List aliases sf alias list ``` ## Querying Data (SOQL) Standard SOQL queries via the default API: ```bash # Basic query sf data query --query "SELECT Id, Name, Email FROM Contact LIMIT 10" --json # WHERE clause sf data query --query "SELECT Id, Name, Amount, StageName FROM Opportunity WHERE StageName = 'Closed Won'" --json # Relationship queries (parent-to-child) sf data query --query "SELECT Id, Name, (SELECT LastName, Email FROM Contacts) FROM Account LIMIT 5" --json # Relationship queries (child-to-parent) sf data query --query "SELECT Id, Name, Account.Name FROM Contact" --json # LIKE for text search sf data query --query "SELECT Id, Name FROM Account WHERE Name LIKE '%Acme%'" --json # Date filtering sf data query --query "SELECT Id, Name, CreatedDate FROM Lead WHERE CreatedDate = TODAY" --json # ORDER BY + LIMIT sf data query --query "SELECT Id, Name, Amount FROM Opportunity ORDER BY Amount DESC LIMIT 20" --json # Include deleted/archived records sf data query --query "SELECT Id, Name FROM Account" --all-rows --json # Query from a file sf data query --file query.soql --json # Tooling API queries (metadata objects like ApexClass, ApexTrigger) sf data query --query "SELECT Id, Name, Status FROM ApexClass" --use-tooling-api --json # Output to CSV file sf data query --query "SELECT Id, Name, Email FROM Contact" --result-format csv --output-file contacts.csv # Target a specific org sf data query --query "SELECT Id, Name FROM Account" --target-org my-org --json ``` For queries returning more than 10,000 records, use Bulk API instead: ```bash sf data export bulk --query "SELECT Id, Name, Email FROM Contact" --output-file contacts.csv --result-format csv --wait 10 sf data export bulk --query "SELECT Id, Name FROM Account" --output-file accounts.json --result-format json --wait 10 ``` ## Text Search (SOSL) SOSL searches across multiple objects at once: ```bash # Search for text across objects sf data search --query "FIND {John Smith} IN ALL FIELDS RETURNING Contact(Name, Email), Lead(Name, Email)" --json # Search in name fields only sf data search --query "FIND {Acme} IN NAME FIELDS RETURNING Account(Name, Industry), Contact(Name)" --json # Search from a file sf data search --file search.sosl --json # Output to CSV sf data search --query "FIND {test} RETURNING Contact(Name)" --result-format csv ``` ## Single Record Operations ### Get a record ```bash # By record ID sf data get record --sobject Contact --record-id 003XXXXXXXXXXXX --json # By field match (WHERE-like) sf data get record --sobject Account --where "Name=Acme" --json # By multiple fields (values with spaces need single quotes) sf data get record --sobject Account --where "Name='Universal Containers' Phone='(123) 456-7890'" --json ``` ### Create a record (confirm with user first) ```bash sf data create record --sobject Contact --values "FirstName='Jane' LastName='Doe' Email='[email protected]'" --json sf data create record --sobject Account --values "Name='New Company' Website=www.example.com Industry='Technology'" --json # Tooling API object sf data create record --sobject TraceFlag --use-tooling-api --values "DebugLevelId=7dl... LogType=CLASS_TRACING" --json ``` ### Update a record (confirm with user first) ```bash # By ID sf data update record --sobject Contact --record-id 003XXXXXXXXXXXX --values "Email='[email protected]'" --json # By field match sf data update record --sobject Account --where "Name='Old Acme'" --values "Name='New Acme'" --json # Multiple fields sf data update record --sobject Account --record-id 001XXXXXXXXXXXX --values "Name='Acme III' Website=www.example.com" --json ``` ### Delete a record (require explicit user confirmation) ```bash # By ID sf data delete record --sobject Account --record-id 001XXXXXXXXXXXX --json # By field match sf data delete record --sobject Account --where "Name=Acme" --json ``` ## Bulk Data Operations (Bulk API 2.0) For large datasets (thousands to millions of records): ### Bulk export ```bash # Export to CSV sf data export bulk --query "SELECT Id, Name, Email FROM Contact" --output-file contacts.csv --result-format csv --wait 10 # Export to JSON sf data export bulk --query "SELECT Id, Name FROM Account" --output-file accounts.json --result-format json --wait 10 # Include soft-deleted records sf data export bulk --query "SELECT Id, Name FROM Account" --output-file accounts.csv --result-format csv --all-rows --wait 10 # Resume a timed-out export sf data export resume --job-id 750XXXXXXXXXXXX --json ``` ### Bulk import ```bash # Import from CSV sf data import bulk --file accounts.csv --sobject Account --wait 10 # Resume a timed-out import sf data import resume --job-id 750XXXXXXXXXXXX --json ``` ### Bulk upsert ```bash sf data upsert bulk --file contacts.csv --sobject Contact --external-id Email --wait 10 ``` ### Bulk delete ```bash # Delete records listed in CSV (CSV must have an Id column) sf data delete bulk --file records-to-delete.csv --sobject Contact --wait 10 ``` ### Tree export/import (for related records) ```bash # Export with relationships into JSON tree format sf data export tree --query "SELECT Id, Name, (SELECT Name, Email FROM Contacts) FROM Account" --json # Export with a plan file (for multiple objects) sf data export tree --query "SELECT Id, Name FROM Account" --plan --output-dir export-data # Import from tree JSON files sf data import tree --files Account.json,Contact.json # Import using a plan definition file sf data import tree --plan Account-Contact-plan.json ``` ## Schema Inspection ```bash # Describe an object (fields, relationships, picklist values) sf sobject describe --sobject Account --json # Describe a custom object sf sobject describe --sobject MyCustomObject__c --json # Describe a Tooling API object sf sobject describe --sobject ApexClass --use-tooling-api --json # List all objects sf sobject list --json # List only custom objects
Related in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only — no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.