Preserves crash evidence and finds the first failing instruction in embedded firmware. Handles HardFault, BusFault, UsageFault, traps, watchdog resets, and asserts across Cortex-M, RISC-V, and 8051 architectures.
Ships in aix-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Use this skill to preserve crash evidence and find the first failing instruction. The agent should read architecture-specific fault state before reset, map addresses to symbols, and separate root cause from secondary symptoms.
Use this skill when:
Do not use this skill when the target cannot yet connect or flash; use mcu-flashing-debug first.
Ask for:
Preserve state. Do not reset or reflash until fault registers, PC, LR/RA, SP, and stack frame are captured.
Confirm image-symbol match. Ensure the ELF/MAP file matches the firmware currently running on target.
Identify the faulting address.
Map PC, exception return address, mepc, stacked PC, or return address to a symbol and source line.
Classify the cause. Separate invalid memory access, illegal instruction, stack overflow, alignment, bus/peripheral access, watchdog, assert, and default handler cases.
Walk backward to the first bad state. Inspect caller, input pointers, stack bounds, interrupt context, DMA/cache interactions, and recent initialization.
Add a focused verification. Use a watchpoint, assertion, guard pattern, stack watermark, or minimal repro to prove the suspected cause.
Read SCB fault registers before reset:
CFSR = 0xE000ED28
HFSR = 0xE000ED2C
MMFAR = 0xE000ED34
BFAR = 0xE000ED38
Decode stacked r0-r3, r12, lr, pc, and xpsr from MSP or PSP.
Read:
mcause, mepc, mtval, mtvec, mstatus, sp
Check whether mcause is interrupt or exception, and map mepc to source/disassembly.
Use available evidence:
Before claiming a fault is understood:
User:
程序跑一会儿就进 HardFault。
Agent:
What SKILL.md sets; muted values are Claude Code's defaults
76 skills in this plugin
/8051-mcu-debugUse when debugging 8051-compatible microcontrollers, 51 MCU firmware, STC download issues, Keil C51 projects, interrupts, timers, UART, or startup failures/avem-integrationUse when integrating, evaluating, configuring, or debugging Avem embedded C framework modules, event-driven components, drivers, middleware, or application architecture/battery-charger-fuel-gauge-integrationUse when integrating or debugging Li-ion charger/fuel gauge ICs (BQ24295, BQ27441, MAX17048) over I2C, covering charge start, watchdog host mode, NTC/JEITA faults, and SOC jumps/ble-gatt-integrationUse when integrating, designing, or debugging BLE GATT services, characteristics, descriptors, MTU, notifications, indications, pairing, connection parameters, or throughput/bootloader-debugUse when debugging embedded bootloaders, application jumps, vector table offsets, firmware upgrade flow, OTA state, image validation, rollback, or boot selection failures/canbus-integrationUse when integrating, porting, configuring, or debugging CAN bus libraries, CANBus-Triple, MCP2515, CAN frames, bit timing, filters, or embedded automotive communication/aix-skills:embedded-fault-debugfrom aix-skills
npx claudepluginhub easyzoom/aix-skills --plugin aix-skillsOther plugins' skills for the same job