apex-best-practices

Provide Apex code guidelines for secure Salesforce development and governor limits.

Updated Jul 2, 2026
One-click install
npx skills add https://github.com/padjei/SF_Agents --skill apex-best-practices
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: apex-best-practices
Source: https://github.com/padjei/SF_Agents/tree/main/.claude/skills/apex-best-practices
Command: npx skills add https://github.com/padjei/SF_Agents --skill apex-best-practices

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill ensures that Apex code follows industry best practices for security, performance, and maintainability.

Core Features & Use Cases

  • Security Best Practices: Identifies security issues such as improper sharing and unescaped SOQL queries.
  • Performance Tips: Offers bulkification guidance to optimize SOQL and DML operations.
  • Governor Limits: Provides a quick reference to Salesforce governor limits and how to manage them.
  • Integration Framework: Demonstrates the correct usage of the Industries Integration Framework.
  • Error Handling: Outlines robust error handling and logging techniques.
  • Test Isolation: Offers guidelines for writing isolated and effective test cases.
  • Use Case: A Salesforce developer can use this Skill to ensure their Apex code adheres to best practices, leading to more secure and efficient applications.

Quick Start

Review the Apex Best Practices Skill to improve your coding standards.

Frequently Asked Questions about apex-best-practices

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I avoid governor limits in Apex code?

To avoid governor limits in Apex code, you must bulkify SOQL and DML operations. This Skill provides performance optimization guidelines to ensure your code stays within Salesforce governor limits.

What are Salesforce Apex security best practices for SOQL and sharing?

Apex security best practices include applying proper sharing settings and escaping SOQL queries. This Skill identifies security vulnerabilities like improper sharing to ensure secure DML operations.

How do I write isolated test cases for Apex classes?

Writing isolated test cases for Apex requires following specific test isolation guidelines. This Skill outlines robust testing techniques to help you create effective and maintainable test coverage.

How do I handle errors and logging in Apex triggers?

Handling errors and logging in Apex involves implementing robust error handling techniques. This Skill provides guidelines for capturing exceptions and logging errors effectively within your Salesforce code.

Can I use the Industries Integration Framework with Apex?

Yes, you can use the Industries Integration Framework with Apex. This Skill demonstrates the correct usage and integration patterns required for the Industries Integration Framework in Salesforce.