AcademyRulesDevelopment

Salesforce Apex rules

Salesforce development teams that want Cursor to write readable, testable Apex code in a consistent way.

  • Recommendedour rating
  • 40,892repository stars
  • CC0-1.0licence
  • 4 months agolast update
mkdir -p .cursor/rules && curl -fsSL https://raw.githubusercontent.com/PatrickJS/awesome-cursorrules/main/rules/salesforce-apex-cursorrules-prompt-file.mdc -o .cursor/rules/salesforce-apex.mdc
salesforce-apex.mdc

Loading the file...

What it does

A Cursor rules file that sets the assistant up as a senior Salesforce developer. It asks for a step by step pseudocode plan before code, and stresses testability, simplicity, readability and maintainability, with guidance such as using queueables instead of future methods for async work.

Use cases

  1. 01Plan an Apex class in pseudocode first
  2. 02Write queueable jobs with finalizers
  3. 03Refactor Apex code toward clearer patterns

Questions about
Salesforce Apex rules.

What is Salesforce Apex rules used for?

Salesforce development teams that want Cursor to write readable, testable Apex code in a consistent way. A Cursor rules file that sets the assistant up as a senior Salesforce developer. It asks for a step by step pseudocode plan before code, and stresses testability, simplicity, readability and maintainability, with guidance such as using queueables instead of future methods for async work.

How do I install Salesforce Apex rules?

Run this in your terminal: mkdir -p .cursor/rules && curl -fsSL https://raw.githubusercontent.com/PatrickJS/awesome-cursorrules/main/rules/salesforce-apex-cursorrules-prompt-file.mdc -o .cursor/rules/salesforce-apex.mdc

Is Salesforce Apex rules open source?

Yes. The code is on GitHub (PatrickJS/awesome-cursorrules) under the CC0-1.0 licence.

Is Salesforce Apex rules safe to use?

It passed our automatic scan for credential theft, hidden instructions and risky install commands. Third party open source software. Sabemos AI does not maintain it. Check the code and permissions before you connect it to company data.