Platform Apex Generate
Generates Apex classes, triggers, and refactors with bulkification, SOQL/DML guardrails, and sharing defaults baked in.
- CCM score
- 71 of 100
- skills.sh installs
- 7.8K
- GitHub stars
- 1.2K
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers class authoring for services, selectors, domains, batch, queueable, schedulable, invocable, triggers, DTOs, and REST resources, plus code review of existing
.clsand.triggerfiles - Includes ApexDoc-commented class and
-meta.xmloutput, with templates read fromassets/and style examples fromreferences/ - Enforces hard stops for SOQL or DML inside loops, missing sharing keywords, hardcoded IDs, bare
@futuremethods, andSystem.debug()on main paths - Runs
dx-code-analyzer-runandsf apex run testbefore reporting, delegating test creation toplatform-apex-test-generate
Install
$ npx -y skills add forcedotcom/sf-skills --skill platform-apex-generate -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Generating Apex
Use this skill for production-grade Apex: new classes, selectors, services, async jobs,
invocable methods, and triggers; and for evidence-based review of existing .cls OR .trigger.
Required Inputs
Gather or infer before authoring:
- Class type (service, selector, domain, batch, queueable, schedulable, invocable, trigger, trigger action, DTO, utility, interface, abstract, exception, REST resource)
- Target object(s) and business goal
- Class name (derive using the naming table below)
- Net-new vs refactor/fix; any org/API constraints
- Deployment targets (default to runSpecifiedTests and use generated tests where applicable)
Defaults unless specified:
- Sharing:
with sharing(see sharing rules per type below) - Access:
public(useglobalonly when required by managed packages or@RestResource) - API version:
66.0(minimum version) - ApexDoc comments: yes
If the user provides a clear, complete request, generate immediately without unnecessary back-and-forth.
Workflow
Details
- Repository
- github.com/forcedotcom/sf-skills
- Category
- Backend & APIs
- First seen
- Jul 14, 2026
More from forcedotcom/sf-skills
All 78- Platform Apex Test Generate7.7K
- Platform Apex Test Run7.5K
- Platform Apex Logs Debug7.4K
- Platform Soql Query7.4K
- Platform Metadata Deploy7.3K
- Platform Metadata Retrieve7.2K
- Platform Custom Field Generate7.1K
- Platform Docs Get7K
- Platform Permission Set Generate7K
- Dx Code Analyzer Run6.9K
- Platform Custom Object Generate6.9K
- Automation Flow Generate6.8K
- Experience Lwc Generate6.7K
- Platform Validation Rule Generate6.5K
- Platform Flexipage Generate6.5K
- Dx Org Manage6.4K
- Platform Data Manage6.4K
- Platform Sharing Rules Generate6.4K
- Platform Metadata Api Context Get6.3K
- Design Systems Slds Apply6.3K
- Design Systems Slds Validate6.1K
- Platform Custom Tab Generate6.1K
- Agentforce Generate6.1K
- Dx Code Analyzer Configure6K
Similar to Platform Apex Generate
More Backend & APIssalesforce-apex-qualitygithub/awesome-copilot890 installsApex quality guardrails that block SOQL/DML in loops, enforce sharing and CRUD/FLS, and require PNB test coverage.
sf-apexjaganpro/sf-skills1.6K installsGenerates and reviews Salesforce Apex code against a 150-point rubric, delegating non-Apex work elsewhere.
platform-apex-test-generateforcedotcom/sf-skills7.7K installsUse this skill when creating new Apex test classes, improving test coverage, debugging and fixing failing Apex tests, running test execution and coverage analys
production-code-auditdavila7/claude-code-templates359 installsAutonomous whole-codebase audit that scans line-by-line and applies production-grade fixes across security, performance, and architecture.