agentleFS
MindrallyMindrally/skills/salesforce-development/SKILL.md

salesforce-development

Skill275 starsChanged 52 days agoApache-2.0View on GitHub

Expert guidance for Salesforce development including Apex, Lightning Web Components, and metadata best practices

5 other projects use a version of this.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

22 rules. 0 are common, 22 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 5 edited versions we read keep these.

  • 22

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use efficient SOQL queries and avoid SOQL queries inside loops

    line 16
  2. Distinctive:

    Follow Salesforce security best practices with proper CRUD and FLS checks

    line 18
  3. Distinctive:

    Use PascalCase for class names, camelCase for methods and variables

    line 19
  4. Distinctive:

    Use ApexDocs comments to document classes, methods, and complex code blocks

    line 21
  5. Distinctive:

    Follow the One Trigger Per Object pattern

    line 26
  6. Distinctive:

    Use trigger context variables (Trigger.new, Trigger.old, etc.) efficiently

    line 28
  7. Distinctive:

    Avoid logic that causes recursive triggers.

    line 29
  8. Distinctive:

    Document triggers and handler classes with ApexDocs comments

    line 32
  9. Distinctive:

    Use the @wire decorator to retrieve data efficiently

    line 37
  10. Distinctive:

    Use lightning-record-edit-form for record creation and updates

    line 41
  11. Distinctive:

    Use force:navigateToComponent for component navigation

    line 42
  12. Distinctive:

    Use lightning:availableForFlowScreens to enable Flow screen availability

    line 43
  13. Distinctive:

    Create necessary custom fields, objects, and relationships

    line 47
  14. Distinctive:

    Create custom metadata types for configuration data

    line 50
  15. Distinctive:

    Prefer existing objects and fields over creating new ones

    line 54
  16. Distinctive:

    Create Lightning Web Components only when specifically requested

    line 57
  17. Distinctive:

    Use selective queries with proper WHERE clauses

    line 61
  18. Distinctive:

    Use aggregate functions for summary calculations

    line 63
  19. Distinctive:

    Use indexed fields in WHERE clauses for performance

    line 65
  20. Distinctive:

    Test positive, negative, and bulk scenarios

    line 70
  21. Distinctive:

    Use @testSetup for efficient test data creation

    line 71
  22. Distinctive:

    Avoid SeeAllData=true in test classes

    line 72

“Common” is measured: kept by at least 6 in 10 of the 5 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.

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

Salesforce Development

You are an expert in Salesforce development, including Apex, Lightning Web Components (LWC), SOQL, and Salesforce metadata configuration.

Apex Code Guidelines

  • Separate concerns by moving reusable functions into utility classes
  • Use efficient SOQL queries and avoid SOQL queries inside loops
  • Implement error handling and create custom exception classes when needed
  • Follow Salesforce security best practices with proper CRUD and FLS checks
  • Use PascalCase for class names, camelCase for methods and variables
  • Maintain consistent code style with proper indentation and line spacing
  • Use ApexDocs comments to document classes, methods, and complex code blocks
  • Implement bulkification to handle large data volumes efficiently

Apex Triggers Standards

  • Follow the One Trigger Per Object pattern
  • Implement a trigger handler class to separate logic from the trigger itself
  • Use trigger context variables (Trigger.new, Trigger.old, etc.) efficiently
  • Avoid logic that causes recursive triggers; implement a static boolean flag
  • Bulkify trigger logic for efficient handling of large datasets
  • Apply before and after trigger logic appropriately based on requirements
  • Document triggers and handler classes with ApexDocs comments
  • Perform CRUD and FLS checks in trigger handler classes during DML operations

Lightning Web Component Requirements

  • Use the @wire decorator to retrieve data efficiently
  • Implement error handling and display user-friendly error messages using the lightning-card component
  • Utilize SLDS (Salesforce Lightning Design System) for consistent styling and layout
  • Implement accessibility features with proper ARIA attributes
  • Use lightning-record-edit-form for record creation and updates
  • Use force:navigateToComponent for component navigation
  • Use lightning:availableForFlowScreens to enable Flow screen availability

Metadata Generation

  • Create necessary custom fields, objects, and relationships
  • Set up field-level security and object permissions
  • Generate custom labels for internationalization
  • Create custom metadata types for configuration data

Code Generation Best Practices

  • Prefer existing objects and fields over creating new ones
  • Include comments explaining key design decisions only
  • Provide complete JavaScript, HTML, and CSS files with Apex classes
  • Create Lightning Web Components only when specifically requested

SOQL Best Practices

  • Use selective queries with proper WHERE clauses
  • Leverage relationship queries to reduce query count
  • Use aggregate functions for summary calculations
  • Implement query limits and pagination for large datasets
  • Use indexed fields in WHERE clauses for performance

Testing Requirements

  • Achieve minimum 75% code coverage (aim for 85%+)
  • Test positive, negative, and bulk scenarios
  • Use @testSetup for efficient test data creation
  • Avoid SeeAllData=true in test classes
  • Mock external callouts using HttpCalloutMock

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.