Agent skill

Sf Debug

by Jaganpro in Jaganpro/sf-skills

Salesforce debug log analysis and troubleshooting with 100-point scoring.

MITAuto-check passedSales & Support

Install Sf Debug

skills CLI
$ npx skills add Jaganpro/sf-skills --skill sf-debug -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Jaganpro/sf-skills sf-debug --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Jaganpro/sf-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/sf-debug .claude/skills/sf-debug && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
sf-debug
GitHub stars
424
Token cost
~1.3k tokens
SKILL.md length
431 words
Files
15 (incl. references, assets)
Skills in repo
36
Repo updated
First seen
Licence
MIT

At a glance

Salesforce debug log analysis and troubleshooting with 100-point scoring.

  • Works in 4 steps: Retrieve logs → Analyze in this order → Classify severity → …
  • : user analyzes debug logs
  • SKILL.md covers When This Skill Owns the Task, Required Context to Gather First, Recommended Workflow and High-Signal Issue Patterns, plus 4 more sections
  • Calls sf

What it does

Sf Debug is an agent skill from Jaganpro/sf-skills. Salesforce debug log analysis and troubleshooting with 100-point scoring. TRIGGER when: user analyzes debug logs, hits governor limits, reads stack traces, or touches .log files from Salesforce orgs. DO NOT TRIGGER when: running Apex tests (use sf-testing), fixing Apex code (use sf-apex), or Agentforce session tracing (use sf-ai-agentforce-observability).

Its SKILL.md is about 1.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 16 other files, including reference files and assets (for example `CREDITS.md`, `README.md` and `references/analysis-playbook.md`).

It sits in Sales & Support, covering Debugging, CRM management and Observability. It works with Salesforce. The repository describes itself as: [ARCHIVED — migrated to forcedotcom/afv-library] Salesforce Skills for Agentic Coding Tools — Apex, Flow, LWC, SOQL, Agentforce, Data Cloud, OmniStudio. Read-only archive; active… The licence is MIT.

When your agent uses it

  • : user analyzes debug logs
  • Hits governor limits
  • Reads stack traces
  • Touches .log files from Salesforce orgs

Example prompts

  • “/sf-debug”

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Retrieve logs
  2. Analyze in this order
  3. Classify severity
  4. Recommend the smallest correct fix

What it can do on your machine

Read from SKILL.md and the folder at commit 53c9956. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • sf

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Sf Debug loads about 1.3k tokens when it runs, and up to ~10k if it reads all its reference files. Until then it costs about 92 tokens; SKILL.md has 431 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~92
When it runs · the whole SKILL.md, loaded when a task matches
~1.3k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~10k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from Jaganpro/sf-skills at commit 53c9956, republished under its MIT licence (© Jaganpro). 431 words, ~1,259 tokens.

Download SKILL.mdSave it as .claude/skills/sf-debug/SKILL.md (or your agent's skills folder). This skill also uses 14 other files; get the full folder from GitHub.
name
sf-debug
description
Salesforce debug log analysis and troubleshooting with 100-point scoring. TRIGGER when: user analyzes debug logs, hits governor limits, reads stack traces, or touches .log files from Salesforce orgs. DO NOT TRIGGER when: running Apex tests (use sf-testing), fixing Apex code (use sf-apex), or Agentforce session tracing (use sf-ai-agentforce-observability).
license
MIT
metadata.version
1.1.0
metadata.author
Jag Valaiyapathy
metadata.scoring
100 points across 5 categories

sf-debug: Salesforce Debug Log Analysis & Troubleshooting

Use this skill when the user needs root-cause analysis from debug logs: governor-limit diagnosis, stack-trace interpretation, slow-query investigation, heap / CPU pressure analysis, or a reproduction-to-fix loop based on log evidence.

When This Skill Owns the Task

Use sf-debug when the work involves:

  • .log files from Salesforce
  • stack traces and exception analysis
  • governor limits
  • SOQL / DML / CPU / heap troubleshooting
  • query-plan or performance evidence extracted from logs

Delegate elsewhere when the user is:


Required Context to Gather First

Ask for or infer:

  • org alias
  • failing transaction / user flow / test name
  • approximate timestamp or transaction window
  • user / record / request ID if known
  • whether the goal is diagnosis only or diagnosis + fix loop

1. Retrieve logs
bash
sf apex list log --target-org <alias> --json
sf apex get log --log-id <id> --target-org <alias>
sf apex tail log --target-org <alias> --color
2. Analyze in this order
  1. entry point and transaction type
  2. exceptions / fatal errors
  3. governor limits
  4. repeated SOQL / DML patterns
  5. CPU / heap hotspots
  6. callout timing and external failures
3. Classify severity
  • Critical — runtime failure, hard limit, corruption risk
  • Warning — near-limit, non-selective query, slow path
  • Info — optimization opportunity or hygiene issue
4. Recommend the smallest correct fix

Prefer fixes that are:

  • root-cause oriented
  • bulk-safe
  • testable
  • easy to verify with a rerun

Expanded workflow: references/analysis-playbook.md


Show full SKILL.md (215 more words)Show less

High-Signal Issue Patterns

IssuePrimary signalDefault fix direction
SOQL in looprepeating SOQL_EXECUTE_BEGIN in a repeated call pathquery once, use maps / grouped collections
DML in looprepeated DML_BEGIN patternscollect rows, bulk DML once
Non-selective queryhigh rows scanned / poor selectivityadd indexed filters, reduce scope
CPU pressureCPU usage approaching sync limitreduce algorithmic complexity, cache, async where valid
Heap pressureheap usage approaching sync limitstream with SOQL for-loops, reduce in-memory data
Null pointer / fatal errorEXCEPTION_THROWN / FATAL_ERRORguard null assumptions, fix empty-query handling

Expanded examples: references/common-issues.md


Output Format

When finishing analysis, report in this order:

  1. What failed
  2. Where it failed (class / method / line / transaction stage)
  3. Why it failed (root cause, not just symptom)
  4. How severe it is
  5. Recommended fix
  6. Verification step

Suggested shape:

text
Issue: <summary>
Location: <class / line / transaction>
Root cause: <explanation>
Severity: Critical | Warning | Info
Fix: <specific action>
Verify: <test or rerun step>

Cross-Skill Integration

NeedDelegate toReason
Implement Apex fixsf-apexcode change generation / review
Reproduce via testssf-testingtest execution and coverage loop
Deploy fixsf-deploydeployment orchestration
Create debugging datasf-datatargeted seed / repro data

Reference Map

Start here
Deep references
Rubric

Score Guide

ScoreMeaning
90+Expert analysis with strong fix guidance
80–89Good analysis with minor gaps
70–79Acceptable but may miss secondary issues
60–69Partial diagnosis only
< 60Incomplete analysis

© Jaganpro, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 14 other files (references, assets) in skills/sf-debug of Jaganpro/sf-skills.

  • SKILL.md
  • CREDITS.md
  • README.md
  • assets/benchmarking-template.cls
  • assets/cpu-heap-optimization.cls
  • assets/dml-in-loop-fix.cls
  • assets/null-pointer-fix.cls
  • assets/soql-in-loop-fix.cls
  • references/analysis-playbook.md
  • references/benchmarking-guide.md
  • references/cli-commands.md
  • references/common-issues.md
  • references/debug-log-reference.md
  • references/log-analysis-tools.md
  • references/scoring-rubric.md

Open the folder on GitHubat commit 53c9956

Compare with similar skills

Sf Debug next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Sf Debug compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Sf Debug this skillJaganpro/sf-skills424—~1.3kAutomated safety check: PassMIT
Platform Apex Logs Debugforcedotcom/sf-skills1.1k—~1.9kAutomated safety check: PassApache-2.0
Experience UI Bundle 2gp Deployforcedotcom/sf-skills1.1k—~5.5kAutomated safety check: PassApache-2.0
Consumer Goods Accruals Datakit Deployforcedotcom/sf-skills1.1k—~5.1kAutomated safety check: PassApache-2.0
Experience UI Bundle Mfa Configureforcedotcom/sf-skills1.1k—~4.8kAutomated safety check: PassApache-2.0
Churn Riskindranilbanerjee/digital-marketing-pro8541 repos~2.4kAutomated safety check: PassMIT

Similar skills

  • Platform Apex Logs Debug

    forcedotcom/sf-skills

    Salesforce debug log analysis and troubleshooting with 100-point scoring.

    1.1k GitHub stars~1.9k tokensUpdated 4 days ago
    Sales & SupportAuto-check passed
  • Experience UI Bundle 2gp Deploy

    forcedotcom/sf-skills

    MUST activate when the user wants to package, distribute, or install/upgrade/uninstall/promote a UI Bundle as a Salesforce second-generation (2GP) package (project may contain uiBundles/ or…

    1.1k GitHub stars~5.5k tokensUpdated 4 days ago
    Sales & SupportAuto-check passed
  • A skill your agent uses to deploy the TPM Liability Accruals data kit end to end to a Salesforce org.

    1.1k GitHub stars~5.1k tokensUpdated 4 days ago
    Sales & SupportAuto-check passed
  • Configure Multi-Factor Authentication (MFA) for Salesforce Experience Site users.

    1.1k GitHub stars~4.8k tokensUpdated 4 days ago
    Sales & SupportAuto-check passed
  • Churn Risk

    indranilbanerjee/digital-marketing-pro

    Score customer segments for churn risk from behavioral signals — email engagement decline, purchase recency, usage drops, support sentiment — producing a 0-100 risk scorecard with four tiers…

    854 GitHub starsUsed in 1 repo~2.4k tokens
    Sales & SupportAuto-check passed
  • Lead Import

    indranilbanerjee/digital-marketing-pro

    Import leads into Salesforce, HubSpot, Zoho, or Pipedrive with validation, deduplication against existing CRM records, lead scoring, consent and compliance checks, and source attribution — then push…

    854 GitHub starsUsed in 1 repo~3.3k tokens
    Sales & SupportAuto-check passed

More from Jaganpro/sf-skills

All 36 skills in this repo
  • Agentforce session tracing extraction and analysis. An agent skill from Jaganpro/sf-skills.

    424 GitHub stars~1.8k tokensUpdated 5 mo ago
    Auto-check passed
  • Sf AI Agentscript

    Jaganpro/sf-skills

    Agent Script DSL for deterministic Agentforce agents. An agent skill from Jaganpro/sf-skills.

    424 GitHub stars~3.8k tokensUpdated 5 mo ago
    Auto-check passed
  • Sf Datacloud

    Jaganpro/sf-skills

    Salesforce Data Cloud product orchestrator for connect→prepare→harmonize→segment→act workflows.

    424 GitHub stars~2.7k tokensUpdated 5 mo ago
    Auto-check passed
  • Sf Diagram Mermaid

    Jaganpro/sf-skills

    Salesforce architecture diagrams using Mermaid with ASCII fallback.

    424 GitHub stars~1.4k tokensUpdated 5 mo ago
    Auto-check passed
  • Sf Diagram Nanobananapro

    Jaganpro/sf-skills

    AI-powered image generation for Salesforce visuals via Nano Banana Pro.

    424 GitHub stars~1.6k tokensUpdated 5 mo ago
    Auto-check passed
  • Sf Flow

    Jaganpro/sf-skills

    Creates and validates Salesforce Flows with 110-point scoring.

    424 GitHub stars~1.8k tokensUpdated 5 mo ago
    Auto-check passed

Works with

Questions about Sf Debug

What does Sf Debug do?

Salesforce debug log analysis and troubleshooting with 100-point scoring. Sf Debug is an agent skill from Jaganpro/sf-skills. Salesforce debug log analysis and troubleshooting with 100-point scoring.

When should I use Sf Debug?

Sf Debug fits situations like: : user analyzes debug logs; hits governor limits; reads stack traces; touches .log files from Salesforce orgs.

How do I install Sf Debug in Claude Code?

Run `npx skills add Jaganpro/sf-skills --skill sf-debug -a claude-code`. Or copy the skill folder (skills/sf-debug in Jaganpro/sf-skills) into .claude/skills/sf-debug in your project. Claude Code loads it when a task matches its description.

How do I install Sf Debug in Codex?

Run `npx skills add Jaganpro/sf-skills --skill sf-debug -a codex`. Or copy the skill folder (skills/sf-debug in Jaganpro/sf-skills) into .agents/skills/sf-debug in your project. Codex loads it when a task matches its description.

Can I use Sf Debug in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Jaganpro/sf-skills --skill sf-debug -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/sf-debug, .gemini/skills/sf-debug, .github/skills/sf-debug and .opencode/skills/sf-debug in your project.

What does Sf Debug need to run?

Going by SKILL.md and its folder, Sf Debug needs the command-line tools its instructions call (sf).

Does Sf Debug access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Sf Debug safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Sf Debug use?

Sf Debug is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Sf Debug use?

About 1.3k tokens (SKILL.md is roughly 5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 9.1k tokens, read only when the agent opens those files.

What are the alternatives to Sf Debug?

Skills that share tags, products or a category with Sf Debug: Platform Apex Logs Debug (forcedotcom/sf-skills, 1.1k stars), Experience UI Bundle 2gp Deploy (forcedotcom/sf-skills, 1.1k stars), Consumer Goods Accruals Datakit Deploy (forcedotcom/sf-skills, 1.1k stars) and Experience UI Bundle Mfa Configure (forcedotcom/sf-skills, 1.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Sf Debug?

Jaganpro (a GitHub user) maintains it in Jaganpro/sf-skills, which has 424 GitHub stars. The repository holds 36 skills in this directory. The repository was last updated on April 27, 2026.

Source: Jaganpro/sf-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.