platform-apex-test-generate
A Salesforce skill for writing and fixing Apex test classes.
What the skill teaches
A Salesforce skill for writing and fixing Apex test classes. The agent gathers context about the code under test, generates a test class using a test data factory, @TestSetup methods, bulk tests with 251 or more records, mocks for callouts and clear assertions, then runs the tests with sf apex run test and works through failures in a disciplined loop. It applies to code such as triggers, service classes, controllers, batch and queueable jobs, and callouts, and covers coverage analysis and common anti-patterns to avoid. Production Apex and Jest tests for Lightning Web Components are covered by other skills. It uses the sf CLI.
Capabilities
- Generate Apex test classes with a test data factory
- Write bulk and negative tests
- Run Apex tests and read coverage
- Fix failing Apex tests
About
- Publisher
- Salesforce
- Tool
- Salesforce
Install
- Run this to add it to Any client:
npx skills add forcedotcom/sf-skills
What's inside
- assets/test-class-template.cls
- assets/test-data-factory-template.cls
- references/assertion-patterns.md
- references/async-testing.md
- references/mocking-patterns.md
- references/test-data-factory.md
MCP servers and skills can run code on your computer and act on your data. Review the source before installing.
Details
| Fact | Value | Source |
|---|---|---|
| Type | Skill | |
| Tool | Salesforce | |
| Publisher | Salesforce | source |
| Official status | OfficialSalesforce's developer documentation for its skills and plugins links to the forcedotcom/sf-skills repository | source |
| Needs an API key or sign-in | Not stated in its documentation | |
| Includes scripts | No | source |
| Platforms | Not stated in its documentation | |
| AI clients | Not stated in its documentation | |
| Licence | Apache-2.0 | source |
| Pricing | Not stated in its documentation | |
| Activity | Last commit Nov 6, 20261,156 GitHub starsDownload data not available (not on npm or PyPI) | source |
| Links | Repository |
Sources
- Skill file (SKILL.md)github.com/forcedotcom/sf-skillsNov 10, 2026
- README (README.md)github.com/forcedotcom/sf-skillsNov 13, 2026
- Licence file (LICENSE.txt)github.com/forcedotcom/sf-skills · Backs: Licence, PublisherNov 13, 2026
- Web pagedeveloper.salesforce.com · Backs: Official statusNov 13, 2026
- Folder in the repository (platform-apex-test-generate)github.com/forcedotcom/sf-skills · Backs: Includes scriptsNov 10, 2026
- GitHub repositorygithub.com/forcedotcom/sf-skills · Backs: Activity, LicenceNov 11, 2026