Agent skill

Sf Testing

by Jaganpro in Jaganpro/sf-skills

Apex test execution, coverage analysis, and test-fix loops with 120-point scoring.

MITAuto-check passedTesting & QA

Install Sf Testing

skills CLI
$ npx skills add Jaganpro/sf-skills --skill sf-testing -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Jaganpro/sf-skills sf-testing --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Jaganpro/sf-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/sf-testing .claude/skills/sf-testing && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
sf-testing
GitHub stars
424
Token cost
~1.1k tokens
SKILL.md length
411 words
Files
16 (incl. references, assets)
Skills in repo
36
Repo updated
First seen
Licence
MIT

At a glance

Apex test execution, coverage analysis, and test-fix loops with 120-point scoring.

  • Works in 5 steps: Discover test scope → Run the smallest useful test set first → Analyze results → …
  • : user runs Apex tests
  • SKILL.md covers When This Skill Owns the Task, Required Context to Gather First, Recommended Workflow and High-Signal Rules, plus 4 more sections
  • Runs Python scripts from its folder; calls sf

What it does

Sf Testing is an agent skill from Jaganpro/sf-skills. Apex test execution, coverage analysis, and test-fix loops with 120-point scoring. TRIGGER when: user runs Apex tests, checks code coverage, fixes failing tests, or touches Test.cls / Test.cls files. DO NOT TRIGGER when: writing Apex production code (use sf-apex), Agentforce agent testing (use sf-ai-agentforce-testing), or Jest/LWC tests (use sf-lwc).

Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 19 other files, including reference files and assets (for example `CREDITS.md`, `README.md` and `hooks/scripts/parse-test-results.py`).

It sits in Testing & QA, covering Unit testing, Test coverage and Failing and flaky tests. It works with Jest. The repository describes itself as: [ARCHIVED — migrated to forcedotcom/afv-library] Salesforce Skills for Agentic Coding Tools — Apex, Flow, LWC, SOQL, Agentforce, Data Cloud, OmniStudio. Read-only archive; active… The licence is MIT.

When your agent uses it

  • : user runs Apex tests
  • Checks code coverage
  • Fixes failing tests
  • Touches Test.cls / Test.cls files

Example prompts

  • “/sf-testing”

Requirements

  • Python 3

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Discover test scope
  2. Run the smallest useful test set first
  3. Analyze results
  4. Run a disciplined fix loop
  5. Improve coverage intentionally

What it can do on your machine

Read from SKILL.md and the folder at commit 53c9956. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships script files (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • sf

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Sf Testing loads about 1.1k tokens when it runs, and up to ~14k if it reads all its reference files. Until then it costs about 92 tokens; SKILL.md has 411 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~92
When it runs · the whole SKILL.md, loaded when a task matches
~1.1k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~14k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from Jaganpro/sf-skills at commit 53c9956, republished under its MIT licence (© Jaganpro). 411 words, ~1,125 tokens.

Download SKILL.mdSave it as .claude/skills/sf-testing/SKILL.md (or your agent's skills folder). This skill also uses 15 other files; get the full folder from GitHub.
name
sf-testing
description
Apex test execution, coverage analysis, and test-fix loops with 120-point scoring. TRIGGER when: user runs Apex tests, checks code coverage, fixes failing tests, or touches *Test.cls / *_Test.cls files. DO NOT TRIGGER when: writing Apex production code (use sf-apex), Agentforce agent testing (use sf-ai-agentforce-testing), or Jest/LWC tests (use sf-lwc).
license
MIT
metadata.version
1.1.0
metadata.author
Jag Valaiyapathy
metadata.scoring
120 points across 6 categories

sf-testing: 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 sf-testing when the work involves:

  • sf apex run test workflows
  • 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:


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

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 sf-apex 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

Show full SKILL.md (154 more words)Show less

High-Signal Rules

  • default to SeeAllData=false
  • every test should assert meaningful outcomes
  • test bulk behavior, not just single-record happy paths
  • use factories / @TestSetup when they improve clarity and speed
  • pair Test.startTest() with Test.stopTest() when async behavior matters
  • do not hide flaky org dependencies inside tests

Output Format

When finishing, report in this order:

  1. What tests were run
  2. Pass/fail summary
  3. Coverage result
  4. Root-cause findings
  5. Fix or next-run recommendation

Suggested shape:

text
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>

Cross-Skill Integration

NeedDelegate toReason
fix production code or author testssf-apexcode generation and repair
create bulk / edge-case datasf-datarealistic test datasets
deploy updated testssf-deployrollout
inspect detailed runtime logssf-debugdeeper failure analysis

Reference Map

Start here
Specialized guidance

Score Guide

ScoreMeaning
108+strong production-grade test confidence
96–107good test suite with minor gaps
84–95acceptable but strengthen coverage / assertions
< 84below standard; revise before relying on it

© Jaganpro, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 15 other files (references, assets) in skills/sf-testing of Jaganpro/sf-skills.

  • SKILL.md
  • CREDITS.md
  • README.md
  • assets/basic-test.cls
  • assets/bulk-test.cls
  • assets/dml-mock.cls
  • assets/mock-callout-test.cls
  • assets/stub-provider-example.cls
  • assets/test-data-factory.cls
  • hooks/scripts/parse-test-results.py
  • references/cli-commands.md
  • references/mocking-patterns.md
  • references/performance-optimization.md
  • references/test-fix-loop.md
  • references/test-patterns.md
  • references/testing-best-practices.md

Open the folder on GitHubat commit 53c9956

Compare with similar skills

Sf Testing next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Sf Testing compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Sf Testing this skillJaganpro/sf-skills424—~1.1kAutomated safety check: PassMIT
Platform Apex Test Runforcedotcom/sf-skills1.1k—~1.9kAutomated safety check: PassApache-2.0
Test Guidelinesgetsentry/sentry-react-native1.8k—~1.3kAutomated safety check: PassMIT
Designing TestsCloudAI-X/claude-workflow-v21.4k1 repos~1.5kAutomated safety check: PassMIT
Caliber Testingcaliber-ai-org/ai-setup1.3k—~3.2kAutomated safety check: PassMIT
Write Testsgrafana/synthetic-monitoring-app171—~1.2kAutomated safety check: PassAGPL-3.0

Similar skills

  • Platform Apex Test Run

    forcedotcom/sf-skills

    Apex test execution, coverage analysis, and test-fix loops with 120-point scoring.

    1.1k GitHub stars~1.9k tokensUpdated 4 days ago
    Testing & QAAuto-check passed
  • Test Guidelines

    getsentry/sentry-react-native

    Official

    Enforce Sentry React Native SDK test conventions for naming, structure, mocking, and fixtures with Jest.

    1.8k GitHub stars~1.3k tokensUpdated today
    Testing & QAAuto-check passed
  • Designing Tests

    CloudAI-X/claude-workflow-v2

    Designs and implements testing strategies for any codebase. An agent skill from CloudAI-X/claude-workflow-v2.

    1.4k GitHub starsUsed in 1 repo~1.5k tokens
    Testing & QAAuto-check passed
  • Caliber Testing

    caliber-ai-org/ai-setup

    Writes Vitest tests following project patterns: tests/ directories, vi.mock() for module mocking with vi.hoisted() for test-time factories, global LLM mock from src/test/setup.ts, environment…

    1.3k GitHub stars~3.2k tokensUpdated 13 days ago
    Testing & QAAuto-check passed
  • Write Tests

    grafana/synthetic-monitoring-app

    Official

    Write Jest integration and unit tests for the Grafana Synthetic Monitoring app using React Testing Library, MSW, and src/test helpers.

    171 GitHub stars~1.2k tokensUpdated today
    Testing & QAAuto-check passed
  • Playwright Testing

    chongdashu/vibejam-starter-pack

    Plan, implement, and debug frontend tests: unit/integration/E2E/visual/a11y.

    149 GitHub stars~2.1k tokensUpdated 5 mo ago
    Testing & QAAuto-check passed

More from Jaganpro/sf-skills

All 36 skills in this repo
  • Agentforce session tracing extraction and analysis. An agent skill from Jaganpro/sf-skills.

    424 GitHub stars~1.8k tokensUpdated 5 mo ago
    Auto-check passed
  • Sf AI Agentscript

    Jaganpro/sf-skills

    Agent Script DSL for deterministic Agentforce agents. An agent skill from Jaganpro/sf-skills.

    424 GitHub stars~3.8k tokensUpdated 5 mo ago
    Auto-check passed
  • Sf Datacloud

    Jaganpro/sf-skills

    Salesforce Data Cloud product orchestrator for connect→prepare→harmonize→segment→act workflows.

    424 GitHub stars~2.7k tokensUpdated 5 mo ago
    Auto-check passed
  • Sf Diagram Mermaid

    Jaganpro/sf-skills

    Salesforce architecture diagrams using Mermaid with ASCII fallback.

    424 GitHub stars~1.4k tokensUpdated 5 mo ago
    Auto-check passed
  • Sf Diagram Nanobananapro

    Jaganpro/sf-skills

    AI-powered image generation for Salesforce visuals via Nano Banana Pro.

    424 GitHub stars~1.6k tokensUpdated 5 mo ago
    Auto-check passed
  • Sf Flow

    Jaganpro/sf-skills

    Creates and validates Salesforce Flows with 110-point scoring.

    424 GitHub stars~1.8k tokensUpdated 5 mo ago
    Auto-check passed

Works with

Categories

Questions about Sf Testing

What does Sf Testing do?

Apex test execution, coverage analysis, and test-fix loops with 120-point scoring. Sf Testing is an agent skill from Jaganpro/sf-skills. Apex test execution, coverage analysis, and test-fix loops with 120-point scoring.

When should I use Sf Testing?

Sf Testing fits situations like: : user runs Apex tests; checks code coverage; fixes failing tests; touches Test.cls / Test.cls files.

How do I install Sf Testing in Claude Code?

Run `npx skills add Jaganpro/sf-skills --skill sf-testing -a claude-code`. Or copy the skill folder (skills/sf-testing in Jaganpro/sf-skills) into .claude/skills/sf-testing in your project. Claude Code loads it when a task matches its description.

How do I install Sf Testing in Codex?

Run `npx skills add Jaganpro/sf-skills --skill sf-testing -a codex`. Or copy the skill folder (skills/sf-testing in Jaganpro/sf-skills) into .agents/skills/sf-testing in your project. Codex loads it when a task matches its description.

Can I use Sf Testing in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Jaganpro/sf-skills --skill sf-testing -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/sf-testing, .gemini/skills/sf-testing, .github/skills/sf-testing and .opencode/skills/sf-testing in your project.

What does Sf Testing need to run?

Going by SKILL.md and its folder, Sf Testing needs Python for the scripts in its folder and the command-line tools its instructions call (sf). Our summary lists: Python 3.

Does Sf Testing access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Sf Testing safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Sf Testing use?

Sf Testing is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Sf Testing use?

About 1.1k tokens (SKILL.md is roughly 4.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 12k tokens, read only when the agent opens those files.

What are the alternatives to Sf Testing?

Skills that share tags, products or a category with Sf Testing: Platform Apex Test Run (forcedotcom/sf-skills, 1.1k stars), Test Guidelines (getsentry/sentry-react-native, 1.8k stars), Designing Tests (CloudAI-X/claude-workflow-v2, 1.4k stars) and Caliber Testing (caliber-ai-org/ai-setup, 1.3k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Sf Testing?

Jaganpro (a GitHub user) maintains it in Jaganpro/sf-skills, which has 424 GitHub stars. The repository holds 36 skills in this directory. The repository was last updated on April 27, 2026.

Source: Jaganpro/sf-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.