sf-test

sf-test is a skill for Claude Code from Clientell-Ai/salesforce-skills. It costs 89 tokens per session (1,871 once invoked), scanned A, original, Apache-2.0.

A Salesforce Apex test generator that creates test classes with shared setup data, bulk records, success and failure cases, permission checks, and simulated HTTP callouts.

In plain words
What is it for?
Use it when writing or improving Salesforce tests, increasing meaningful code coverage, fixing failing tests, or working with classes marked with @IsTest.
Why use it?
It helps test Apex code across normal, large-volume, restricted-access, and external-request scenarios instead of covering only the simplest path.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions Claude Code.

Good fit Use it when writing or improving Salesforce tests, increasing meaningful code coverage, fixing failing tests, or working with classes marked with @IsTest.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/clientell-ai/salesforce-skills/sf-test
Install

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.

Any agent
npx skills add Clientell-Ai/salesforce-skills --skill sf-test
Clone the repo
git clone --depth 1 https://github.com/Clientell-Ai/salesforce-skills

Made for: Claude Code.

Wrote 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.

agentmods badge for sf-test

README.md
[![agentmods](https://agentmods.dev/badge/skills/clientell-ai/salesforce-skills/sf-test/github.svg)](https://agentmods.dev/skills/clientell-ai/salesforce-skills/sf-test)
Your own site
<a href="https://agentmods.dev/skills/clientell-ai/salesforce-skills/sf-test"><img src="https://agentmods.dev/badge/skills/clientell-ai/salesforce-skills/sf-test/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.

agentmods 80×15 button for sf-test

Your own site · 80×15
<a href="https://agentmods.dev/skills/clientell-ai/salesforce-skills/sf-test"><img src="https://agentmods.dev/badge/skills/clientell-ai/salesforce-skills/sf-test.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 89 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,871 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00089 $0.01871
Opus 5 $0.00044 $0.00936
Sonnet 5 $0.00018 $0.00374
Haiku 4.5 $0.00009 $0.00187

Measured 11d ago against content hash f25737637267, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

sf-test 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 11d 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.

skills/sf-test/SKILL.md · 226 lines

How it starts

The opening of the file, as written. The whole thing — 226 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Apex Test Class Generator

You are a Salesforce test class specialist. Generate comprehensive test classes that achieve 85%+ code coverage with meaningful assertions.

Test Class Structure

Required Pattern

@IsTest
private class MyClassTest {

    @TestSetup
    static void makeData() {
        // Use TestFactory for all record creation
        List<Account> accounts = TestDataFactory.createAccounts(200);
        insert accounts;

        List<Contact> contacts = TestDataFactory.createContacts(accounts);
        insert contacts;
    }

    @IsTest
    static void testMethodName_positiveScenario() {
        // Arrange
        List<Account> accounts = [SELECT Id, Name FROM Account WITH USER_MODE];

        // Act
        Test.startTest();
        MyClass.myMethod(accounts);
        Test.stopTest();

        // Assert
        List<Account> results = [SELECT Id, Status__c FROM Account WITH USER_MODE];
        System.assertEquals(200, results.size(), 'All accounts should be processed');
        for (Account acc : results) {
            System.assertNotEquals(null, acc.Status__c, 'Status should be set');
        }
    }
}

Test Scenarios (generate ALL of these)

  1. Positive tests: Happy path with valid data
  2. Negative tests: Invalid data, null inputs, empty lists
  3. Bulk tests: 200+ records to verify bulkification
  4. Permission tests: Test with restricted user profile
  5. Boundary tests: Edge cases (0 records, 1 record, max records)

Permission Testing Pattern

@IsTest
static void testMethod_restrictedUser() {
    User restrictedUser = TestDataFactory.createStandardUser();
    insert restrictedUser;

    System.runAs(restrictedUser) {
        Test.startTest();
        try {
            MyClass.myMethod(testData);
            System.assert(false, 'Should have thrown exception');
        } catch (SecurityException e) {
            System.assert(e.getMessage().contains('access'),
                'Should throw security exception');
        }
        Test.stopTest();
    }
}

Read the full file on GitHub · 226 lines

Files

What ships with it

1 file 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.

Changes

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.

  1. 11d ago First seen · 226 lines · 89 tokens per session scan A f25737637267

Subscribe to this mod's changes

sf-test is a skill published in the GitHub repository Clientell-Ai/salesforce-skills (15 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 89 tokens to every session and 1,871 once invoked, about $0.0004 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-08-30.

Related

Other skills, from other repositories

go-testing

Trigger: Go tests, go test coverage, Bubbletea teatest, golden files. Apply focused Go testing patterns.

Gentleman-Programming/gentle-ai · 26 tokens

test-patterns

Applies proven testing patterns — Arrange-Act-Assert (AAA), Given-When-Then, Test Data Builders, Object Mother, parameterized tests, fixtures, spies, and test doubles — to help write maintainable, reliable, and readable test suites. Use when the user asks about writing unit tests, integration tests, or end-to-end…

rohitg00/skillkit · 138 tokens

coverage

Compute code coverage for active track or module. Targets 95%+ coverage with report and justification for uncovered lines. Complements TDD workflow.

drafthq/draft · 31 tokens

test-writer

Writes tests for code that already exists: behaviour over implementation, arrange-act-assert structure, mocks only at real boundaries, and no time- or order-dependent flakiness. Use when asked to add tests, close a coverage gap on a function, component, or endpoint, or write a regression test for a bug just fixed. Not…

Ozzeron/prompt-pack · 95 tokens

dev-testing

A testing guide that defines when to use unit, integration, API, and end-to-end tests. Unit tests check small pieces of code, while end-to-end tests check a full user flow.

devcodex-labs/devcodex · 27 tokens

testing-patterns

Jest testing patterns, factory functions, mocking strategies, and TDD workflow. Use when writing unit tests, creating test factories, or following TDD red-green-refactor cycle.

KunanonJ/ai-skills-hub · 40 tokens