Skip to content
forcedotcom avatar

Platform Apex Logs Debug

Analyzes Salesforce debug logs for governor limits, stack traces, and performance issues with severity-ranked fixes.

CCM score
71 of 100
skills.sh installs
7.4K
GitHub stars
1.2K
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers log retrieval, ordered analysis of exceptions, limits, SOQL/DML, CPU/heap, and callouts, then severity classification
  • Includes a CLI command reference, a high-signal issue pattern table, and before/after Apex fix examples for SOQL-in-loop and DML-in-loop
  • Enforces reporting of root cause, severity (Critical, Warning, or Info), and a verification step for every finding
  • Designed for diagnosis only; code fixes route to platform-apex-generate and test runs to platform-apex-test-run

Install

$ npx -y skills add forcedotcom/sf-skills --skill platform-apex-logs-debug -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

platform-apex-logs-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 platform-apex-logs-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

Details

Repository
github.com/forcedotcom/sf-skills
Category
Debugging
First seen
Jul 14, 2026

Questions

What does the platform-apex-logs-debug skill do with Salesforce debug logs?

It analyzes Salesforce .log files to diagnose root causes, such as governor-limit hits, stack-trace exceptions, slow SOQL, and CPU or heap pressure. It classifies each finding as Critical, Warning, or Info and recommends the smallest bulk-safe fix with a verification step.

How do I install the platform-apex-logs-debug skill?

Run npx -y skills add forcedotcom/sf-skills --skill platform-apex-logs-debug -y in your project. Once installed, the agent can analyze debug logs from your Salesforce org and report which transaction failed and why.

What tools does platform-apex-logs-debug need?

The skill requires the sf CLI at version 2.0.0 or later to retrieve and stream logs from your org, and jq at version 1.6.0 or later. You also need an org alias and the transaction or user flow you want to investigate.

Where does platform-apex-logs-debug rank among debugging skills?

It sits in the Debugging category and ranks in the top 50 there, alongside diagnosing-bugs, safe-debug, and systematic-debugging. It is specific to Salesforce debug logs, covering Apex governor limits and log-based root-cause analysis.

When should I not use platform-apex-logs-debug?

Do not use it to run or repair Apex tests, which belongs to platform-apex-test-run, or to generate or fix Apex code, which belongs to platform-apex-generate. Agentforce session tracing is handled by agentforce-observe instead.

More from forcedotcom/sf-skills

All 78

Similar to Platform Apex Logs Debug

More Debugging