From jaganpro-sf-skills-7
Analyzes Salesforce debug logs for root-cause troubleshooting: governor limits, stack traces, SOQL/DML patterns, CPU/heap issues, with severity scoring and fix recommendations.
npx claudepluginhub jaganpro/sf-skillsThis skill uses the workspace's default tool permissions.
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.
CREDITS.mdREADME.mdassets/benchmarking-template.clsassets/cpu-heap-optimization.clsassets/dml-in-loop-fix.clsassets/null-pointer-fix.clsassets/soql-in-loop-fix.clsreferences/analysis-playbook.mdreferences/benchmarking-guide.mdreferences/cli-commands.mdreferences/common-issues.mdreferences/debug-log-reference.mdreferences/log-analysis-tools.mdreferences/scoring-rubric.mdApplies advanced Salesforce debugging via debug logs, SOQL query plans, and EventLogFile analysis for governor limits, slow queries, and complex bugs.
Generates and reviews Salesforce Apex code for classes, triggers, test classes, batch/queueable/schedulable jobs with 150-point scoring. For .cls/.trigger files.
Provides expert patterns for Salesforce development including LWC, Apex triggers/classes, REST/Bulk APIs, Connected Apps, and SFDX with scratch orgs/2GP.
Share bugs, ideas, or general feedback.
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.
Use sf-debug when the work involves:
.log files from SalesforceDelegate elsewhere when the user is:
Ask for or infer:
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
Prefer fixes that are:
Expanded workflow: references/analysis-playbook.md
| Issue | Primary signal | Default fix direction |
|---|---|---|
| SOQL in loop | repeating SOQL_EXECUTE_BEGIN in a repeated call path | query once, use maps / grouped collections |
| DML in loop | repeated DML_BEGIN patterns | collect rows, bulk DML once |
| Non-selective query | high rows scanned / poor selectivity | add indexed filters, reduce scope |
| CPU pressure | CPU usage approaching sync limit | reduce algorithmic complexity, cache, async where valid |
| Heap pressure | heap usage approaching sync limit | stream with SOQL for-loops, reduce in-memory data |
| Null pointer / fatal error | EXCEPTION_THROWN / FATAL_ERROR | guard null assumptions, fix empty-query handling |
Expanded examples: references/common-issues.md
When finishing analysis, report in this order:
Suggested shape:
Issue: <summary>
Location: <class / line / transaction>
Root cause: <explanation>
Severity: Critical | Warning | Info
Fix: <specific action>
Verify: <test or rerun step>
| Need | Delegate to | Reason |
|---|---|---|
| Implement Apex fix | sf-apex | code change generation / review |
| Reproduce via tests | sf-testing | test execution and coverage loop |
| Deploy fix | sf-deploy | deployment orchestration |
| Create debugging data | sf-data | targeted seed / repro data |
| Score | Meaning |
|---|---|
| 90+ | Expert analysis with strong fix guidance |
| 80–89 | Good analysis with minor gaps |
| 70–79 | Acceptable but may miss secondary issues |
| 60–69 | Partial diagnosis only |
| < 60 | Incomplete analysis |