salesforce
Skill0 starsChanged 3 months agoMITView on GitHub
Architect Salesforce: multi-cloud design, integration patterns, governor limits and deployment. Use when developing Apex, Lightning Web Components, or Salesforce flows.
6 other projects use a version of this.
Adopted by
Most recently taken up by
- Shanksg/clawskillstheir own version, first seen Nov 1, 2026
- HybridAIOne/hybridclawtheir own version, first seen Oct 13, 2026
- PranavNagrecha/AwesomeSalesforceSkillstheir own version, first seen Sep 3, 2026
- apideck-libraries/api-skillstheir own version, first seen Aug 13, 2026
- enzoleonardi/claude-salesforce-skilltheir own version, first seen Mar 13, 2026
- refly-ai/refly-skillstheir own version, first seen Jan 25, 2026
Other versions6 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 6
- refly-ai/refly-skills★ 204same name
- HybridAIOne/hybridclaw★ 159same name
- PranavNagrecha/AwesomeSalesforceSkills★ 17same name
- enzoleonardi/claude-salesforce-skill★ 8same name
- apideck-libraries/api-skills★ 4same name
- Shanksg/clawskills★ 2same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository134 other files it gives its agents.
- accessibility-engineerSkill
- accessibility-fixSkill
- ai-data-remediation-engineerSkill
- ai-engineerSkill
- ai-eval-suite-builderSkill
- android-developerSkill
- api-designSkill
- api-lifecycle-engineerSkill
- appsec-architectSkill
- audit-readinessSkill
- authenticationSkill
- autonomous-optimization-architectSkill
- backend-architectSkill
- backend-buildSkill
- blockchain-security-auditorSkill
- branching-strategySkill
- bug-explainerSkill
- changelog-writerSkill
- change-notesSkill
- ci-cd-pipeline-builderSkill
- ci-pipelinesSkill
- cloud-costSkill
- cloud-security-architectSkill
- cloud-securitySkill
- codebase-mapSkill
- codebase-onboarding-engineerSkill
- code-comment-writerSkill
- code-reviewerSkill
- code-reviewSkill
- code-translatorSkill
- commerce-platformSkill
- compliance-auditorSkill
- composioSkill
- cron-job-plannerSkill
- database-optimizerSkill
- database-schema-designerSkill
- databaseSkill
- data-engineerSkill
- data-pipeline-architectSkill
- data-pipelinesSkill
- debuggingSkill
- debugging-strategistSkill
- dependency-auditSkill
- dependency-upgrade-auditorSkill
- deployment-checklistSkill
- deploymentSkill
- developer-platformSkill
- devops-automatorSkill
- ecommerce-cms-architectSkill
- email-intelligence-engineerSkill
- embedded-firmware-engineerSkill
- environment-setup-guideSkill
- error-boundary-designerSkill
- error-handlingSkill
- evidence-collectorSkill
- filament-optimizerSkill
- finops-engineerSkill
- firmwareSkill
- frontend-buildSkill
- frontend-developerSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 2 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 6 edited versions we read keep these.
2
Distinctive
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 26
Never write a SOQL query or DML operation (insert, update, delete) inside a for loop.
- Very specific: line 27
Always process records in batch collections (List<Account>, Set<Id>, Map<Id, Account>).
- Distinctive: line 31
Never create multiple triggers on the same object (execution order is non-deterministic).
- Very specific: line 44
Use the Lightning Data Service (LDS) wire adapters (@wire(getRecord)) to read and mutate Salesforce data with client-side caching and zero …
- Distinctive: line 51
Use scratch orgs for ephemeral feature development and testing:
“Common” is measured: kept by at least 6 in 10 of the 6 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
salesforce
Core Philosophy
Salesforce enterprise development is not clicking around Setup menus or writing single-record Apex scripts. Salesforce is a multi-tenant cloud environment governed by strict, unyielding runtime Governor Limits. An un-bulkified SOQL query inside a for loop or an unhandled recursion trigger will instantly crash production workflows. Architecting Salesforce requires rigorous bulkification patterns, decoupled trigger frameworks, Lightning Web Components (LWC), and automated Salesforce DX metadata deployments.
4-Step Salesforce Enterprise Architecture
Step 1: Governor Limits & Bulkification Discipline
- The Critical Limits (Synchronous Apex):
- Total SOQL queries: 100 max.
- Total DML statements: 150 max (max 10,000 records processed).
- Total heap size: 6MB.
- Maximum CPU execution time: 10,000ms (10 seconds).
- The Golden Rule of Bulkification:
- Never write a SOQL query or DML operation (
insert,update,delete) inside aforloop. - Always process records in batch collections (
List<Account>,Set<Id>,Map<Id, Account>).
- Never write a SOQL query or DML operation (
Step 2: Trigger Architecture & Separation of Concerns
- The One-Trigger-Per-Object Rule:
- Never create multiple triggers on the same object (execution order is non-deterministic).
- The Handler Framework Pattern:
- Triggers must contain zero business logic. Triggers only dispatch to a structured Handler class:
trigger AccountTrigger on Account (before insert, after update) { AccountTriggerHandler.handle(Trigger.new, Trigger.oldMap, Trigger.operationType); } - Implement recursion guards using static sets of IDs to prevent infinite trigger loops.
- Triggers must contain zero business logic. Triggers only dispatch to a structured Handler class:
Step 3: Modern Frontend with Lightning Web Components (LWC)
- LWC Architecture:
- Built on standard web components (Shadow DOM, Custom Elements, ECMAScript modern modules).
- Use the Lightning Data Service (LDS) wire adapters (
@wire(getRecord)) to read and mutate Salesforce data with client-side caching and zero custom Apex whenever possible.
- Asynchronous Apex for Heavy Workloads:
- Offload long-running computations to Queueable Apex or Batch Apex (
Database.Batchable) to expand governor limits (SOQL increases to 200, CPU to 60s).
- Offload long-running computations to Queueable Apex or Batch Apex (
Step 4: Salesforce DX & Metadata CI/CD
- Source-Driven Development:
- Store all metadata in version control (Git) in Salesforce DX source format (
force-app/main/default). - Use scratch orgs for ephemeral feature development and testing:
sf org create scratch -f config/project-scratch-def.json -a FeatureDevOrg sf project deploy start sf apex run test --code-coverage --result-format human
- Store all metadata in version control (Git) in Salesforce DX source format (
- Test Coverage Standards:
- Salesforce mandates 75% test coverage for production deployment; enforce 85%+ with meaningful asserts (test single record, bulk 200 records, and negative/permission failures).
Deliverable Format: Salesforce Architecture Spec (SFDC-SPEC.md)
# Salesforce Architecture Specification: [Feature / Module]
## 1. Data Model & Relationships
- **Objects Impacted**: `Account` (Standard), `Subscription__c` (Custom)
- **Relationship**: Master-Detail (`Subscription__c` -> `Account`)
- **Security**: Inherited sharing (`with sharing` enforced on all Apex classes)
## 2. Apex Trigger & Handler Design
```apex
public with sharing class SubscriptionTriggerHandler {
public static void handleAfterInsert(List<Subscription__c> newRecords) {
Set<Id> accountIds = new Set<Id>();
for (Subscription__c sub : newRecords) {
if (sub.AccountId__c != null) {
accountIds.add(sub.AccountId__c);
}
}
if (!accountIds.isEmpty()) {
recalculateAccountARR(accountIds);
}
}
}3. Governor Limit De-risking
- Bulk Testing: Test methods execute with 200 mock records to verify zero SOQL limit violations.
- Asynchronous Processing: Uses
Queueablejob for external HTTP callouts.
4. Deployment Checklist
- All Apex classes specify
with sharingorwithout sharing. - Test classes achieve >= 85% code coverage with
System.assertEquals(). - Scratch org deployment verifies zero metadata conflicts.
---
## Worked Example: Bulkified Opportunity ARR Rollup
- **Problem**: Legacy trigger fired individual SOQL queries per Opportunity line item, throwing `System.LimitException: Too many SOQL queries: 101` when importing bulk CSVs.
- **Refactor**: Replaced loop query with a single aggregated SOQL query grouped by Account ID stored in a `Map<Id, AggregateResult>`.
- **Result**: Successfully processed batches of 2,000 records in 1.2 seconds using only 3 SOQL queries.
---
## Verification Checklist
- [ ] Zero SOQL queries or DML statements reside inside `for` loops.
- [ ] Exactly one trigger per sObject, delegating to a structured Handler class.
- [ ] All Apex classes declare explicit sharing rules (`with sharing`).
- [ ] Apex test classes test bulk records ($\ge 200$ items) and verify assertions.
- [ ] Metadata deployed using Salesforce CLI (`sf project deploy start`) with clean git history.
---
## Anti-Patterns
- **SOQL in Loops**: Querying the database inside an iteration block, guaranteeing governor limit crashes in production.
- **Multiple Triggers per Object**: Creating 5 different triggers on `Contact`, leading to race conditions and debugging nightmares.
- **Hardcoding Record Type IDs**: Hardcoding 18-character Salesforce IDs instead of querying via DeveloperName or Schema describes.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.

