[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6CMBTJT5FBW62MFDZ8V2B9G":3,"skill-same:01M6CMBTJT5FBW62MFDZ8V2B9G":87},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":37,"linkOnly":38,"markdownContent":39,"markdownBody":40,"frontMatter":41,"refName":54,"commitSha":55,"skillDirectory":56,"forksCount":57,"repositoryHtmlUrl":58,"repositoryHomepageUrl":6,"ownerHtmlUrl":59,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":60,"install":61,"resources":74},"01M6CMBTJT5FBW62MFDZ8V2B9G","salesforce",null,"Query and manage Salesforce CRM data via the Salesforce CLI (`sf`). Run SOQL\u002FSOSL queries, inspect object schemas, create\u002Fupdate\u002Fdelete records, bulk import\u002Fexport, execute Apex, deploy metadata, and make raw REST API calls.","kbarbel640-del\u002Fskills","kbarbel640-del","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F255315490?v=4","01M6CJPPQGCCESXMG3K7BBGQ5J","01M6CJPPX2PB2BCZERFVM2C2B3",1,"MIT","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Farvorco\u002Fsalesforce\u002FSKILL.md",[],[5,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36],"REST","manage","queries","export","install","execute","node","api","Tools","cli","data","developer","https","npm","update","run","delete","create","deploy","2026-11-10 10:12:30",false,"---\nname: salesforce\ndescription: \"Query and manage Salesforce CRM data via the Salesforce CLI (`sf`). Run SOQL\u002FSOSL queries, inspect object schemas, create\u002Fupdate\u002Fdelete records, bulk import\u002Fexport, execute Apex, deploy metadata, and make raw REST API calls.\"\nhomepage: https:\u002F\u002Fdeveloper.salesforce.com\u002Ftools\u002Fsalesforcecli\nmetadata: {\"clawdbot\":{\"emoji\":\"☁️\",\"requires\":{\"bins\":[\"sf\"]},\"install\":[{\"id\":\"npm\",\"kind\":\"node\",\"package\":\"@salesforce\u002Fcli\",\"bins\":[\"sf\"],\"label\":\"Install Salesforce CLI (npm)\"}]}}\n---\n\n# Salesforce Skill\n\nUse the Salesforce CLI (`sf`) to interact with Salesforce orgs. The CLI must be authenticated before use. Always add `--json` for structured output.\n\nIf the `sf` binary is not available, install it via npm (`npm install -g @salesforce\u002Fcli`) or download it from https:\u002F\u002Fdeveloper.salesforce.com\u002Ftools\u002Fsalesforcecli. After installing, authenticate immediately with `sf org login web` to connect to a Salesforce org.\n\n## Authentication and Org Management\n\n### Log in (opens browser)\n```bash\nsf org login web --alias my-org\n```\n\nOther login methods:\n```bash\n# JWT-based login (CI\u002Fautomation)\nsf org login jwt --client-id \u003Cconsumer-key> --jwt-key-file server.key --username user@example.com --alias my-org\n\n# Login with an existing access token\nsf org login access-token --instance-url https:\u002F\u002Fmycompany.my.salesforce.com\n\n# Login via SFDX auth URL (from a file)\nsf org login sfdx-url --sfdx-url-file authUrl.txt --alias my-org\n```\n\n### Manage orgs\n```bash\n# List all authenticated orgs\nsf org list --json\n\n# Display info about the default org (access token, instance URL, username)\nsf org display --json\n\n# Display info about a specific org\nsf org display --target-org my-org --json\n\n# Display with SFDX auth URL (sensitive - contains refresh token)\nsf org display --target-org my-org --verbose --json\n\n# Open org in browser\nsf org open\nsf org open --target-org my-org\n\n# Log out\nsf org logout --target-org my-org\n```\n\n### Configuration and aliases\n```bash\n# Set default target org\nsf config set target-org my-org\n\n# List all config variables\nsf config list\n\n# Get a specific config value\nsf config get target-org\n\n# Set an alias\nsf alias set prod=user@example.com\n\n# List aliases\nsf alias list\n```\n\n## Querying Data (SOQL)\n\nStandard SOQL queries via the default API:\n```bash\n# Basic query\nsf data query --query \"SELECT Id, Name, Email FROM Contact LIMIT 10\" --json\n\n# WHERE clause\nsf data query --query \"SELECT Id, Name, Amount, StageName FROM Opportunity WHERE StageName = 'Closed Won'\" --json\n\n# Relationship queries (parent-to-child)\nsf data query --query \"SELECT Id, Name, (SELECT LastName, Email FROM Contacts) FROM Account LIMIT 5\" --json\n\n# Relationship queries (child-to-parent)\nsf data query --query \"SELECT Id, Name, Account.Name FROM Contact\" --json\n\n# LIKE for text search\nsf data query --query \"SELECT Id, Name FROM Account WHERE Name LIKE '%Acme%'\" --json\n\n# Date filtering\nsf data query --query \"SELECT Id, Name, CreatedDate FROM Lead WHERE CreatedDate = TODAY\" --json\n\n# ORDER BY + LIMIT\nsf data query --query \"SELECT Id, Name, Amount FROM Opportunity ORDER BY Amount DESC LIMIT 20\" --json\n\n# Include deleted\u002Farchived records\nsf data query --query \"SELECT Id, Name FROM Account\" --all-rows --json\n\n# Query from a file\nsf data query --file query.soql --json\n\n# Tooling API queries (metadata objects like ApexClass, ApexTrigger)\nsf data query --query \"SELECT Id, Name, Status FROM ApexClass\" --use-tooling-api --json\n\n# Output to CSV file\nsf data query --query \"SELECT Id, Name, Email FROM Contact\" --result-format csv --output-file contacts.csv\n\n# Target a specific org\nsf data query --query \"SELECT Id, Name FROM Account\" --target-org my-org --json\n```\n\nFor queries returning more than 10,000 records, use Bulk API instead:\n```bash\nsf data export bulk --query \"SELECT Id, Name, Email FROM Contact\" --output-file contacts.csv --result-format csv --wait 10\nsf data export bulk --query \"SELECT Id, Name FROM Account\" --output-file accounts.json --result-format json --wait 10\n```\n\n## Text Search (SOSL)\n\nSOSL searches across multiple objects at once:\n```bash\n# Search for text across objects\nsf data search --query \"FIND {John Smith} IN ALL FIELDS RETURNING Contact(Name, Email), Lead(Name, Email)\" --json\n\n# Search in name fields only\nsf data search --query \"FIND {Acme} IN NAME FIELDS RETURNING Account(Name, Industry), Contact(Name)\" --json\n\n# Search from a file\nsf data search --file search.sosl --json\n\n# Output to CSV\nsf data search --query \"FIND {test} RETURNING Contact(Name)\" --result-format csv\n```\n\n## Single Record Operations\n\n### Get a record\n```bash\n# By record ID\nsf data get record --sobject Contact --record-id 003XXXXXXXXXXXX --json\n\n# By field match (WHERE-like)\nsf data get record --sobject Account --where \"Name=Acme\" --json\n\n# By multiple fields (values with spaces need single quotes)\nsf data get record --sobject Account --where \"Name='Universal Containers' Phone='(123) 456-7890'\" --json\n```\n\n### Create a record (confirm with user first)\n```bash\nsf data create record --sobject Contact --values \"FirstName='Jane' LastName='Doe' Email='jane@example.com'\" --json\n\nsf data create record --sobject Account --values \"Name='New Company' Website=www.example.com Industry='Technology'\" --json\n\n# Tooling API object\nsf data create record --sobject TraceFlag --use-tooling-api --values \"DebugLevelId=7dl... LogType=CLASS_TRACING\" --json\n```\n\n### Update a record (confirm with user first)\n```bash\n# By ID\nsf data update record --sobject Contact --record-id 003XXXXXXXXXXXX --values \"Email='updated@example.com'\" --json\n\n# By field match\nsf data update record --sobject Account --where \"Name='Old Acme'\" --values \"Name='New Acme'\" --json\n\n# Multiple fields\nsf data update record --sobject Account --record-id 001XXXXXXXXXXXX --values \"Name='Acme III' Website=www.example.com\" --json\n```\n\n### Delete a record (require explicit user confirmation)\n```bash\n# By ID\nsf data delete record --sobject Account --record-id 001XXXXXXXXXXXX --json\n\n# By field match\nsf data delete record --sobject Account --where \"Name=Acme\" --json\n```\n\n## Bulk Data Operations (Bulk API 2.0)\n\nFor large datasets (thousands to millions of records):\n\n### Bulk export\n```bash\n# Export to CSV\nsf data export bulk --query \"SELECT Id, Name, Email FROM Contact\" --output-file contacts.csv --result-format csv --wait 10\n\n# Export to JSON\nsf data export bulk --query \"SELECT Id, Name FROM Account\" --output-file accounts.json --result-format json --wait 10\n\n# Include soft-deleted records\nsf data export bulk --query \"SELECT Id, Name FROM Account\" --output-file accounts.csv --result-format csv --all-rows --wait 10\n\n# Resume a timed-out export\nsf data export resume --job-id 750XXXXXXXXXXXX --json\n```\n\n### Bulk import\n```bash\n# Import from CSV\nsf data import bulk --file accounts.csv --sobject Account --wait 10\n\n# Resume a timed-out import\nsf data import resume --job-id 750XXXXXXXXXXXX --json\n```\n\n### Bulk upsert\n```bash\nsf data upsert bulk --file contacts.csv --sobject Contact --external-id Email --wait 10\n```\n\n### Bulk delete\n```bash\n# Delete records listed in CSV (CSV must have an Id column)\nsf data delete bulk --file records-to-delete.csv --sobject Contact --wait 10\n```\n\n### Tree export\u002Fimport (for related records)\n```bash\n# Export with relationships into JSON tree format\nsf data export tree --query \"SELECT Id, Name, (SELECT Name, Email FROM Contacts) FROM Account\" --json\n\n# Export with a plan file (for multiple objects)\nsf data export tree --query \"SELECT Id, Name FROM Account\" --plan --output-dir export-data\n\n# Import from tree JSON files\nsf data import tree --files Account.json,Contact.json\n\n# Import using a plan definition file\nsf data import tree --plan Account-Contact-plan.json\n```\n\n## Schema Inspection\n\n```bash\n# Describe an object (fields, relationships, picklist values)\nsf sobject describe --sobject Account --json\n\n# Describe a custom object\nsf sobject describe --sobject MyCustomObject__c --json\n\n# Describe a Tooling API object\nsf sobject describe --sobject ApexClass --use-tooling-api --json\n\n# List all objects\nsf sobject list --json\n\n# List only custom objects\nsf sobject list --sobject custom --json\n\n# List only standard objects\nsf sobject list --sobject standard --json\n```\n\n## Execute Apex Code\n\n```bash\n# Execute Apex from a file\nsf apex run --file script.apex --json\n\n# Run interactively (type code, press Ctrl+D to execute)\nsf apex run\n\n# Run Apex tests\nsf apex run test --test-names MyTestClass --json\n\n# Get test results\nsf apex get test --test-run-id 707XXXXXXXXXXXX --json\n\n# View Apex logs\nsf apex list log --json\nsf apex get log --log-id 07LXXXXXXXXXXXX\n```\n\n## REST API (Advanced)\n\nMake arbitrary authenticated REST API calls:\n```bash\n# GET request\nsf api request rest 'services\u002Fdata\u002Fv62.0\u002Flimits' --json\n\n# List API versions\nsf api request rest '\u002Fservices\u002Fdata\u002F' --json\n\n# Create a record via REST\nsf api request rest '\u002Fservices\u002Fdata\u002Fv62.0\u002Fsobjects\u002FAccount' --method POST --body '{\"Name\":\"REST Account\",\"Industry\":\"Technology\"}' --json\n\n# Update a record via REST (PATCH)\nsf api request rest '\u002Fservices\u002Fdata\u002Fv62.0\u002Fsobjects\u002FAccount\u002F001XXXXXXXXXXXX' --method PATCH --body '{\"BillingCity\":\"San Francisco\"}' --json\n\n# GraphQL query\nsf api request graphql --body '{\"query\":\"{ uiapi { query { Account { edges { node { Name { value } } } } } } }\"}' --json\n\n# Custom headers\nsf api request rest '\u002Fservices\u002Fdata\u002Fv62.0\u002Flimits' --header 'Accept: application\u002Fxml'\n\n# Save response to file\nsf api request rest '\u002Fservices\u002Fdata\u002Fv62.0\u002Flimits' --stream-to-file limits.json\n```\n\n## Metadata Deployment and Retrieval\n\n```bash\n# Deploy metadata to an org\nsf project deploy start --source-dir force-app --json\n\n# Deploy specific metadata components\nsf project deploy start --metadata ApexClass:MyClass --json\n\n# Retrieve metadata from an org\nsf project retrieve start --metadata ApexClass --json\n\n# Check deploy status\nsf project deploy report --job-id 0AfXXXXXXXXXXXX --json\n\n# Generate a new Salesforce DX project\nsf project generate --name my-project\n\n# List metadata components in the org\nsf project list ignored --json\n```\n\n## Diagnostics\n\n```bash\n# Run CLI diagnostics\nsf doctor\n\n# Check CLI version\nsf version\n\n# See what is new\nsf whatsnew\n```\n\n## Common SOQL Patterns\n\n```sql\n-- Count records\nSELECT COUNT() FROM Contact WHERE AccountId = '001XXXXXXXXXXXX'\n\n-- Aggregate query\nSELECT StageName, COUNT(Id), SUM(Amount) FROM Opportunity GROUP BY StageName\n\n-- Date literals\nSELECT Id, Name FROM Lead WHERE CreatedDate = LAST_N_DAYS:30\n\n-- Subquery (semi-join)\nSELECT Id, Name FROM Account WHERE Id IN (SELECT AccountId FROM Contact WHERE Email LIKE '%@acme.com')\n\n-- Polymorphic lookup\nSELECT Id, Who.Name, Who.Type FROM Task WHERE Who.Type = 'Contact'\n\n-- Multiple WHERE conditions\nSELECT Id, Name, Amount FROM Opportunity WHERE Amount > 10000 AND StageName != 'Closed Lost' AND CloseDate = THIS_QUARTER\n```\n\n## Guardrails\n\n- **Always use `--json`** for structured, parseable output.\n- **Never create, update, or delete records** without explicit user confirmation. Describe the operation and ask before executing.\n- **Never delete records** unless the user explicitly requests it and confirms the specific record(s).\n- **Never bulk delete or bulk import** without user reviewing the file\u002Fquery and confirming.\n- Use `LIMIT` on queries to avoid excessive data. Start with `LIMIT 10` and increase if the user needs more.\n- For queries over 10,000 records, use `sf data export bulk` instead of `sf data query`.\n- When the user asks to \"find\" or \"search\" a single object, use SOQL `WHERE ... LIKE '%term%'`. When searching across multiple objects, use SOSL via `sf data search`.\n- Use `--target-org \u003Calias>` when the user has multiple orgs; ask which org if ambiguous.\n- If authentication fails or a session expires, guide the user through `sf org login web`.\n- Bulk API 2.0 has SOQL limitations (no aggregate functions like `COUNT()`). Use standard `sf data query` for those.\n- When describing objects (`sf sobject describe`), the JSON output can be very large. Summarize the key fields, required fields, and relationships for the user rather than dumping the raw output.\n","# Salesforce Skill\n\nUse the Salesforce CLI (`sf`) to interact with Salesforce orgs. The CLI must be authenticated before use. Always add `--json` for structured output.\n\nIf the `sf` binary is not available, install it via npm (`npm install -g @salesforce\u002Fcli`) or download it from https:\u002F\u002Fdeveloper.salesforce.com\u002Ftools\u002Fsalesforcecli. After installing, authenticate immediately with `sf org login web` to connect to a Salesforce org.\n\n## Authentication and Org Management\n\n### Log in (opens browser)\n```bash\nsf org login web --alias my-org\n```\n\nOther login methods:\n```bash\n# JWT-based login (CI\u002Fautomation)\nsf org login jwt --client-id \u003Cconsumer-key> --jwt-key-file server.key --username user@example.com --alias my-org\n\n# Login with an existing access token\nsf org login access-token --instance-url https:\u002F\u002Fmycompany.my.salesforce.com\n\n# Login via SFDX auth URL (from a file)\nsf org login sfdx-url --sfdx-url-file authUrl.txt --alias my-org\n```\n\n### Manage orgs\n```bash\n# List all authenticated orgs\nsf org list --json\n\n# Display info about the default org (access token, instance URL, username)\nsf org display --json\n\n# Display info about a specific org\nsf org display --target-org my-org --json\n\n# Display with SFDX auth URL (sensitive - contains refresh token)\nsf org display --target-org my-org --verbose --json\n\n# Open org in browser\nsf org open\nsf org open --target-org my-org\n\n# Log out\nsf org logout --target-org my-org\n```\n\n### Configuration and aliases\n```bash\n# Set default target org\nsf config set target-org my-org\n\n# List all config variables\nsf config list\n\n# Get a specific config value\nsf config get target-org\n\n# Set an alias\nsf alias set prod=user@example.com\n\n# List aliases\nsf alias list\n```\n\n## Querying Data (SOQL)\n\nStandard SOQL queries via the default API:\n```bash\n# Basic query\nsf data query --query \"SELECT Id, Name, Email FROM Contact LIMIT 10\" --json\n\n# WHERE clause\nsf data query --query \"SELECT Id, Name, Amount, StageName FROM Opportunity WHERE StageName = 'Closed Won'\" --json\n\n# Relationship queries (parent-to-child)\nsf data query --query \"SELECT Id, Name, (SELECT LastName, Email FROM Contacts) FROM Account LIMIT 5\" --json\n\n# Relationship queries (child-to-parent)\nsf data query --query \"SELECT Id, Name, Account.Name FROM Contact\" --json\n\n# LIKE for text search\nsf data query --query \"SELECT Id, Name FROM Account WHERE Name LIKE '%Acme%'\" --json\n\n# Date filtering\nsf data query --query \"SELECT Id, Name, CreatedDate FROM Lead WHERE CreatedDate = TODAY\" --json\n\n# ORDER BY + LIMIT\nsf data query --query \"SELECT Id, Name, Amount FROM Opportunity ORDER BY Amount DESC LIMIT 20\" --json\n\n# Include deleted\u002Farchived records\nsf data query --query \"SELECT Id, Name FROM Account\" --all-rows --json\n\n# Query from a file\nsf data query --file query.soql --json\n\n# Tooling API queries (metadata objects like ApexClass, ApexTrigger)\nsf data query --query \"SELECT Id, Name, Status FROM ApexClass\" --use-tooling-api --json\n\n# Output to CSV file\nsf data query --query \"SELECT Id, Name, Email FROM Contact\" --result-format csv --output-file contacts.csv\n\n# Target a specific org\nsf data query --query \"SELECT Id, Name FROM Account\" --target-org my-org --json\n```\n\nFor queries returning more than 10,000 records, use Bulk API instead:\n```bash\nsf data export bulk --query \"SELECT Id, Name, Email FROM Contact\" --output-file contacts.csv --result-format csv --wait 10\nsf data export bulk --query \"SELECT Id, Name FROM Account\" --output-file accounts.json --result-format json --wait 10\n```\n\n## Text Search (SOSL)\n\nSOSL searches across multiple objects at once:\n```bash\n# Search for text across objects\nsf data search --query \"FIND {John Smith} IN ALL FIELDS RETURNING Contact(Name, Email), Lead(Name, Email)\" --json\n\n# Search in name fields only\nsf data search --query \"FIND {Acme} IN NAME FIELDS RETURNING Account(Name, Industry), Contact(Name)\" --json\n\n# Search from a file\nsf data search --file search.sosl --json\n\n# Output to CSV\nsf data search --query \"FIND {test} RETURNING Contact(Name)\" --result-format csv\n```\n\n## Single Record Operations\n\n### Get a record\n```bash\n# By record ID\nsf data get record --sobject Contact --record-id 003XXXXXXXXXXXX --json\n\n# By field match (WHERE-like)\nsf data get record --sobject Account --where \"Name=Acme\" --json\n\n# By multiple fields (values with spaces need single quotes)\nsf data get record --sobject Account --where \"Name='Universal Containers' Phone='(123) 456-7890'\" --json\n```\n\n### Create a record (confirm with user first)\n```bash\nsf data create record --sobject Contact --values \"FirstName='Jane' LastName='Doe' Email='jane@example.com'\" --json\n\nsf data create record --sobject Account --values \"Name='New Company' Website=www.example.com Industry='Technology'\" --json\n\n# Tooling API object\nsf data create record --sobject TraceFlag --use-tooling-api --values \"DebugLevelId=7dl... LogType=CLASS_TRACING\" --json\n```\n\n### Update a record (confirm with user first)\n```bash\n# By ID\nsf data update record --sobject Contact --record-id 003XXXXXXXXXXXX --values \"Email='updated@example.com'\" --json\n\n# By field match\nsf data update record --sobject Account --where \"Name='Old Acme'\" --values \"Name='New Acme'\" --json\n\n# Multiple fields\nsf data update record --sobject Account --record-id 001XXXXXXXXXXXX --values \"Name='Acme III' Website=www.example.com\" --json\n```\n\n### Delete a record (require explicit user confirmation)\n```bash\n# By ID\nsf data delete record --sobject Account --record-id 001XXXXXXXXXXXX --json\n\n# By field match\nsf data delete record --sobject Account --where \"Name=Acme\" --json\n```\n\n## Bulk Data Operations (Bulk API 2.0)\n\nFor large datasets (thousands to millions of records):\n\n### Bulk export\n```bash\n# Export to CSV\nsf data export bulk --query \"SELECT Id, Name, Email FROM Contact\" --output-file contacts.csv --result-format csv --wait 10\n\n# Export to JSON\nsf data export bulk --query \"SELECT Id, Name FROM Account\" --output-file accounts.json --result-format json --wait 10\n\n# Include soft-deleted records\nsf data export bulk --query \"SELECT Id, Name FROM Account\" --output-file accounts.csv --result-format csv --all-rows --wait 10\n\n# Resume a timed-out export\nsf data export resume --job-id 750XXXXXXXXXXXX --json\n```\n\n### Bulk import\n```bash\n# Import from CSV\nsf data import bulk --file accounts.csv --sobject Account --wait 10\n\n# Resume a timed-out import\nsf data import resume --job-id 750XXXXXXXXXXXX --json\n```\n\n### Bulk upsert\n```bash\nsf data upsert bulk --file contacts.csv --sobject Contact --external-id Email --wait 10\n```\n\n### Bulk delete\n```bash\n# Delete records listed in CSV (CSV must have an Id column)\nsf data delete bulk --file records-to-delete.csv --sobject Contact --wait 10\n```\n\n### Tree export\u002Fimport (for related records)\n```bash\n# Export with relationships into JSON tree format\nsf data export tree --query \"SELECT Id, Name, (SELECT Name, Email FROM Contacts) FROM Account\" --json\n\n# Export with a plan file (for multiple objects)\nsf data export tree --query \"SELECT Id, Name FROM Account\" --plan --output-dir export-data\n\n# Import from tree JSON files\nsf data import tree --files Account.json,Contact.json\n\n# Import using a plan definition file\nsf data import tree --plan Account-Contact-plan.json\n```\n\n## Schema Inspection\n\n```bash\n# Describe an object (fields, relationships, picklist values)\nsf sobject describe --sobject Account --json\n\n# Describe a custom object\nsf sobject describe --sobject MyCustomObject__c --json\n\n# Describe a Tooling API object\nsf sobject describe --sobject ApexClass --use-tooling-api --json\n\n# List all objects\nsf sobject list --json\n\n# List only custom objects\nsf sobject list --sobject custom --json\n\n# List only standard objects\nsf sobject list --sobject standard --json\n```\n\n## Execute Apex Code\n\n```bash\n# Execute Apex from a file\nsf apex run --file script.apex --json\n\n# Run interactively (type code, press Ctrl+D to execute)\nsf apex run\n\n# Run Apex tests\nsf apex run test --test-names MyTestClass --json\n\n# Get test results\nsf apex get test --test-run-id 707XXXXXXXXXXXX --json\n\n# View Apex logs\nsf apex list log --json\nsf apex get log --log-id 07LXXXXXXXXXXXX\n```\n\n## REST API (Advanced)\n\nMake arbitrary authenticated REST API calls:\n```bash\n# GET request\nsf api request rest 'services\u002Fdata\u002Fv62.0\u002Flimits' --json\n\n# List API versions\nsf api request rest '\u002Fservices\u002Fdata\u002F' --json\n\n# Create a record via REST\nsf api request rest '\u002Fservices\u002Fdata\u002Fv62.0\u002Fsobjects\u002FAccount' --method POST --body '{\"Name\":\"REST Account\",\"Industry\":\"Technology\"}' --json\n\n# Update a record via REST (PATCH)\nsf api request rest '\u002Fservices\u002Fdata\u002Fv62.0\u002Fsobjects\u002FAccount\u002F001XXXXXXXXXXXX' --method PATCH --body '{\"BillingCity\":\"San Francisco\"}' --json\n\n# GraphQL query\nsf api request graphql --body '{\"query\":\"{ uiapi { query { Account { edges { node { Name { value } } } } } } }\"}' --json\n\n# Custom headers\nsf api request rest '\u002Fservices\u002Fdata\u002Fv62.0\u002Flimits' --header 'Accept: application\u002Fxml'\n\n# Save response to file\nsf api request rest '\u002Fservices\u002Fdata\u002Fv62.0\u002Flimits' --stream-to-file limits.json\n```\n\n## Metadata Deployment and Retrieval\n\n```bash\n# Deploy metadata to an org\nsf project deploy start --source-dir force-app --json\n\n# Deploy specific metadata components\nsf project deploy start --metadata ApexClass:MyClass --json\n\n# Retrieve metadata from an org\nsf project retrieve start --metadata ApexClass --json\n\n# Check deploy status\nsf project deploy report --job-id 0AfXXXXXXXXXXXX --json\n\n# Generate a new Salesforce DX project\nsf project generate --name my-project\n\n# List metadata components in the org\nsf project list ignored --json\n```\n\n## Diagnostics\n\n```bash\n# Run CLI diagnostics\nsf doctor\n\n# Check CLI version\nsf version\n\n# See what is new\nsf whatsnew\n```\n\n## Common SOQL Patterns\n\n```sql\n-- Count records\nSELECT COUNT() FROM Contact WHERE AccountId = '001XXXXXXXXXXXX'\n\n-- Aggregate query\nSELECT StageName, COUNT(Id), SUM(Amount) FROM Opportunity GROUP BY StageName\n\n-- Date literals\nSELECT Id, Name FROM Lead WHERE CreatedDate = LAST_N_DAYS:30\n\n-- Subquery (semi-join)\nSELECT Id, Name FROM Account WHERE Id IN (SELECT AccountId FROM Contact WHERE Email LIKE '%@acme.com')\n\n-- Polymorphic lookup\nSELECT Id, Who.Name, Who.Type FROM Task WHERE Who.Type = 'Contact'\n\n-- Multiple WHERE conditions\nSELECT Id, Name, Amount FROM Opportunity WHERE Amount > 10000 AND StageName != 'Closed Lost' AND CloseDate = THIS_QUARTER\n```\n\n## Guardrails\n\n- **Always use `--json`** for structured, parseable output.\n- **Never create, update, or delete records** without explicit user confirmation. Describe the operation and ask before executing.\n- **Never delete records** unless the user explicitly requests it and confirms the specific record(s).\n- **Never bulk delete or bulk import** without user reviewing the file\u002Fquery and confirming.\n- Use `LIMIT` on queries to avoid excessive data. Start with `LIMIT 10` and increase if the user needs more.\n- For queries over 10,000 records, use `sf data export bulk` instead of `sf data query`.\n- When the user asks to \"find\" or \"search\" a single object, use SOQL `WHERE ... LIKE '%term%'`. When searching across multiple objects, use SOSL via `sf data search`.\n- Use `--target-org \u003Calias>` when the user has multiple orgs; ask which org if ambiguous.\n- If authentication fails or a session expires, guide the user through `sf org login web`.\n- Bulk API 2.0 has SOQL limitations (no aggregate functions like `COUNT()`). Use standard `sf data query` for those.\n- When describing objects (`sf sobject describe`), the JSON output can be very large. Summarize the key fields, required fields, and relationships for the user rather than dumping the raw output.\n",{"name":5,"homepage":42,"metadata":43,"description":7},"https:\u002F\u002Fdeveloper.salesforce.com\u002Ftools\u002Fsalesforcecli",{"clawdbot":44},{"emoji":45,"install":46,"requires":52},"☁️",[47],{"id":31,"bins":48,"kind":24,"label":50,"package":51},[49],"sf","Install Salesforce CLI (npm)","@salesforce\u002Fcli",{"bins":53},[49],"main","e7e336ac628c3e3bd771aff1aaa469c93778f94a","skills\u002Farvorco\u002Fsalesforce",0,"https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del","2026-08-23 22:39:37",{"source":8,"skillName":5,"commands":62,"prompt":72,"zipAvailable":73},[63,66,69],{"tool":64,"command":65},"npx","npx skills add kbarbel640-del\u002Fskills --skill salesforce",{"tool":67,"command":68},"bunx","bunx skills add kbarbel640-del\u002Fskills --skill salesforce",{"tool":70,"command":71},"pnpm","pnpm dlx skills add kbarbel640-del\u002Fskills --skill salesforce","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Farvorco\u002Fsalesforce\u002FSKILL.md",true,[75,81],{"path":76,"resourceType":77,"resourceTypeDesc":78,"sizeBytes":79,"sourceHtmlUrl":80},"_meta.json","REFERENCE","参考文档",279,"https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Farvorco\u002Fsalesforce\u002F_meta.json",{"path":82,"resourceType":83,"resourceTypeDesc":84,"sizeBytes":85,"sourceHtmlUrl":86},"routing-eval.jsonl","OTHER","其他",1510,"https:\u002F\u002Fgithub.com\u002Fgarrytan\u002Fgbrain\u002Fblob\u002Fmaster\u002Fplugin-variants\u002Fgbrain-daily\u002Fskills\u002Fresearch-compendium\u002Frouting-eval.jsonl",[88,112,135,153,158,178],{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":37},"01M6G8J55967D6281ACMKAKTEQ","crowd-prompting","A marketplace where AI agents improve prompts, system instructions, tool descriptions, and other text-based content with domain expertise from real-world operations — and earn tokens for valuable contributions.","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fzzadrian\u002Fcrowd-prompting\u002FSKILL.md",[],[95,96,25,97,98,99,100,101,102,103,104,105,106,107,108,109,30,110,111],"crowd prompting","prompting","with","tokens","domain","world","prompts","operations","instructions","text","tool","system","improve","productivity","marketplace","content","ai agents",{"skillNo":113,"name":114,"nameZh":6,"description":115,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":116,"categories":117,"keywords":118,"publishedAt":37},"01M6G8J0PKPAYVET6BWE8W4C26","dilemm-ai","Compete in DilemmAI, the prisoner's dilemma AI arena at dilemm.ai. Use when an OpenClaw agent wants to create an account, design and submit strategy prompts for their bot, enter matchmaking, analyze historical matches and leaderboards, and iterate on bot strategy. Requires headless browser automation (no API available yet).","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fzyori\u002Fdilemm-ai\u002FSKILL.md",[],[119,25,120,121,122,123,35,124,125,126,127,128,129,130,131,132,133,101,134],"dilemm ai","arena","analyze","browser","openclaw agent","automation","browser automation","bot","openclaw","design","strategy","headless","compete","submit","matchmaking","use",{"skillNo":136,"name":137,"nameZh":6,"description":138,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":139,"categories":140,"keywords":141,"publishedAt":37},"01M6G8HWAF3K9SW7NP3Z83CPJ6","arxiv-paper-reviews","Interact with arXiv Crawler API to fetch papers, read reviews, and submit comments. Use when working with arXiv papers, fetching paper lists by date\u002Fcategory\u002Finterest, viewing paper details with comments, or submitting paper reviews via API at http:\u002F\u002F150.158.152.82:8000.","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fzxrys\u002Fweak-accept\u002FSKILL.md",[],[142,143,144,145,146,147,148,97,149,132,134,150,25,151,152],"arxiv paper reviews","reviews","arxiv","paper","crawler","papers","comments","fetch","read","http","via",{"skillNo":154,"name":137,"nameZh":6,"description":138,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":155,"categories":156,"keywords":157,"publishedAt":37},"01M6G8HQJ7N7WMY6YV7D7SSJ16","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fzxrys\u002Farxiv-paper-reviews\u002FSKILL.md",[],[145,144,143,142,152,147,148,97,146,132,134,149,150,25,151],{"skillNo":159,"name":160,"nameZh":6,"description":161,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":162,"categories":163,"keywords":164,"publishedAt":37},"01M6G8HM95Y64JNVFC2HN4E2BG","git-summary","Get a quick summary of the current Git repository including status, recent commits, branches, and contributors.","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fzweack\u002Fgit-summary\u002FSKILL.md",[],[165,166,167,168,169,170,171,172,173,174,175,176,177],"git","summary","git summary","commits","repository","win32","status","linux","contributors","true","quick","get","branches",{"skillNo":179,"name":180,"nameZh":6,"description":181,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":182,"categories":183,"keywords":184,"publishedAt":37},"01M6G8HGEGF05CNEJCGVYFSC4R","agent-constitution","Interact with AgentConstitution governance contracts on Base Sepolia. Check compliance, read rules, log actions, query governance state.","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fztsalexey\u002Fagent-constitution\u002FSKILL.md",[],[185,186,187,188,97,189,190,54,191,150,192,193,194,195,196,30,197,198,199],"agent constitution","constitution","contracts","tree","query","base","log","check","Rules","projects","compliance","actions","state","governance","github"]