platform-apex-logs-debug
Skill by forcedotcom
platform-apex-logs-debug analyzes Salesforce debug logs to find root causes of failures. It is for developers and admins who troubleshoot governor limits, stack traces, and slow queries in Salesforce orgs.
Install platform-apex-logs-debug
Built from the published package, never by AI.
git clone --depth 1 https://github.com/forcedotcom/sf-skills /tmp/sf-skills && mkdir -p ~/.claude/skills && cp -r /tmp/sf-skills/skills/platform-apex-logs-debug ~/.claude/skills/platform-apex-logs-debugRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
Step-by-step: install platform-apex-logs-debug in Claude Code
git clone --depth 1 https://github.com/forcedotcom/sf-skills /tmp/sf-skills && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/sf-skills/skills/platform-apex-logs-debug ~/.gemini/antigravity-cli/skills/platform-apex-logs-debugAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install platform-apex-logs-debug in Antigravity CLI
Skills can run scripts on your machine. Some need an API key: check the README.
About
platform-apex-logs-debug is an agent skill for analyzing Salesforce debug logs. It covers governor-limit diagnosis, stack-trace interpretation, slow-query investigation, and CPU and heap pressure analysis. The skill retrieves logs with the sf CLI and then analyzes them in a fixed order: entry point, exceptions, governor limits, repeated SOQL and DML, CPU and heap hotspots, and callout timing.
Each finding is classed as Critical, Warning, or Info and reported with its location, root cause, fix, and a verification step. The skill diagnoses only. It hands Apex code changes to platform-apex-generate, test runs to platform-apex-test-run, and Agentforce session traces to agentforce-observe. It is aimed at developers and admins who troubleshoot Salesforce orgs.
Written from the project's SKILL.md and checked against it.
What it can do
- Log retrievalLists, downloads, or streams debug logs for a target org using the sf CLI.
- Governor limit diagnosisChecks governor limits, reading LIMIT_USAGE events before judging limits safe.
- Stack trace analysisInterprets stack traces and exceptions to locate the originating user code.
- SOQL and DML pattern checksFinds repeated SOQL and DML patterns, such as SOQL or DML inside loops.
- CPU and heap analysisIdentifies CPU and heap hotspots and pressure approaching sync limits.
- Slow query investigationReviews non-selective queries and query-plan evidence extracted from logs.
- Severity classificationClassifies each finding as Critical, Warning, or Info for prioritization.
- Fix recommendationsRecommends the smallest correct, bulk-safe fix with a verification step.
What you need
- Salesforce org with access to debug logs
- sf CLI version 2.0.0 or later
- jq version 1.6.0 or later
Try asking
- Analyze the latest debug log from my sandbox org for governor limit issues
- Find the root cause of this stack trace from my Salesforce debug log
- Check this .log file for SOQL queries running inside a loop
Good to know
- Diagnoses only. It does not rewrite Apex code or run or repair tests.
- Logs are truncated at 2 MB, so debug levels may need reducing and re-capturing.
- Agentforce session tracing and parquet telemetry are handled by a different skill.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: skills/platform-apex-logs-debug/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
README.md2 KB -
SKILL.md8 KB -
assets/benchmarking-template.cls15 KB -
assets/cpu-heap-optimization.cls12 KB -
assets/dml-in-loop-fix.cls9 KB
Show all 14 files
-
assets/null-pointer-fix.cls10 KB -
assets/soql-in-loop-fix.cls6 KB -
references/analysis-playbook.md1 KB -
references/benchmarking-guide.md8 KB -
references/cli-commands.md9 KB -
references/common-issues.md1 KB -
references/debug-log-reference.md8 KB -
references/log-analysis-tools.md7 KB -
references/scoring-rubric.md821 B
Alternatives to platform-apex-logs-debug
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
platform-apex-logs-debug: common questions
Does this skill change my Apex code?
No. The source says the skill diagnoses and does not rewrite Apex code. Code generation is delegated to platform-apex-generate.
Why do no logs appear after I set a trace flag?
The source says to check that the trace flag ExpirationDate is in the future and that the correct user is being traced.
Which log events does the analysis rely on?
The source names events such as SOQL_EXECUTE_BEGIN, DML_BEGIN, EXCEPTION_THROWN, FATAL_ERROR, and LIMIT_USAGE as primary signals.
How do I install platform-apex-logs-debug?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is platform-apex-logs-debug free?
The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.
Is platform-apex-logs-debug safe to use?
It scores 81 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to platform-apex-logs-debug?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
