apex-class

Generate production-ready Apex classes for Salesforce development.

803|289|Updated Nov 7, 2025
One-click install
npx skills add https://github.com/forcedotcom/afv-library --skill apex-class
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: apex-class
Source: https://github.com/forcedotcom/afv-library/tree/main/skills/apex-development/apex-class
Command: npx skills add https://github.com/forcedotcom/afv-library --skill apex-class

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Generate production-ready Apex classes for Salesforce development, covering service layers, data selectors, domain logic, batch processing, queueable jobs, schedulable tasks, DTOs, wrappers, utilities, interfaces, abstract classes, and custom exceptions to accelerate enterprise builds.

Core Features & Use Cases

  • Generates Service, Selector, Domain, Batch, Queueable, Schedulable, DTO, Utility, Interface, Abstract, and Exception classes.
  • Enforces separation of concerns, bulkification, ApexDoc coverage, and robust error handling to ensure production-grade quality.
  • Designed for refactoring or extending existing Apex code and for building scalable server-side logic.

Quick Start

Provide the class type, name, and business requirements to generate your Apex class.

Frequently Asked Questions about apex-class

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

FAQPage Schema
How do I generate production-ready Apex classes for Salesforce?

To generate production-ready Apex classes, provide the class type, name, and business requirements. The tool outputs service, selector, domain, or batch Apex code following enterprise Salesforce best practices.

What is the best way to structure Apex code for scalability in Salesforce?

The best way to structure scalable Apex is by enforcing separation of concerns. This approach divides logic into service, selector, and domain layers to maintain enterprise server-side architecture.

How do I add ApexDoc comments and error handling to existing Apex code?

To add ApexDoc comments and robust error handling to existing Apex, apply this skill to refactor your code. It automatically enforces proper documentation and production-grade error handling.

Can I use this to create batch and queueable Apex jobs for bulk processing?

Yes, you can generate batch and queueable Apex jobs. The skill creates schedulable tasks and queueable classes that follow bulkification rules to efficiently process large Salesforce data sets.

Does the generated Apex code follow Salesforce bulkification best practices?

Yes, the generated Apex code follows Salesforce bulkification best practices. It ensures your service, selector, and domain classes handle multiple records efficiently to avoid governor limits.

What Apex class types can I generate for Salesforce development?

You can generate numerous Apex class types for Salesforce development, including DTO, wrapper, utility, interface, abstract, and custom exception classes to accelerate enterprise application builds.