Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add forcedotcom/sf-skills --skill platform-apex-test-rungit clone --depth 1 https://github.com/forcedotcom/sf-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/forcedotcom/sf-skills/platform-apex-test-run)<a href="https://agentmods.dev/skills/forcedotcom/sf-skills/platform-apex-test-run"><img src="https://agentmods.dev/badge/skills/forcedotcom/sf-skills/platform-apex-test-run/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/forcedotcom/sf-skills/platform-apex-test-run"><img src="https://agentmods.dev/badge/skills/forcedotcom/sf-skills/platform-apex-test-run.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- Socket pass
- Snyk warn
- NVIDIA SkillSpector pass
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00124 | $0.01781 |
| Opus 5 | $0.00062 | $0.00890 |
| Sonnet 5 | $0.00025 | $0.00356 |
| Haiku 4.5 | $0.00012 | $0.00178 |
Grade A, and why
platform-apex-test-run scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 174 lines — stays where its author put it; the contents beside it link to each section on GitHub.
platform-apex-test-run: Salesforce Test Execution & Coverage Analysis
Use this skill when the user needs Apex test execution and failure analysis: running tests, checking coverage, interpreting failures, improving coverage, and managing a disciplined test-fix loop for Salesforce code.
When This Skill Owns the Task
Use platform-apex-test-run when the work involves:
sf apex run testworkflows- Apex unit-test failures
- code coverage analysis
- identifying uncovered lines and missing test scenarios
- structured test-fix loops for Apex code
Delegate elsewhere when the user is:
- writing or refactoring production Apex →
platform-apex-generateskill - testing Agentforce agents →
agentforce-testskill - testing LWC with Jest → experience-lwc-generate
Required Context to Gather First
Ask for or infer:
- target org alias
- desired test scope: single class, specific methods, suite, or local tests
- coverage threshold expectation
- whether the user wants diagnosis only or a test-fix loop
- whether related test data factories already exist
Recommended Workflow
1. Discover test scope
Identify:
- existing test classes
- target production classes
- test data factories / setup helpers
2. Run the smallest useful test set first
Start narrow when debugging a failure; widen only after the fix is stable.
3. Analyze results
Focus on:
- failing methods
- exception types and stack traces
- uncovered lines / weak coverage areas
- whether failures indicate bad test data, brittle assertions, or broken production logic
4. Run a disciplined fix loop
When the issue is code or test quality:
- delegate code fixes to
platform-apex-generateskill when needed - add or improve tests
- rerun focused tests before broader regression
5. Improve coverage intentionally
Cover:
- positive path
- negative / exception path
- bulk path (251+ records where appropriate)
- callout or async path when relevant
What ships with it
14 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- assets/basic-test.cls 13 KB
- assets/bulk-test.cls 11 KB
- assets/dml-mock.cls 13 KB
- assets/mock-callout-test.cls 14 KB
- assets/stub-provider-example.cls 12 KB
- assets/test-data-factory.cls 14 KB
- README.md 3.0 KB
- references/cli-commands.md 5.7 KB
- references/mocking-patterns.md 13 KB
- references/performance-optimization.md 7.5 KB
- references/test-fix-loop.md 2.0 KB
- references/test-patterns.md 4.2 KB
- references/testing-best-practices.md 16 KB
- scripts/parse-test-results.py 13 KB runs code
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 6d ago First seen · 174 lines · 124 tokens per session scan A 9fcfe3af52bb
platform-apex-test-run is a skill published in the GitHub repository forcedotcom/sf-skills (978 stars, last pushed yesterday), licensed Apache-2.0. It adds 124 tokens to every session and 1,781 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other skills, from other repositories
sync-new-data-type
Adds scaffolding for a new Sync data type in Chromium across protocol buffers, DataType definitions, feature flags, controller builders, unit tests, and metrics.
generate-testability-wrappers
DO NOT USE when the target already consumes an injected interface or built-in abstraction such as IFileSystem or TimeProvider, even if the request says "generate a wrapper"; no new wrapper is needed. Use only when C# source calls an ambient/static dependency and no injectable seam exists: first-time TimeProvider…
convex-test
Generate convex-test tests for the app's Convex functions.
backend/testing-guide
A guide for writing backend tests: small unit tests, tests that check connected parts such as an API and database, and end-to-end tests that follow a complete user flow.
architecture-patterns
Architecture validation and patterns for clean architecture, backend structure enforcement, project structure validation, test standards, and context-aware sizing. Use when designing system boundaries, enforcing layered architecture, validating project structure, defining test standards, or choosing the right…
add-jsonrpc-method
Input: a method name (eth, anvil, debug, or tevm), optionally its spec and the viem-style action name to expose on the client.