sf-debug

Analyze Salesforce debug logs to diagnose exceptions, governor limits, and performance bottlenecks.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/dcinzona/folios --skill sf-debug-dcinzona
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sf-debug
Source: https://github.com/dcinzona/folios/tree/main/.agents/skills/sf-debug
Command: npx skills add https://github.com/dcinzona/folios --skill sf-debug-dcinzona

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Diagnose runtime failures, governor limit breaches, and performance bottlenecks from Salesforce debug logs so developers can find root causes quickly without manual log spelunking.

Core Features & Use Cases

  • Log Analysis: Parse Apex debug logs and surface exceptions, stack traces, and method hotspots.
  • Governor Limit Detection: Detect SOQL, DML, CPU, and heap pressure and flag warning/critical thresholds.
  • Performance Investigation: Identify SOQL-in-loop, DML-in-loop, non-selective queries, and slow methods with suggested remediation.
  • Agentic Fix Suggestions & Scoring: Provide prioritized, 100-point severity scoring and actionable fix recommendations that integrate with adjacent skills for code fixes and testing.
  • Use Case: Rapidly triage an Account trigger causing CPU spikes by pulling the latest log, identifying repeated SOQL calls, and recommending a map-based bulkification approach.

Quick Start

Analyze the latest debug log for org alias dev and report SOQL/DML in-loop issues, CPU/heap usage, and prioritized fix suggestions.

Frequently Asked Questions about sf-debug

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I analyze Salesforce debug logs for governor limit breaches?

Salesforce debug log analysis detects SOQL, DML, CPU, and heap pressure by parsing logs to flag warning and critical governor limit thresholds. It computes limit usage, scores severity, and generates step-by-step remediation recommendations for developer workflows.

What is the best way to find SOQL-in-loop patterns in Apex debug logs?

Finding SOQL-in-loop patterns in Apex debug logs is done by parsing transaction traces and detecting repeated query calls within loops. The analysis identifies these bulkification failures and recommends map-based collection approaches to resolve the performance bottleneck.

Can I use sf CLI log output to diagnose Apex CPU spikes?

Yes, sf CLI log output and debug files are parsed to diagnose Apex CPU spikes by profiling CPU usage and identifying method hotspots. It surfaces slow methods and computes limit usage to pinpoint the root cause of performance bottlenecks.

How do I troubleshoot non-selective SOQL queries causing performance bottlenecks?

Troubleshooting non-selective SOQL queries involves parsing debug logs to identify query-plan evidence and slow methods. The analysis detects non-selective queries, scores their severity, and provides actionable fix recommendations to resolve performance bottlenecks.

Does Salesforce log analysis work with real-time tailing for specific org aliases?

Yes, Salesforce log analysis supports real-time tailing for specific org aliases and users. It parses sf CLI log output to monitor live Apex transactions, detecting exceptions and governor limit breaches as they occur.

Why do I need debug log analysis for Salesforce governor limits?

Debug log analysis for Salesforce governor limits is needed to diagnose runtime failures and heap pressure without manual log spelunking. It surfaces exceptions, stack traces, and method hotspots to find root causes quickly.