salesforce-crm
Skill4 starsChanged 9 months agoMITView on GitHub
How to read and write Salesforce data with the salesforce_mcp tools (whoami, list_objects, describe_object, soql_query, search_records, write_record, process_approval). Use for any question about Salesforce accounts, contacts, opportunities, cases, approvals or custom objects, and before any Salesforce write.
In this repository8 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- change-riskSkill
- customer360-correlationSkill
- meeting-prepSkill
- revenue-at-riskSkill
- servicenow-itsmSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 13
Identify the user only when needed: If the user says "my"/"me", reuse a UserId already in this conversation.
- Very specific: line 34
Always include LIMIT (default 20–50) unless the user explicitly asks for all rows.
- Very specific: line 55
Before ANY write_record or process_approval call, show the user the object, record (Id and Name), operation and exact field values, then …
- Distinctive: line 57
Never write on an implied or ambiguous request.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Salesforce CRM
Workflow
- Identify the user only when needed. If the user says "my"/"me", reuse a UserId
already in this conversation; otherwise call
whoamionce. Filter withOwnerId = '<UserId>'orCreatedById = '<UserId>'. - Find the object. Skip for well-known standard objects (Account, Contact,
Opportunity, Case, Lead, Task, Event, User). Otherwise call
list_objects(filter=...)and use thename(API name), never thelabel. - Learn the fields.
- Reads: skip
describe_objectwhen you only need common fields (Id, Name, CreatedDate, OwnerId, LastModifiedDate) or fields already seen in this conversation. Otherwise usemode="slim"(types,referenceTo,childRelationships) ormode="names"to only validate names. - Writes:
describe_object(mode="full")is REQUIRED every time — picklists and validation rules change.
- Reads: skip
- Execute.
soql_queryfor exact filters, joins and aggregates.search_records(SOSL) when the object is unknown or for fuzzy keyword search.write_record(operation=create|update|upsert|delete).process_approval(action=Submit|Approve|Reject).
- Summarize in plain language. Never dump raw JSON.
SOQL rules
- Always include
LIMIT(default 20–50) unless the user explicitly asks for all rows.max_recordsdefaults to 100, cap 500. - API names are PascalCase:
Account,OpportunityLineItem,Custom_Field__c. - Parent fields via dot notation:
SELECT Name, Account.Name FROM Opportunity. - Child subqueries use the
relationshipNamefromchildRelationships, not the object name:SELECT Name, (SELECT Subject FROM Cases) FROM Account. - Open opportunities and open cases:
IsClosed = false. - Date literals:
CloseDate = NEXT_N_DAYS:90,CreatedDate = LAST_N_DAYS:30. - Quote string values with single quotes; escape embedded quotes.
Error recovery
INVALID_FIELD/MALFORMED_QUERY: the error containsavailableFields(name,type,referenceTo). Fix the query from it and retry immediately — do NOT calldescribe_objectagain. If the field is absent, the org hides it; look for a path through the parent'schildRelationships.INSUFFICIENT_ACCESS: the user lacks permission. Say which object/field and stop.ENTITY_IS_DELETED: tell the user the record was deleted.UNABLE_TO_LOCK_ROW: retry once.- Explain any error in plain language before retrying.
Writes and approvals — mandatory confirmation
Before ANY write_record or process_approval call, show the user the object, record
(Id and Name), operation and exact field values, then wait for an explicit "yes".
Never write on an implied or ambiguous request. Never delete or reject without a
separate explicit confirmation.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

