salesforce-claude-code: Agent for Claude Code

.cursor/agents/sf-apex-agent.md

sf-apex-agent is an agent for Claude Code, Cursor from jiten-singh-shahi/salesforce-claude-code. It costs 59 tokens per session (1,265 once invoked), scanned A, original, MIT.

A coding assistant for Salesforce Apex, the programming language used on the Salesforce platform. It develops and reviews classes, triggers, background jobs, web-service callouts, and related tests using TDD, meaning tests are written before the implementation.

In plain words
What is it for?
Use it to build or refactor Apex classes and triggers, create asynchronous jobs and integrations, write tests, and review Apex code. It is not for Salesforce user-interface components, Flows, configuration, or deployment.
Why use it?
It keeps Apex changes aligned with the existing project structure and checks concerns such as Salesforce execution limits, security, and meaningful test coverage.

Agent for Claude CodeCursor

Written for Claude Code and Cursor: shipped in a Claude Code plugin, but also installed under .cursor/. Also seen: model in frontmatter.

This is jiten-singh-shahi/salesforce-claude-code's own configuration. It tells Claude Code and Cursor how to work on salesforce-claude-code itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything salesforce-claude-code configures →

Part of the salesforce-claude-code plugin — 41 skills, 17 agents shipped together

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/jiten-singh-shahi/salesforce-claude-code/main/.cursor/agents/sf-apex-agent.md
Clone the repo
git clone --depth 1 https://github.com/jiten-singh-shahi/salesforce-claude-code

Made for: Claude Code, Cursor.

Or install salesforce-claude-code, the plugin that ships this one along with the rest of its 41 skills, 17 agents.

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

README.md
[![agentmods](https://agentmods.dev/badge/agents/jiten-singh-shahi/salesforce-claude-code/sf-apex-agent/github.svg)](https://agentmods.dev/agents/jiten-singh-shahi/salesforce-claude-code/sf-apex-agent)
Your own site
<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.

agentmods 80×15 button for sf-apex-agent

Your own site · 80×15
<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>
Per session 59 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,265 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.00059 $0.01265
Opus 5 $0.00030 $0.00633
Sonnet 5 $0.00012 $0.00253
Haiku 4.5 $0.00006 $0.00127

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

Security

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.

.cursor/agents/sf-apex-agent.md · 118 lines

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.

  1. Scan force-app/main/default/classes/ and triggers/ for existing patterns
  2. Check: Is there a trigger handler framework? (FFLIB? Pragmatic handler?)
  3. Check: Is there a TestDataFactory? Service layer? Selector layer?
  4. Identify the pattern to follow — match existing conventions

Phase 2 — Design

Choose the right approach based on the task.

  • Trigger work → Consult sf-trigger-frameworks skill for handler patterns
  • Async processing → Consult sf-apex-async-patterns skill for batch/queue/future decision
  • Enterprise patterns → Consult sf-apex-enterprise-patterns skill for FFLIB layers
  • Complex SOQL → Consult sf-soql-optimization skill for selectivity and indexes
  • Testing strategy → Consult sf-apex-testing skill 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

Read the full file on GitHub · 118 lines

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. 9d ago First seen · 118 lines · 59 tokens per session scan A 59b247ccd554

Subscribe to this mod's changes

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.

Related

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.

softspark/ai-toolkit · 51 tokens

test-generator

Generates comprehensive test suites using TDD patterns. Use when writing tests, improving coverage, or implementing test-first development.

travisjneuman/.claude · 27 tokens

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…

Kanevry/session-orchestrator · 281 tokens

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…

Kanevry/session-orchestrator · 0 tokens

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…

opencue/cuecards · 349 tokens

debugger

Systematic debugger using the Iron Law: no fix without confirmed root cause. Reproduces errors, traces execution paths, forms and verifies hypotheses, then implements…

KevinZai/commander · 35 tokens