agentleFS
ozgurkarahanozgurkarahan/salesforce-meta-tool-identity-propagation/skills/salesforce-crm/SKILL.md

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.

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
  1. Very specific:

    Identify the user only when needed: If the user says "my"/"me", reuse a UserId already in this conversation.

    line 13
  2. Very specific:

    Always include LIMIT (default 20–50) unless the user explicitly asks for all rows.

    line 34
  3. Very specific:

    Before ANY write_record or process_approval call, show the user the object, record (Id and Name), operation and exact field values, then …

    line 55
  4. Distinctive:

    Never write on an implied or ambiguous request.

    line 57

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Salesforce CRM

Workflow

  1. Identify the user only when needed. If the user says "my"/"me", reuse a UserId already in this conversation; otherwise call whoami once. Filter with OwnerId = '<UserId>' or CreatedById = '<UserId>'.
  2. Find the object. Skip for well-known standard objects (Account, Contact, Opportunity, Case, Lead, Task, Event, User). Otherwise call list_objects(filter=...) and use the name (API name), never the label.
  3. Learn the fields.
    • Reads: skip describe_object when you only need common fields (Id, Name, CreatedDate, OwnerId, LastModifiedDate) or fields already seen in this conversation. Otherwise use mode="slim" (types, referenceTo, childRelationships) or mode="names" to only validate names.
    • Writes: describe_object(mode="full") is REQUIRED every time — picklists and validation rules change.
  4. Execute.
    • soql_query for 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).
  5. 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_records defaults 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 relationshipName from childRelationships, 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 contains availableFields (name, type, referenceTo). Fix the query from it and retry immediately — do NOT call describe_object again. If the field is absent, the org hides it; look for a path through the parent's childRelationships.
  • 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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.