hardfault-triage

hardfault-triage is a skill for Claude Code from AmethystLuna/embedded-workbench. It costs 59 tokens per session (3,018 once invoked), scanned A, original, MIT.

A troubleshooting guide for processor exception crashes such as HardFault, memory faults, illegal instructions, and watchdog timeouts. It explains how to read crash registers and saved processor state.

In plain words
What is it for?
Capturing fault information, identifying the kind of crash, recovering the crash location in source code, and classifying likely root causes across several processor families.
Why use it?
It helps turn a low-level crash record into a likely cause instead of guessing from the visible symptom.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the embedded-workbench plugin — 8 skills, 4 agents, 1 hook shipped together

Good fit Capturing fault information, identifying the kind of crash, recovering the crash location in source code, and classifying likely root causes across several processor families.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/amethystluna/embedded-workbench/hardfault-triage
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add AmethystLuna/embedded-workbench --skill hardfault-triage
Clone the repo
git clone --depth 1 https://github.com/AmethystLuna/embedded-workbench

Made for: Claude Code.

Or install embedded-workbench, the plugin that ships this one along with the rest of its 8 skills, 4 agents, 1 hook.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for hardfault-triage

README.md
[![agentmods](https://agentmods.dev/badge/skills/amethystluna/embedded-workbench/hardfault-triage/github.svg)](https://agentmods.dev/skills/amethystluna/embedded-workbench/hardfault-triage)
Your own site
<a href="https://agentmods.dev/skills/amethystluna/embedded-workbench/hardfault-triage"><img src="https://agentmods.dev/badge/skills/amethystluna/embedded-workbench/hardfault-triage/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for hardfault-triage

Your own site · 80×15
<a href="https://agentmods.dev/skills/amethystluna/embedded-workbench/hardfault-triage"><img src="https://agentmods.dev/badge/skills/amethystluna/embedded-workbench/hardfault-triage.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 59 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,018 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00059 $0.03018
Opus 5.5 $0.00024 $0.01207
Sonnet 5.5 $0.00012 $0.00604
Haiku 4.5 $0.00006 $0.00302

Measured 3mo ago against content hash 6c2033ac614b, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

hardfault-triage scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/hardfault-triage/SKILL.md · 238 lines

How it starts

The opening of the file, as written. The whole thing — 238 lines — stays where its author put it; the contents beside it link to each section on GitHub.

HardFault & Exception Triage

When a processor exception fires, the register file and stack frame are a black-box recording of the crash. This skill covers how to read that recording.

The methodology is architecture-agnostic. Cortex-M (ARMv7-M/v8-M) fault registers and handlers are the primary reference; the same principles apply to Cortex-A aborts, RISC-V exceptions, Xtensa exception vectors, and other MCU fault paths.

REQUIRED BACKGROUND: Load Skill("debug-methodology") for structured root-cause analysis. If the crash involves RTOS tasks or ISR context, also load Skill("embedded-firmware-dev").

Triage Methodology

Every processor exception triage follows the same four-step flow:

Step 1 — Capture

Read the architecture's fault-status and fault-address registers before any other code runs. The first instructions after exception entry are the only guaranteed-clean snapshot.

  • Cortex-M: CFSR, HFSR, MMFAR, BFAR at SCB base 0xE000ED00
  • Cortex-A: DFSR, DFAR, IFSR, IFAR (data/prefetch abort)
  • RISC-V: mcause, mtval, mepc
  • Xtensa (ESP32): EXCCAUSE, EXCVADDR, EPC1

Step 2 — Classify

Match the fault-status bit pattern against known signatures. The tables in the architecture-specific sections below cover the most frequent Cortex-M patterns. For other architectures:

  • Look up the exception cause code in the architecture reference manual
  • Determine the fault class: memory access, instruction fetch, undefined opcode, alignment, privilege violation, bus error

Step 3 — Locate

Extract the program counter (PC) at the moment of the fault and resolve it to source:

  • .map file Global Symbols: search for the function whose address range contains the PC
  • addr2line: arm-none-eabi-addr2line -e firmware.axf <pc_address> (Cortex-M), equivalent for other toolchains
  • Disassembly listing: use the .lst file or debugger to find the exact instruction at PC − function_start

Step 4 — Root-Cause

Classify the defect behind the fault signature:

Read the full file on GitHub · 238 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3mo ago First seen · 238 lines · 59 tokens per session scan A 6c2033ac614b

Subscribe to this mod's changes

hardfault-triage is a skill published in the GitHub repository AmethystLuna/embedded-workbench (36 stars, last pushed 2d ago), licensed MIT. It adds 59 tokens to every session and 3,018 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

hardfault-triage compared with skills from other repositories

hardfault-triage next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
hardfault-triageAmethystLuna/embedded-workbenchSkill362d agoMITA59Claude Code
gke-ai-troubleshooting-tpu-dynamic-slices-monitoringgoogle/skillsSkill25ktodayApache-2.0A107Claude Code, Codex
gke-ai-troubleshooting-tpu-vbar-oomgoogle/skillsSkill25ktodayApache-2.0A125Claude Code, Codex
doca-flowNVIDIA/skillsSkill4.2k2d agoApache-2.0A224Claude Code
competition-firmware-layoutzhaoxuya520/reverse-skillSkill45k16d agoMITA110Codex
diagnose-driver-installNVIDIA/deepopsSkill1.5k3d agoBSD-3-ClauseA47Claude Code, Codex
diagnose-backend-bugQoderAI/better-harnessSkill2.5k19d agoMITA87Claude Code, Codex