agentleFS
agodianelagodianel/esp32-claude-workbench/.claude/skills/esp32_log_triage/SKILL.md

esp32_log_triage

Skill79 starsChanged 8 months agoMITView on GitHub

Parse and classify ESP32 serial log output to identify errors, warnings, boot issues, and failure patterns.

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Search for these high-priority patterns:

    line 35
  2. Distinctive:

    If a crash backtrace is present:

    line 88

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

ESP32 Log Triage

Systematically analyze ESP32 serial log output to identify and classify issues.

When to Use

  • Debugging unexpected device behavior.
  • Analyzing boot failures.
  • Reviewing log output after a test run.
  • Triaging field-reported issues from log captures.

Steps

1. Identify Log Structure

ESP-IDF log format:

[LEVEL][TAG] (TIMESTAMP) MESSAGE

Levels (severity order):

  • E — Error (critical failures)
  • W — Warning (potential issues)
  • I — Info (normal operation)
  • D — Debug (detailed tracing)
  • V — Verbose (maximum detail)

2. Extract Critical Events

Search for these high-priority patterns:

Boot Failures

rst:0x1 (POWERON_RESET)          → Normal power-on
rst:0x3 (SW_RESET)               → Software reset
rst:0x7 (TG0WDT_SYS_RESET)      → Task watchdog reset
rst:0x8 (TG1WDT_SYS_RESET)      → Interrupt watchdog reset
rst:0xf (BROWNOUT_RESET)         → Power supply issue

Crash Signatures

Guru Meditation Error             → CPU exception
LoadProhibited                    → NULL pointer or invalid memory read
StoreProhibited                   → Write to invalid memory
InstrFetchProhibited              → Jump to invalid address
IllegalInstruction                → Corrupt code or stack
abort()                           → Software abort
Stack overflow                    → Task stack too small

Memory Issues

MALLOC_FAILURE                    → Heap exhaustion
heap_caps_alloc failed            → Specific heap type exhausted
heap corruption detected          → Memory corruption

Network Issues

wifi:state:                       → Wi-Fi state transitions
esp_netif_lwip: Failed            → Network interface errors
TRANSPORT_BASE: Failed            → Connection failures
MQTT_CLIENT: Error                → MQTT protocol errors

3. Classify the Issue

Categorize the primary issue:

CategoryIndicators
Boot loopRepeated reset reasons, never reaches app_main
CrashGuru Meditation, backtrace present
MemoryAllocation failures, usage growing over time
WatchdogTG0WDT/TG1WDT reset reasons
NetworkConnection failures, timeouts, drops
PeripheralI2C/SPI/UART errors, timeout on bus
PowerBrownout resets, unstable ADC readings

4. Extract Backtrace

If a crash backtrace is present:

Backtrace: 0x400d1234:0x3ffb5678 0x400d2345:0x3ffb6789

Decode with:

xtensa-esp32-elf-addr2line -pfiaC -e build/project.elf 0x400d1234 0x400d2345

5. Generate Triage Report

# Log Triage Report

## Summary
- **Issue type**: [Boot loop / Crash / Memory / Watchdog / Network / Peripheral / Power]
- **Severity**: [CRITICAL / HIGH / MEDIUM / LOW]
- **Reset reason**: [From boot log]

## Key Events (chronological)
1. [timestamp] [event description]
2. [timestamp] [event description]

## Error Patterns
- [Pattern]: [count] occurrences — [interpretation]

## Root Cause Hypothesis
[Most likely cause based on evidence]

## Recommended Next Steps
1. [Action]
2. [Action]

## Raw Evidence
[Relevant log excerpts]

Tips

  • Brownout resets usually indicate insufficient power supply, not code bugs.
  • Watchdog resets during Wi-Fi often mean a task is blocking the system task.
  • Guru Meditation with address 0x00000000 is almost always a NULL pointer dereference.
  • Repeated MQTT disconnects — check keepalive interval vs. network latency.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.