Skip to content

forcedotcom/sf-skills / plugins/builder/salesforce-development/skills/platform-apex-logs-debug

platform-apex-logs-debug

Verified

Salesforce 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).

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
finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the workStars: 322kUpdated Claude CodeCodexVerifiedInstall
systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixesStars: 322kUpdated Claude CodeCodexVerifiedInstall
test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation codeStars: 322kUpdated Claude CodeCodexVerifiedInstall
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: 198kUpdated Claude CodeCodexVerifiedInstall