.claude/skills/querying-salesforce/SKILL.md
Query and explore Salesforce CRM data including accounts, leads, opportunities, contacts, cases, campaigns, and products. Use when users mention salesforce, CRM, accounts, leads, opportunities, pipeline, contacts, cases, support tickets, campaigns, or need to search/query customer data.
npx skillsauth add Dbochman/dotfiles querying-salesforceInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Query and explore Salesforce CRM data via the sf CLI (Salesforce CLI).
# Requires: sf (Salesforce CLI)
sf org login web --alias nvcrm-dev --instance-url https://test.salesforce.com
Always include --target-org nvcrm-dev (or -o nvcrm-dev).
sf data query --query "SELECT Id, Name, Industry, Type FROM Account ORDER BY CreatedDate DESC LIMIT 20" -o nvcrm-dev
sf data query --query "SELECT Id, Name, Industry FROM Account WHERE Name LIKE '%nvidia%'" -o nvcrm-dev
sf data query --query "SELECT COUNT() FROM Account" -o nvcrm-dev
sf data query --query "SELECT Id, Name, Status, Company, Email FROM Lead ORDER BY CreatedDate DESC LIMIT 20" -o nvcrm-dev
sf data query --query "SELECT Id, Name, Company FROM Lead WHERE Status = 'Sales Qualified'" -o nvcrm-dev
sf data query --query "SELECT Status, COUNT(Id) cnt FROM Lead GROUP BY Status" -o nvcrm-dev
sf data query --query "SELECT Id, Name, StageName, Amount, CloseDate FROM Opportunity ORDER BY CreatedDate DESC LIMIT 20" -o nvcrm-dev
sf data query --query "SELECT Id, Name, Amount, CloseDate FROM Opportunity WHERE CloseDate = THIS_MONTH" -o nvcrm-dev
sf data query --query "SELECT Id, Name, Amount, StageName FROM Opportunity WHERE Amount > 100000 ORDER BY Amount DESC" -o nvcrm-dev
sf data query --query "SELECT Id, Name, Email, Account.Name FROM Contact ORDER BY CreatedDate DESC LIMIT 20" -o nvcrm-dev
sf data query --query "SELECT Id, Name, Email, Account.Name FROM Contact WHERE Name LIKE '%smith%'" -o nvcrm-dev
sf data query --query "SELECT Id, Subject, Status, Priority FROM Case ORDER BY CreatedDate DESC LIMIT 20" -o nvcrm-dev
sf data query --query "SELECT Id, Subject, Priority FROM Case WHERE Status != 'Closed' ORDER BY Priority" -o nvcrm-dev
sf data query --query "SELECT Id, Name, Status, StartDate FROM Campaign ORDER BY CreatedDate DESC LIMIT 20" -o nvcrm-dev
sf data query --query "SELECT Id, Name, IsActive FROM Product2 WHERE Name LIKE '%vGPU%'" -o nvcrm-dev
sf sobject list -o nvcrm-dev # List all objects
sf sobject describe --sobject Account -o nvcrm-dev # Describe fields
sf sobject list --sobject-type custom -o nvcrm-dev # Custom objects
# Get account, then related contacts, opportunities, and cases
sf data query --query "SELECT Id, Name, Industry, Type, Website FROM Account WHERE Id = '001xxx'" -o nvcrm-dev
sf data query --query "SELECT Id, Name, Email, Title FROM Contact WHERE AccountId = '001xxx'" -o nvcrm-dev
sf data query --query "SELECT Id, Name, StageName, Amount FROM Opportunity WHERE AccountId = '001xxx'" -o nvcrm-dev
sf data query --query "SELECT Id, Subject, Status, Priority FROM Case WHERE AccountId = '001xxx'" -o nvcrm-dev
sf data query --query "SELECT Id, Name, Company, Email, LeadSource FROM Lead WHERE Status = 'Sales Qualified' ORDER BY CreatedDate DESC LIMIT 50" -o nvcrm-dev
sf data query --query "SELECT Id, Name FROM Account WHERE Name LIKE '%CompanyName%'" -o nvcrm-dev
sf data query --query "SELECT StageName, COUNT(Id) cnt FROM Opportunity GROUP BY StageName" -o nvcrm-dev
sf data query --query "SELECT Id, Name, StageName, LastModifiedDate FROM Opportunity WHERE LastModifiedDate < LAST_N_DAYS:30 AND IsClosed = false" -o nvcrm-dev
CreatedDate = TODAY | THIS_WEEK | THIS_MONTH | LAST_N_DAYS:30
CreatedDate > 2024-01-01
Name LIKE '%keyword%'
Email LIKE '%nvidia.com'
SELECT Contact.Name, Contact.Email FROM Account
SELECT Account.Name FROM Contact WHERE AccountId != null
SELECT Status, COUNT(Id) FROM Lead GROUP BY Status
SELECT SUM(Amount) FROM Opportunity WHERE StageName = 'Closed Won'
nvcrm-dev is dev sandbox, not productionsf org login web --alias nvcrm-dev --instance-url https://test.salesforce.comdevelopment
Search the web for current information, news, facts, and answers. Use when asked questions about current events, needing to look something up, finding websites, researching topics, or when you need up-to-date information beyond your training data.
development
Summarize any URL, YouTube video, podcast, PDF, or file into concise text. Use when asked to read an article, summarize a link, get the gist of a video or podcast, extract content from a URL, or when you need to understand what a web page or document contains.
development
Play music via Spotify and control Google Home speakers. Use when asked to play music, songs, artists, playlists, podcasts, or control speakers/volume/audio.
testing
Create new OpenClaw skills, modify and improve existing skills, and measure skill performance with evals. Use when users want to create a skill from scratch, update or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. Also use when asked to "make a skill", "turn this into a skill", "improve this skill", or "test this skill".