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 |
README.md
View on GitHub# platform-apex-logs-debug
Salesforce debugging and troubleshooting skill with log analysis, governor limit detection, and agentic fix suggestions. Identify performance bottlenecks and automatically suggest fixes.
## Features
- **Log Analysis**: Parse and analyze Apex debug logs
- **Governor Limit Detection**: SOQL, DML, CPU, and heap limit monitoring
- **Performance Analysis**: Find slow queries and expensive operations
- **Stack Trace Interpretation**: Parse exceptions and identify root causes
- **Agentic Fix Suggestions**: Automatically suggest code fixes
- **100-Point Scoring**: Issue severity classification
## Quick Start
### 1. Invoke the skill
```text
Skill: platform-apex-logs-debug
Request: "Analyze debug logs for AccountTrigger performance issues in org dev"
```
### 2. Common operations
| Operation | Example Request |
|-----------|-----------------|
| Analyze log | "Analyze the latest debug log for errors" |
| List logs | "Show recent debug logs for org dev" |
| Tail logs | "Tail logs for user admin@company.com" |
| Find limits | "Find governor limit issues in the log" |
| Query plan | "Analyze query plan for Account SOQL" |
## Log Commands
```bash
# List recent logs
sf apex list log --target-org [alias] --json
# Get specific log
sf apex get log --log-id 07Lxx0000000000 --target-org [alias]
# Tail logs real-time
sf apex tail log --target-org [alias] --color
```
## Scoring System (100 Points)
| Category | Points | Focus |
|----------|--------|-------|
| Governor Limits | 25 | SOQL, DML, CPU, Heap analysis |
| Performance | 25 | Query optimization, N+1 detection |
| Error Analysis | 20 | Exception handling, stack traces |
| Root Cause | 20 | Issue identification, fix suggestions |
| Documentation | 10 | Clear explanations, actionable fixes |
## Cross-Skill Integration
| Related Skill | When to Use |
|---------------|-------------|
| platform-apex-generate | Fix identified Apex issues |
| platform-soql-query | Optimize slow SOQL queries |
| platform-apex-test-run | Re-run tests after fixes |
## Documentation
- [Benchmarking Guide](references/benchmarking-guide.md)
## Requirements
- sf CLI v2
- Target Salesforce org
- Debug logs enabled for target user
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 |