forcedotcom/sf-skills / plugins/builder/salesforce-development/skills/platform-data-manage
platform-data-manage
VerifiedSalesforce data operations with 130-point scoring. Use to create, update, delete, bulk import/export, generate test data, and clean up org records via sf CLI and anonymous Apex. TRIGGER on creating test data, bulk import/export, sf data CLI commands, data-factory patterns for Apex tests, or seeding/cleaning org records. DO NOT TRIGGER for SOQL query writing only (use platform-soql-query), Apex test execution (use platform-apex-test-run), or metadata deployment (use platform-metadata-deploy).
references/governor-limits-reference.md
View on GitHub<!-- Parent: platform-data-manage/SKILL.md -->
# Governor Limits Reference
Essential limits for Salesforce data operations.
## SOQL Limits
| Limit | Synchronous | Asynchronous |
|-------|-------------|--------------|
| Total queries | 100 | 200 |
| Rows retrieved | 50,000 | 50,000 |
| QueryLocator rows | N/A | 50,000,000 |
| Query timeout | 120 seconds | 120 seconds |
## DML Limits
| Limit | Synchronous | Asynchronous |
|-------|-------------|--------------|
| DML statements | 150 | 150 |
| Rows processed | 10,000 | 10,000 |
## CPU and Memory
| Limit | Synchronous | Asynchronous |
|-------|-------------|--------------|
| CPU time | 10,000 ms | 60,000 ms |
| Heap size | 6 MB | 12 MB |
## Bulk API Limits
| Limit | Value |
|-------|-------|
| Batches per 24 hours | 10,000 |
| Records per 24 hours | 10,000,000 |
| Max file size | 100 MB |
| Concurrent jobs | 100 |
## Staying Within Limits
### SOQL Best Practices
```apex
// BAD: Query in loop
for (Account acc : accounts) {
List<Contact> cons = [SELECT Id FROM Contact WHERE AccountId = :acc.Id]; // ❌
}
// GOOD: Single query with relationship
List<Account> accs = [
SELECT Id, (SELECT Id FROM Contacts)
FROM Account
WHERE Id IN :accountIds
]; // ✓
```
### DML Best Practices
```apex
// BAD: DML in loop
for (Account acc : accounts) {
update acc; // ❌
}
// GOOD: Bulk DML
update accounts; // ✓
```
## Monitoring Limits
```apex
System.debug('SOQL Queries: ' + Limits.getQueries() + '/' + Limits.getLimitQueries());
System.debug('DML Statements: ' + Limits.getDmlStatements() + '/' + Limits.getLimitDmlStatements());
System.debug('DML Rows: ' + Limits.getDmlRows() + '/' + Limits.getLimitDmlRows());
System.debug('CPU Time: ' + Limits.getCpuTime() + '/' + Limits.getLimitCpuTime());
System.debug('Heap Size: ' + Limits.getHeapSize() + '/' + Limits.getLimitHeapSize());
```
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, 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. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |