
Salesforce Apex Quality
github/awesome-copilotOfficial
Apex quality guardrails that block SOQL/DML in loops, enforce sharing and CRUD/FLS, and require PNB test coverage.
- skills.sh installs
- 886
- GitHub stars
- 41.4K
- last updated
- Aug 21, 2026
What it does
- Covers governor-limit checks, sharing declarations, CRUD/FLS enforcement, SOQL injection prevention, and modern Apex idioms
- Includes PNB test coverage rules (Positive, Negative, Bulk at 200 to 251 records) and a trigger architecture checklist
- Enforces that SOQL and DML never run inside loops and that every class declares
with sharing,without sharing, orinherited sharing - Designed for reviewing or generating Apex classes, trigger handlers, batch jobs, and test classes before deployment
Install
$ npx -y skills add github/awesome-copilot --skill salesforce-apex-quality -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Salesforce Apex Quality Guardrails
Apply these checks to every Apex class, trigger, and test file you write or review.
Step 1 — Governor Limit Safety Check
Scan for these patterns before declaring any Apex file acceptable:
SOQL and DML in Loops — Automatic Fail
// ❌ NEVER — causes LimitException at scale
for (Account a : accounts) {
List<Contact> contacts = [SELECT Id FROM Contact WHERE AccountId = :a.Id]; // SOQL in loop
update a; // DML in loop
}
// ✅ ALWAYS — collect, then query/update once
Set<Id> accountIds = new Map<Id, Account>(accounts).keySet();
Map<Id, List<Contact>> contactsByAccount = new Map<Id, List<Contact>>();
for (Contact c : [SELECT Id, AccountId FROM Contact WHERE AccountId IN :accountIds]) {
if (!contactsByAccount.containsKey(c.AccountId)) {
contactsByAccount.put(c.AccountId, new List<Contact>());
}
contactsByAccount.get(c.AccountId).add(c);
}
update accounts; // DML once, outside the loop
Rule: if you see [SELECT or Database.query, insert, update, delete, upsert, merge inside a for loop body — stop and refactor before proceeding.
Step 2 — Sharing Model Verification
Details
- Repository
- github.com/github/awesome-copilot
- Categories
- Code Review & Quality, Testing & QA, Security
- First seen
- May 16, 2026
More from github/awesome-copilot
All 293- Salesforce Flow Design839
- Github Release802
- Flowstudio Power Automate Monitoring788
- Flowstudio Power Automate Governance780
- Salesforce Component Standards770
- React18 Dep Compatibility767
- React18 Batching Patterns757
- React18 Legacy Context749
- Code Tour748
- From The Other Side Vega746
- React18 Lifecycle Patterns746
- React18 String Refs744
- React18 Enzyme To Rtl743
- Linkedin Post Formatter362
- Ui Screenshots216
- Data Breach Blast Radius110
- Sql Server Table Reconciliation106
- Aws Cloudwatch Investigation
- Aws Cost Optimize
- Aws Resource Health Diagnose
- Aws Well Architected Review
- Azure Well Architected Review
- Bug Reproduction Brief
- Incident Postmortem
Similar to Salesforce Apex Quality
More Code Review & Quality
sf-apexjaganpro/sf-skills1.6K installsGenerates and reviews Salesforce Apex code against a 150-point rubric, delegating non-Apex work elsewhere.
sql-code-reviewgithub/awesome-copilot15.7K installsUniversal SQL code review guide covering injection prevention, access control, performance, and anti-pattern detection across databases.
platform-apex-generateforcedotcom/sf-skills7.6K installsGenerates Apex classes, triggers, and refactors with bulkification, SOQL/DML guardrails, and sharing defaults baked in.
salesforce-flow-designgithub/awesome-copilot839 installsArchitectural guidance for choosing Salesforce Flow types and enforcing bulk-safe, fault-tolerant design before deployment.
salesforce-developmentmindrally/skills696 installsSalesforce guidance covering Apex, triggers, Lightning Web Components, SOQL, metadata, and test standards.
salesforce-developerjeffallan/claude-skills4.6K installsSalesforce development skill covering Apex, Lightning Web Components, SOQL, triggers, and DevOps with bulkification guardrails.