
platform-apex-generate
Primary Apex authoring skill for class generation, refactoring, and review
by forcedotcomFree
Description
The platform-apex-generate skill helps an AI agent write production-grade Apex, the programming language of the Salesforce platform. It covers new classes of many kinds, including services, selectors, domain classes, batch, queueable and schedulable jobs, invocable methods, triggers, trigger actions, DTOs, REST resources and exceptions, as well as refactoring existing code and reviewing .cls and .trigger files with evidence. Before the agent writes code, the skill asks for or infers the class type, the object or objects involved and the business goal, the class name following the naming table, whether the work is new or a fix, and any org or API constraints. The default deployment target runs the specified tests and uses generated tests where they apply. Because the skill is marked as the primary Apex authoring skill, the description says it should activate whenever the user mentions Apex, .cls files, triggers or asks for a class. The skill is listed on skills.sh and is published in the forcedotcom sf-skills repository on GitHub, which is maintained by Salesforce and shows about 1.1K stars. Its security checks all passed. Test generated Apex in a sandbox org before you deploy it to production.…
Highlights
- Generates many kinds of Apex classes
- Refactors and reviews existing Apex
- Asks for class type, objects and goal first
- Naming table for class names
- Default deployment with specified tests
Ratings & Reviews
No ratings yet
Be the first to rate platform-apex-generate.
People also visit

generating-apex
Primary Apex authoring skill for class generation, refactoring, and review
platform-apex-generate FAQ
What does this skill do?
It guides an AI agent to write, refactor and review Apex classes and triggers for Salesforce.
How do I install it?
Run: npx skills add https://github.com/forcedotcom/sf-skills --skill platform-apex-generate
Which kinds of Apex does it cover?
Services, selectors, domain classes, batch, queueable, schedulable, invocable methods, triggers, trigger actions, DTOs, utilities, interfaces, exceptions and REST resources.
What does it ask before writing code?
The class type, the target objects and business goal, the class name, whether the work is new or a fix, and any org or API limits.
What are the security audit results?
Gen Agent Trust Hub Pass, Socket Pass, Snyk Pass.
What are the best platform-apex-generate alternatives?
Popular alternatives to platform-apex-generate include generating-apex, sf-apex and salesforce-developer. See all platform-apex-generate alternatives

