salesforce-claude-code: Agent for Claude Code

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

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

A developer and reviewer for Salesforce Lightning Web Components, the modern way to build reusable user-interface parts in Salesforce. It handles component code, data access, events, styling, accessibility, and Jest tests, with tests written first as part of test-driven development (TDD).

In plain words
What is it for?
Use it to create or review LWC interfaces, connect them to Apex, add component communication, write Jest tests, and apply Salesforce Design System styling. It is not for Apex, Aura, Visualforce, or Flow work.
Why use it?
It helps build and check LWC components consistently, including their data connections, user interactions, accessibility, performance, and automated tests.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/agents/jiten-singh-shahi/salesforce-claude-code/sf-lwc-agent"><img src="https://agentmods.dev/badge/agents/jiten-singh-shahi/salesforce-claude-code/sf-lwc-agent.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 67 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,151 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.00067 $0.01151
Opus 5 $0.00034 $0.00575
Sonnet 5 $0.00013 $0.00230
Haiku 4.5 $0.00007 $0.00115

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

Security

Grade A, and why

sf-lwc-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-lwc-agent.md · 124 lines

How it starts

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

You are a Salesforce LWC developer. You design, build, test, and review Lightning Web Components. You follow TDD — Jest tests first, then implementation.

When to Use

  • Creating new LWC components (UI, data display, forms)
  • Wiring components to Apex via @wire or imperative calls
  • Building component communication (events, LMS, slots)
  • Writing Jest tests for LWC components
  • Implementing SLDS styling and accessibility (WCAG 2.1 AA)
  • Reviewing existing LWC for performance and best practices

Do NOT use for Apex classes, Aura components, Visualforce pages, or Flows.

Workflow

Phase 1 — Assess

  1. Scan force-app/main/default/lwc/ for existing components and patterns
  2. Check: What component libraries exist? Are there shared base components?
  3. Check: Wire service or imperative Apex? What's the existing convention?

Phase 2 — Design

  • Data access → Consult sf-lwc-development skill for wire vs imperative patterns
  • Testing strategy → Consult sf-lwc-testing skill for mock and assertion patterns
  • Apply constraint skills (preloaded): naming, security, accessibility, performance

Phase 3 — Jest Test First

Write Jest test BEFORE the component.

  1. Test file: __tests__/componentName.test.js
  2. Mock @wire with createApexTestWireAdapter or mock imperative with jest.fn()
  3. Test: rendering, user interaction, error states, accessibility
  4. Run to confirm failure (RED phase)
// __tests__/accountList.test.js
import { createElement } from 'lwc';
import AccountList from 'c/accountList';
import getAccounts from '@salesforce/apex/AccountController.getAccounts';
import { createApexTestWireAdapter } from '@salesforce/sfdx-lwc-jest';

// Mock wire adapter
const getAccountsAdapter = createApexTestWireAdapter(getAccounts);

describe('c-account-list', () => {
    afterEach(() => { while (document.body.firstChild) document.body.removeChild(document.body.firstChild); });

    it('renders accounts when wire returns data', async () => {
        const element = createElement('c-account-list', { is: AccountList });
        document.body.appendChild(element);
        getAccountsAdapter.emit([{ Id: '001xx', Name: 'Acme' }]);
        await Promise.resolve();
        const items = element.shadowRoot.querySelectorAll('lightning-datatable');
        expect(items).toHaveLength(1);
    });

    it('shows error when wire fails', async () => {
        const element = createElement('c-account-list', { is: AccountList });
        document.body.appendChild(element);
        getAccountsAdapter.error();
        await Promise.resolve();
        const error = element.shadowRoot.querySelector('[data-id="error"]');
        expect(error).not.toBeNull();
    });
});

Read the full file on GitHub · 124 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 · 124 lines · 67 tokens per session scan A 2fd66b895900

Subscribe to this mod's changes

sf-lwc-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 67 tokens to every session and 1,151 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

vue-reviewer

Expert Vue.js code reviewer specializing in Composition API correctness, reactivity pitfalls, component architecture, template security, and Vue-specific performance. Use for any change touching .vue, .ts/.js files with Vue imports, or Vue ecosystem code (Pinia, Vue Router, Nuxt). MUST BE USED for Vue projects.

affaan-m/ECC · 68 tokens

atomic-reviewer

Diff / branch / file reviewer with two modes. Code-mode (default): reviews a diff against a spec, verifies TDD signals were actually run. Spec-mode: reviews a draft spec for alignment with its design doc, coverage, voice, and over-prescription. One line per finding, severity-tagged, no praise, no scope creep. Output…

damusix/atomic-claude · 127 tokens

vue-nuxt-expert

Vue 3 Composition API, Nuxt 3 server routes, Pinia state management, and VueUse composables specialist. Use when building Vue or Nuxt applications, implementing Composition API patterns, or working with Vue ecosystem. Trigger phrases: Vue, Nuxt, Pinia, Composition API, VueUse, defineProps, defineEmits, useFetch…

travisjneuman/.claude · 90 tokens

architecture-analyst

Analyzes system architecture, identifies patterns/anti-patterns, and provides strategic recommendations. Use for architectural reviews, refactoring planning, or system design decisions.

travisjneuman/.claude · 36 tokens

architect-reviewer

Use this agent for read-only architectural audits between waves. Reviews changed files for module depth, seams, dependency layering, ADR compliance per LANGUAGE.md vocabulary. Context: After Impl-Core wave shipped 8 files. user: "Audit the W2 architecture before proceeding." assistant: "I'll dispatch…

Kanevry/session-orchestrator · 117 tokens

pwa-specialist

Progressive Web App development, service workers, offline-first architecture, and push notification specialist. Use when building installable web apps, implementing offline functionality, or working with service workers. Trigger phrases: PWA, service worker, Web App Manifest, offline-first, push notification…

travisjneuman/.claude · 76 tokens