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 $0.00030 $0.01509
Sonnet 5 $0.00012 $0.00604
Haiku 4.5 $0.00006 $0.00302

Measured 8d ago against content hash 6c2033ac614b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, 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 8d 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. 8d 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 (8 stars, last pushed 3d ago), licensed MIT. It adds 59 tokens to every session and 3,018 once invoked, about $0.0003 per session on Opus 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

Other skills, from other repositories

gke-ai-troubleshooting-tpu-dynamic-slices-monitoring

Monitors, troubleshoots, and manages GKE TPU Dynamic Slices custom resources. Use when checking TPU slice lifecycle states, troubleshooting slice provisioning failures, validating single-slice or multi-slice (JobSet) workload manifests, or safely patching stuck finalizers and disabling the slice controller. Don't use…

google/skills · 107 tokens

gke-ai-troubleshooting-tpu-vbar-oom

Diagnoses and prevents vbarcontrolagent segfaults, out-of-memory (OOM) errors, and TPU device initialization failures on TPU v6e nodes in GKE caused by race conditions during TPU device resets or high-frequency metrics polling. Use when troubleshooting vbarcontrolagent crashes, memory cgroup OOMs in serial console…

google/skills · 125 tokens

competition-firmware-layout

Internal downstream skill for ctf-sandbox-orchestrator. CTF-sandbox workflow for firmware images, partition tables, boot chains, update packages, extracted filesystems, embedded configs, and device-facing trust boundaries. Use when the user asks to unpack firmware, map partition layout, inspect bootloader or init…

zhaoxuya520/reverse-skill · 110 tokens

doca-flow

Build and debug DOCA Flow applications on supported NVIDIA NICs/DPUs: define match/action pipes, initialize ports and representors, choose forwarding targets, validate pipes before hardware programming, read counters, match the Flow version to the installed DOCA release, and diagnose Flow API errors. Trigger on DOCA…

NVIDIA/skills · 140 tokens

diagnose-driver-install

Diagnose NVIDIA driver installation failures on DeepOps-managed nodes — nvidia-smi errors, "No devices were found", DKMS build failures, or GPU pods crash-looping. Use before reinstalling anything.

NVIDIA/deepops · 47 tokens

diagnose-backend-bug

Diagnose a bounded backend or multi-service failure from GitHub Issues, Jira, Aone, user-provided exports, logs, traces, responses, stack traces, or job records. Use when a service, API, RPC, worker, queue, CLI, or scheduled job bug needs correlation through the project's existing observability route before repair; do…

QoderAI/better-harness · 87 tokens