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.
git clone --depth 1 https://github.com/bhanu91221/sfdx-iqWrote 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/commands/bhanu91221/sfdx-iq/apex-test)<a href="https://agentmods.dev/commands/bhanu91221/sfdx-iq/apex-test"><img src="https://agentmods.dev/badge/commands/bhanu91221/sfdx-iq/apex-test.svg" alt="Measured on agentmods" height="20"></a>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.00013 | $0.01888 |
| Opus 5 | $0.00006 | $0.00944 |
| Sonnet 5 | $0.00003 | $0.00378 |
| Haiku 4.5 | $0.00001 | $0.00189 |
Grade A, and why
apex-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 8d 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 — 234 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/apex-test
Create a new Apex test class, or improve coverage for an existing one, following Salesforce best practices.
Usage
/apex-test MyClass.cls Find or create test class for MyClass
/apex-test --coverage MyClass.cls Show current coverage + improve to 90%
/apex-test --coverage MyClass.cls 80% Improve to specific target coverage level
/apex-test --bulk MyClass.cls Focus on bulk (200+ record) test scenarios
/apex-test --mock MyClass.cls Add HttpCalloutMock for all callout methods
Workflow
Step 1: Identify Target Class
- If a file path or class name is given, use that
- If none given, check
git diff --name-only HEADfor changed.clsfiles (non-test) - If no changed files, ask: "Which class would you like me to write tests for?"
Step 2: Read Source + Find Existing Tests
- Read the source class fully — understand all public methods, logic branches, error paths
- Search for existing test class:
<ClassName>Test.clsinforce-app/**/classes/ - If test class exists: read it and identify untested paths
- If no test class: create from scratch
Step 3: Analyze Coverage Gaps
For each public method in the source class:
- Identify: happy path, bulk path (200 records), null/empty input, negative/error path
- Check existing tests — which paths are already covered?
- For
--coverage: note current % and identify the highest-impact untested lines
Step 4: Generate / Improve Tests
Test class standards:
@isTest
private class AccountServiceTest {
@TestSetup
static void setup() {
// Always use TestDataFactory for test data — never inline record creation
List<Account> accounts = TestDataFactory.createAccounts(200, 'Test Corp');
insert accounts;
}
@isTest
static void testProcessAccounts_happyPath() {
List<Account> accounts = [SELECT Id, Industry FROM Account LIMIT 10];
Test.startTest();
AccountService.processAccounts(new Map<Id, Account>(accounts).keySet());
Test.stopTest();
// Assert expected outcome
List<Account> updated = [SELECT Id, Status__c FROM Account WHERE Id IN :accounts];
for (Account acc : updated) {
Assert.areEqual('Active', acc.Status__c, 'Status should be Active after processing');
}
}
@isTest
static void testProcessAccounts_bulk() {
// Bulk test — always test with 200 records
List<Account> accounts = [SELECT Id FROM Account]; // setup created 200
Assert.areEqual(200, accounts.size(), 'Setup should create 200 accounts');
Test.startTest();
AccountService.processAccounts(new Map<Id, Account>(accounts).keySet());
Test.stopTest();
// Verify all 200 processed
Integer processed = [SELECT COUNT() FROM Account WHERE Status__c = 'Active'];
Assert.areEqual(200, processed, 'All 200 accounts should be processed');
}
@isTest
static void testProcessAccounts_emptyInput() {
Test.startTest();
AccountService.processAccounts(new Set<Id>()); // Should not throw
Test.stopTest();
// No exception = pass
}
@isTest
static void testProcessAccounts_nullInput() {
Test.startTest();
try {
AccountService.processAccounts(null);
Assert.fail('Should throw for null input');
} catch (IllegalArgumentException e) {
Assert.isTrue(e.getMessage().contains('null'), 'Error message should mention null');
}
Test.stopTest();
}
}
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.
- 8d ago First seen · 234 lines · 13 tokens per session scan A b0885bcb58c3
apex-test is a command published in the GitHub repository bhanu91221/sfdx-iq (2 stars, last pushed 3mo ago), licensed MIT. It adds 13 tokens to every session and 1,888 once invoked, about $0.0001 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-31.
Other commands, from other repositories
test-tdd
Run when user calls /test-tdd. Scans modified files, locates their corresponding unit/integration test suites, and runs them.
kill-mutants
Analyze surviving mutants from a mutation testing run and write targeted unit tests to kill them. Re-runs mutations to confirm kills.
lg:node
Create, modify, and manage nodes in LangGraph graphs including LLM nodes, tool nodes, human-in-the-loop, subgraphs, and conditional nodes.
test
Execute a comprehensive test run for the following target.
frappe-test
Run unit and integration tests for Frappe apps with coverage reports.
implement-fix
Minimal pipeline for test-fixing tasks.