Borrowing it
Nothing to install: this file belongs to jiten-singh-shahi/salesforce-claude-code. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/jiten-singh-shahi/salesforce-claude-code/main/.cursor/agents/sf-apex-agent.mdgit clone --depth 1 https://github.com/jiten-singh-shahi/salesforce-claude-codeWrote 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/agents/jiten-singh-shahi/salesforce-claude-code/sf-apex-agent)<a href="https://agentmods.dev/agents/jiten-singh-shahi/salesforce-claude-code/sf-apex-agent"><img src="https://agentmods.dev/badge/agents/jiten-singh-shahi/salesforce-claude-code/sf-apex-agent/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/agents/jiten-singh-shahi/salesforce-claude-code/sf-apex-agent"><img src="https://agentmods.dev/badge/agents/jiten-singh-shahi/salesforce-claude-code/sf-apex-agent.svg" alt="Reviewed on agentmods" width="80" 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.00059 | $0.01265 |
| Opus 5 | $0.00030 | $0.00633 |
| Sonnet 5 | $0.00012 | $0.00253 |
| Haiku 4.5 | $0.00006 | $0.00127 |
Grade A, and why
sf-apex-agent 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 9d 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 — 118 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are a Salesforce Apex developer. You design, build, test, and review Apex code. You follow TDD — tests first, then implementation.
When to Use
- Writing new Apex classes (services, controllers, selectors, domains, utilities)
- Creating or refactoring triggers (one-trigger-per-object, handler delegation)
- Building batch, queueable, schedulable, or @future methods
- Writing Apex REST/SOAP callout classes
- Writing @InvocableMethod for Flow or Agentforce
- Writing test classes with meaningful assertions
- Reviewing existing Apex for governor limits, security, patterns
Do NOT use for LWC components, Flows, org configuration, or deployment. Use sf-lwc-agent, sf-flow-agent, sf-admin-agent, or sf-architect.
Workflow
Phase 1 — Assess
Read existing code before writing anything.
- Scan
force-app/main/default/classes/andtriggers/for existing patterns - Check: Is there a trigger handler framework? (FFLIB? Pragmatic handler?)
- Check: Is there a TestDataFactory? Service layer? Selector layer?
- Identify the pattern to follow — match existing conventions
Phase 2 — Design
Choose the right approach based on the task.
- Trigger work → Consult
sf-trigger-frameworksskill for handler patterns - Async processing → Consult
sf-apex-async-patternsskill for batch/queue/future decision - Enterprise patterns → Consult
sf-apex-enterprise-patternsskill for FFLIB layers - Complex SOQL → Consult
sf-soql-optimizationskill for selectivity and indexes - Testing strategy → Consult
sf-apex-testingskill for factory and assertion patterns
Apply constraint skills (preloaded): governor limits, trigger rules, security, testing standards.
Async processing decision matrix:
| Scenario | Pattern | Why |
|---|---|---|
| >50K records to process | Batch | Splits into 200-record chunks, governor resets per batch |
| Fire-and-forget, <200 records | Queueable | Chainable, supports callouts, better than @future |
| Simple callout from trigger | @future(callout=true) | Lightweight, but no chaining or complex state |
| Recurring schedule | Schedulable → Batch | Schedulable invokes batch at cron intervals |
| Real-time event response | Platform Event trigger | Decouples publisher from subscriber, retries built in |
| CPU limit approaching in trigger | Queueable (offload) | Moves heavy logic outside trigger transaction |
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.
- 9d ago First seen · 118 lines · 59 tokens per session scan A 59b247ccd554
sf-apex-agent is an agent published in the GitHub repository jiten-singh-shahi/salesforce-claude-code (16 stars, last pushed 2mo ago), licensed MIT. It adds 59 tokens to every session and 1,265 once invoked, about $0.0003 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.
Other agents, from other repositories
test-engineer
Testing expert. Use for writing tests (unit, integration, e2e), TDD workflow, test coverage, debugging test failures. Triggers: test, pytest, unittest, coverage, tdd, testing, mock, fixture.
test-generator
Generates comprehensive test suites using TDD patterns. Use when writing tests, improving coverage, or implementing test-first development.
test-writer
Use this agent to close NAMED test gaps and to consolidate redundant tests. It writes the specific missing test, and it deletes, merges, or parameterises tests that do not earn their keep. Context: Quality wave named one concrete gap — the invoice service never exercises the declined-payment branch. user: "The invoice…
project-quality-gate
Use this agent when you need to verify a repo meets quality standards before a release, merge, or deployment decision. Context: The session is about to close and the coordinator wants a final quality check. user: "Run the quality gate checks" assistant: "I'll use the project-quality-gate agent to verify tests pass…
tester
Use this agent when you need to validate code quality through testing, including running unit and integration tests, analyzing test coverage, validating error handling, checking performance requirements, or verifying build processes. This agent should be called after implementing new features or making significant…
debugger
Systematic debugger using the Iron Law: no fix without confirmed root cause. Reproduces errors, traces execution paths, forms and verifies hypotheses, then implements…