forcedotcom/sf-skills / plugins/builder/salesforce-development/skills/platform-apex-logs-debug
platform-apex-logs-debug
VerifiedSalesforce 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 platform-apex-test-run), generating or fixing Apex code (use platform-apex-generate), or Agentforce session tracing (use agentforce-observe).
| File | Kind | Size |
|---|---|---|
| README.md | markdown | 2.2 KB |
| SKILL.md | skill md | 7.7 KB |
| assets/benchmarking-template.cls | other | 14.7 KB |
| assets/cpu-heap-optimization.cls | other | 11.8 KB |
| assets/dml-in-loop-fix.cls | other | 8.6 KB |
| assets/null-pointer-fix.cls | other | 10.4 KB |
| assets/soql-in-loop-fix.cls | other | 6.3 KB |
| references/analysis-playbook.md | markdown | 1.3 KB |
| references/benchmarking-guide.md | markdown | 7.7 KB |
| references/cli-commands.md | markdown | 8.9 KB |
| references/common-issues.md | markdown | 1.2 KB |
| references/debug-log-reference.md | markdown | 8.5 KB |
| references/log-analysis-tools.md | markdown | 7.1 KB |
| references/scoring-rubric.md | markdown | 821 B |
references/analysis-playbook.md
View on GitHub# Debug Analysis Playbook
Use this playbook when `platform-apex-logs-debug` is active and you need the expanded workflow.
## 1. Gather context
Collect:
- org alias
- failing transaction or test context
- approximate time window
- relevant user / record / request identifiers
## 2. Retrieve logs
Preferred commands:
```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
```
See [cli-commands.md](cli-commands.md) for more options.
## 3. Analyze in this order
1. transaction entry point
2. exceptions and fatal errors
3. governor limits
4. SOQL / DML repetition patterns
5. CPU / heap hotspots
6. callout timing and external failures
## 4. Classify severity
- **Critical** — runtime failure, hard limit, data corruption risk
- **Warning** — near-limit, non-selective query, slow path
- **Info** — optimization opportunity, cleanup item, observability gap
## 5. Propose fixes
Prefer fixes that are:
- root-cause oriented
- bulk-safe
- testable
- deployable in one clean change set
## 6. Loop with adjacent skills
- use `sf-apex` for code fixes
- use `platform-apex-test-run` to reproduce and verify
- use `platform-metadata-deploy` to deploy fixes
- use `platform-data-manage` when the issue depends on missing or malformed test data
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |