Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

platform-apex-test-run

Skill by forcedotcom

Runs Apex tests, analyzes code coverage, and manages test-fix loops for Salesforce code. It is for developers who work on Apex unit tests and their failures.

  • Score 82
  • 1.2k stars
  • Apache-2.0
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install platform-apex-test-run

Built from the published package, never by AI.

git clone --depth 1 https://github.com/forcedotcom/sf-skills /tmp/sf-skills && mkdir -p ~/.claude/skills && cp -r /tmp/sf-skills/skills/platform-apex-test-run ~/.claude/skills/platform-apex-test-run

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install platform-apex-test-run in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

This skill covers Apex test execution and failure analysis for Salesforce code. It guides running tests with sf apex run test, starting with the smallest useful test set and widening only after a fix is stable. It also helps interpret failing methods, exception types and stack traces, and find uncovered lines and weak coverage areas.

The skill follows a structured test-fix loop. It adds or improves tests, reruns focused tests before broader regression, and includes test templates for basic, bulk (251+ records), mock callout and data factory patterns. Production Apex code changes are delegated to platform-apex-generate, while Agentforce agent tests and Jest or LWC tests are handed to other skills. It is aimed at developers working on Salesforce Apex tests.

Written from the project's SKILL.md and checked against it.

What it can do

  • Test executionRuns Apex tests with sf apex run test, starting with a narrow test set.
  • Failure analysisReviews failing methods, exception types and stack traces.
  • Coverage analysisIdentifies uncovered lines and weak coverage areas.
  • Test-fix loopAdds or improves tests and reruns focused tests before broader regression.
  • Test templatesProvides templates for basic, bulk, mock callout and data factory test classes.
  • Test scoringIncludes a 120-point scoring guide for test suite confidence.

What you need

  • Salesforce CLI (sf) 2.0.0 or later
  • Python 3.10 or later
  • jq 1.6.0 or later
  • A target Salesforce org alias

Try asking

  • Run the Apex tests for AccountService and report coverage gaps
  • Fix the failing tests in AccountServiceTest and rerun them
  • Check code coverage for my Apex classes in the dev org

Good to know

  • Does not write production Apex code; that is delegated to platform-apex-generate.
  • Does not handle Agentforce agent testing, which goes to agentforce-test.
  • Does not handle Jest or LWC tests, which go to experience-lwc-generate.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: skills/platform-apex-test-run/SKILL.md, skills/platform-apex-test-run/scripts/parse-test-results.py. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • README.md3 KB
  • SKILL.md7 KB
  • assets/basic-test.cls13 KB
  • assets/bulk-test.cls11 KB
  • assets/dml-mock.cls13 KB
Show all 15 files
  • assets/mock-callout-test.cls14 KB
  • assets/stub-provider-example.cls12 KB
  • assets/test-data-factory.cls14 KB
  • references/cli-commands.md6 KB
  • references/mocking-patterns.md13 KB
  • references/performance-optimization.md7 KB
  • references/test-fix-loop.md2 KB
  • references/test-patterns.md4 KB
  • references/testing-best-practices.md16 KB
  • scripts/parse-test-results.py13 KB

Alternatives to platform-apex-test-run

All alternatives →
openclaw-github-repo-commandersickn33
94

Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.

AAA Skill 50k
gradiogradio-app
94

Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.

AAA Skill 44k
hig-components-menussickn33
94

Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.

AAA Skill 50k
fastapi-templateswshobson
94

Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.

AAA Skill 43k
appfunctionsandroid
94

Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.

AAA Skill 11k
agent-qa-authoringsickn33
94

Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.

AAA Skill 50k

Compare with openclaw-github-repo-commander, gradio or hig-components-menus

platform-apex-test-run: common questions

Does this skill write production Apex code?

No. The source says production Apex work is delegated to the platform-apex-generate skill.

Which kinds of tests does it not cover?

Agentforce agent tests go to agentforce-test, and Jest or LWC tests go to experience-lwc-generate.

What does the test-fix loop do?

It analyzes failures, adds or improves tests, and reruns focused tests before broader regression runs.

How do I install platform-apex-test-run?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is platform-apex-test-run free?

The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.

Is platform-apex-test-run safe to use?

It scores 82 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to platform-apex-test-run?

Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.

platform-apex-test-run Install

Add to stack

Loading.