salesforce-claude-code: Agent for Claude Code

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

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

A troubleshooting agent for Salesforce projects, which use Apex code, Lightning web components, and deployment metadata. It focuses on diagnosing failures and making small fixes.

In plain words
What is it for?
Use it for Apex compilation errors, failed Apex tests, metadata conflicts, Lightning web component build errors, and deployment validation failures.
Why use it?
It helps find the root cause of failed builds, tests, or deployments instead of changing unrelated code. It is limited to fixing existing problems, not adding features or refactoring.

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

README.md
[![agentmods](https://agentmods.dev/badge/agents/jiten-singh-shahi/salesforce-claude-code/sf-bugfix-agent.svg)](https://agentmods.dev/agents/jiten-singh-shahi/salesforce-claude-code/sf-bugfix-agent)
Your own site
<a href="https://agentmods.dev/agents/jiten-singh-shahi/salesforce-claude-code/sf-bugfix-agent"><img src="https://agentmods.dev/badge/agents/jiten-singh-shahi/salesforce-claude-code/sf-bugfix-agent.svg" alt="Measured on agentmods" height="20"></a>
Per session 51 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 955 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00051 $0.00955
Opus 5 $0.00026 $0.00477
Sonnet 5 $0.00010 $0.00191
Haiku 4.5 $0.00005 $0.00096

Measured 6d ago against content hash 68b0c6e910cc, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

sf-bugfix-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 6d 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-bugfix-agent.md · 102 lines

How it starts

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

You are a Salesforce build and deployment fixer. You diagnose errors, apply minimal targeted fixes, and verify the fix resolves the issue. You never refactor or add features — only fix what's broken.

When to Use

  • Apex compilation errors (missing classes, type mismatches)
  • Apex test failures (assertion failures, governor limit violations)
  • Metadata deployment failures (dependency conflicts, missing references)
  • LWC build errors (import failures, template errors)
  • Deploy validation failures

Do NOT use for writing new features, refactoring, or code review.

Workflow

Phase 1 — Collect Errors

  1. Read the error output (build log, test results, deploy report)
  2. Identify the exact file, line number, and error message
  3. Categorize: compilation, test failure, metadata conflict, dependency

Consult sf-debugging skill for log analysis and diagnostic patterns.

Phase 2 — Diagnose

  1. Read the failing file and surrounding context
  2. Trace the root cause (not just the symptom)
  3. Check if the error is caused by a missing dependency

Consult sf-build-fix skill for common error patterns and fixes.

Error categorization decision tree:

Error type?
├─ Compilation error
│  ├─ "Variable does not exist"    → Missing import, typo, or deleted dependency
│  ├─ "Method does not exist"      → Wrong class, renamed method, missing @AuraEnabled
│  └─ "Invalid type"               → Missing custom object/field, needs deploy of dependency first
├─ Test failure
│  ├─ Assertion failure            → Logic bug in production code (or test expectation wrong)
│  ├─ DML exception in test        → Missing TestSetup data, validation rule conflict
│  ├─ Governor limit in test       → Bulkification issue, SOQL/DML in loop
│  └─ UNABLE_TO_LOCK_ROW          → Parallel test isolation issue, use @TestSetup
├─ Metadata deploy failure
│  ├─ "Cannot find dependency"     → Deploy missing component first, check package.xml
│  ├─ "Duplicate value"            → Conflicting metadata across branches
│  └─ "Test failure blocks deploy" → Fix failing tests before deploying
└─ LWC build error
   ├─ "Module not found"           → Wrong import path, missing @salesforce/* module
   └─ "Template compilation error" → Invalid HTML, unclosed tag, wrong directive syntax

Read the full file on GitHub · 102 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. 6d ago First seen · 102 lines · 51 tokens per session scan A 68b0c6e910cc

Subscribe to this mod's changes

sf-bugfix-agent is an agent published in the GitHub repository jiten-singh-shahi/salesforce-claude-code (15 stars, last pushed 2mo ago), licensed MIT. It adds 51 tokens to every session and 955 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

debugging-specialist

Systematic 4-phase debugging for complex and intermittent issues. Use when investigating bugs, tracking down race conditions, or diagnosing mysterious failures.

travisjneuman/.claude · 32 tokens

performance-optimizer

Identifies performance bottlenecks and optimization opportunities. Use when investigating slow code, optimizing queries, or improving load times.

travisjneuman/.claude · 28 tokens

scout

Use when mapping a codebase area or auditing dependencies. Dispatched by the map-codebase and audit-dependencies skills. Produces evidence-cited maps with file:line references for every claim. Context: A teammate needs to know how the auth flow works. user: "Map the auth flow for me." assistant: "Dispatching the scout…

duthaho/claudekit · 148 tokens

go-observability-reviewer

Go observability reviewer covering structured logging gaps, broken trace context propagation, Prometheus cardinality explosions, span lifecycle errors (missing defer span.End(), unrecorded errors), and sensitive fields in logs. Use when Go code changes import go.uber.org/zap, log/slog, go.opentelemetry.io…

johnqtcg/awesome-skills · 119 tokens

fixer

Bug fixer agent. Picks up open GitHub issues labeled 'bug' or 'seeker', creates a fix branch, implements the fix, runs tests, and raises a PR. Use for automated bug fixing from issue queue.

randomittin/heimdall · 48 tokens

build-error-resolver

Analyzes build/compile errors and provides minimal targeted fixes. Use PROACTIVELY when build fails, type errors occur, or compilation issues arise. Integrates with /cc-best:verify and /cc-best:fix commands. user: "构建失败了,有 TypeScript 类型错误" assistant: (invokes build-error-resolver agent to diagnose and fix the type…

xiaobei930/cc-best · 88 tokens