
This is your tool for running Apex tests, diagnosing failures, and improving coverage in Salesforce. It handles the full test-fix loop: executing tests via SF CLI, parsing results, identifying uncovered lines, and recommending next steps. Works across single classes, suites, or org-wide runs. The 120-point scoring system helps you assess test quality beyond just pass/fail. It knows when to stay narrow during debugging and when to widen for regression testing. Delegates production code fixes to sf-apex and LWC testing to sf-lwc, staying focused on the Apex test execution layer. Strong on coverage analysis and structured fix loops, less useful if you just need to write tests from scratch.
$ npx -y skills add jaganpro/sf-skills --skill sf-testing --agent claude-codeInstalls into .claude/skills of the current project.
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.
Use sf-testing when the work involves:
sf apex run test workflowsDelegate elsewhere when the user is:
Ask for or infer:
Identify:
Start narrow when debugging a failure; widen only after the fix is stable.
Focus on:
When the issue is code or test quality:
Cover:
SeeAllData=false@TestSetup when they improve clarity and speedTest.startTest() with Test.stopTest() when async behavior mattersWhen finishing, report in this order:
Suggested shape:
Test run: <scope>
Org: <alias>
Result: <passed / partial / failed>
Coverage: <percent / key classes>
Issues: <highest-signal failures>
Next step: <fix class, add test, rerun scope, or widen regression>
| Need | Delegate to | Reason |
|---|---|---|
| fix production code or author tests | sf-apex | code generation and repair |
| create bulk / edge-case data | sf-data | realistic test datasets |
| deploy updated tests | sf-deploy | rollout |
| inspect detailed runtime logs | sf-debug | deeper failure analysis |
| Score | Meaning |
|---|---|
| 108+ | strong production-grade test confidence |
| 96–107 | good test suite with minor gaps |
| 84–95 | acceptable but strengthen coverage / assertions |
| < 84 | below standard; revise before relying on it |
Sponsors