forcedotcom avatar

Generating Apex

If you're writing Apex classes, triggers, batch jobs, or REST resources, this skill walks you through the full authoring workflow: gathering requirements, choosing the right pattern (service, selector, domain, trigger handler, etc.), generating code with proper sharing keywords and bulkification, creating tests via a separate skill, then running code analyzer and test execution before delivering a validation report. It enforces hard stops for common governor limit violations like SOQL in loops and skipping sharing declarations. The workflow is strict and sequential, which means you get production-grade code with ApexDoc and test coverage, but you'll need to provide clear context upfront about your class type and target objects. It leans heavily on templates and conventions, so it fits best in orgs that already follow layered architecture patterns.

skills.sh installs
4.2K
GitHub stars
1.2K
last updated
Aug 21, 2026

Install

$ npx -y skills add forcedotcom/sf-skills --skill generating-apex --agent claude-code

Installs into .claude/skills of the current project.

Files

If you're writing Apex classes, triggers, batch jobs, or REST resources, this skill walks you through the full authoring workflow: gathering requirements, choosing the right pattern (service, selector, domain, trigger handler, etc.), generating code with proper sharing keywords and bulkification, creating tests via a separate skill, then running code analyzer and test execution before delivering a validation report. It enforces hard stops for common governor limit violations like SOQL in loops and skipping sharing declarations. The workflow is strict and sequential, which means you get production-grade code with ApexDoc and test coverage, but you'll need to provide clear context upfront about your class type and target objects. It leans heavily on templates and conventions, so it fits best in orgs that already follow layered architecture patterns.

Browse the repository on GitHub

Sponsors

Details

Repository
github.com/forcedotcom/sf-skills
Categories
Backend & APIs, Git & Pull Requests, Code Review & Quality, Debugging, Automation & Workflows, Design & UI/UX
First seen
Jun 3, 2026

More from forcedotcom/sf-skills

All 158
1trailofbits avatarmermaid-to-proveriftrailofbits/skillsTranslates Mermaid sequenceDiagrams describing cryptographic protocols into ProVerif formal verification models (.pv files). Use when generating a ProVerif mode4.2Kskills.sh installs
2xixu-me avatarxgetxixu-me/xgetUse when tasks involve Xget URL rewriting, registry/package/container/API acceleration, integrating Xget into Git, download tools, package managers, container b4.2Kskills.sh installs
3vinvcn avatarresearchvinvcn/mattpocock-skills-zh-cn对照高可信一手来源调研问题,并把发现保存为仓库中的 Markdown 文件。适用于用户想调研主题、收集文档或 API 事实,或把阅读工作委托给后台代理时。4.2Kskills.sh installs
4giuseppe-trisciuoglio avatarunit-test-boundary-conditionsgiuseppe-trisciuoglio/developer-kitProvides edge case, corner case, boundary condition, and limit testing patterns for Java unit tests. Validates minimum/maximum values, null cases, empty collect4.2Kskills.sh installs
5dotnet avatarbuild-perf-baselinedotnet/skillsEstablish build performance baselines and apply systematic optimization techniques. USE FOR: diagnosing slow builds, establishing before/after measurements (col4.2Kskills.sh installs
6softaworks avatarreact-devsoftaworks/agent-toolkitThis skill should be used when building React components with TypeScript, typing hooks, handling events, or when React TypeScript, React 19, Server Components a4.2Kskills.sh installs