sf-debug

sf-debug is a skill for Claude Code from Clientell-Ai/salesforce-skills. It costs 89 tokens per session (4,780 once invoked), scanned A, original, Apache-2.0.

A troubleshooting guide for Salesforce applications using debug logs, resource limits, error traces, and performance data. Salesforce debug logs record what application code and platform operations did during a request.

In plain words
What is it for?
Use it to inspect log detail, trace Apex execution, review queries and database updates, measure CPU and memory use, and diagnose stack traces or performance bottlenecks.
Why use it?
It helps identify the cause of exceptions, slow code, excessive database work, and Salesforce governor-limit failures.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions Claude Code.

Good fit Use it to inspect log detail, trace Apex execution, review queries and database updates, measure CPU and memory use, and diagnose stack traces or performance bottlenecks.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/clientell-ai/salesforce-skills/sf-debug
Install

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.

Any agent
npx skills add Clientell-Ai/salesforce-skills --skill sf-debug
Clone the repo
git clone --depth 1 https://github.com/Clientell-Ai/salesforce-skills

Made for: Claude Code.

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-debug

README.md
[![agentmods](https://agentmods.dev/badge/skills/clientell-ai/salesforce-skills/sf-debug.svg)](https://agentmods.dev/skills/clientell-ai/salesforce-skills/sf-debug)
Your own site
<a href="https://agentmods.dev/skills/clientell-ai/salesforce-skills/sf-debug"><img src="https://agentmods.dev/badge/skills/clientell-ai/salesforce-skills/sf-debug.svg" alt="Measured on agentmods" height="20"></a>
Per session 89 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,780 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.00089 $0.04780
Opus 5 $0.00044 $0.02390
Sonnet 5 $0.00018 $0.00956
Haiku 4.5 $0.00009 $0.00478

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

Security

Grade A, and why

sf-debug 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.

skills/sf-debug/SKILL.md · 443 lines

How it starts

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

Salesforce Debug & Troubleshooting Specialist

You are a Salesforce debugging expert. Diagnose issues from debug logs, governor limit violations, exceptions, and performance bottlenecks. Provide root-cause analysis and actionable fixes.

1. Debug Log Analysis

Log Levels (from most to least verbose)

Level Use Case
FINEST Full trace — variable values, internal framework calls
FINER Detailed flow — method entries/exits with parameters
FINE Key decision points and loop iterations
DEBUG General diagnostic information
INFO High-level transaction milestones
WARN Recoverable issues that may indicate problems
ERROR Failures requiring immediate attention

Log Categories

Category What It Captures
Apex_code Apex execution, System.debug() output, variable assignments
Apex_profiling Cumulative resource usage — SOQL, DML, CPU, heap
Database SOQL queries, DML operations, query plans, row counts
System System methods, platform events, formula evaluations
Validation Validation rules, workflow field updates
Workflow Workflow rules, process builder, flow executions
Callout HTTP callouts, SOAP calls, external service responses
Visualforce VF page rendering, view state, controller actions
NBA Next Best Action strategy execution

Reading Debug Logs — Key Line Prefixes

EXECUTION_STARTED / EXECUTION_FINISHED — transaction boundaries
CODE_UNIT_STARTED / CODE_UNIT_FINISHED — trigger, class, or method execution
SOQL_EXECUTE_BEGIN / SOQL_EXECUTE_END — query with row count
DML_BEGIN / DML_END — DML operation with row count
EXCEPTION_THROWN — exception type and message
FATAL_ERROR — unrecoverable error with stack trace
HEAP_ALLOCATE — heap memory allocation
LIMIT_USAGE_FOR_NS — governor limit summary per namespace
CUMULATIVE_LIMIT_USAGE — end-of-transaction limit summary
USER_DEBUG — System.debug() output
VARIABLE_SCOPE_BEGIN / VARIABLE_ASSIGNMENT — variable tracking (FINEST)
METHOD_ENTRY / METHOD_EXIT — method call tracking (FINER+)
FLOW_START_INTERVIEWS — flow/process builder execution
VALIDATION_RULE — validation rule evaluation
CALLOUT_REQUEST / CALLOUT_RESPONSE — external HTTP calls

Read the full file on GitHub · 443 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 8d ago First seen · 443 lines · 89 tokens per session scan A de430adfe7d7

Subscribe to this mod's changes

sf-debug is a skill published in the GitHub repository Clientell-Ai/salesforce-skills (15 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 89 tokens to every session and 4,780 once invoked, about $0.0004 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.