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.
npx agentmods add skills/hermeticormus/libreembed-claude-code/debug-trace-patternsnpx skills add HermeticOrmus/LibreEmbed-Claude-Code --skill debug-trace-patternsgit clone --depth 1 https://github.com/HermeticOrmus/LibreEmbed-Claude-CodeWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00000 | $0.01632 |
| Opus 5 | $0.00000 | $0.00816 |
| Sonnet 5 | $0.00000 | $0.00326 |
| Haiku 4.5 | $0.00000 | $0.00163 |
Grade A, and why
debug-trace-patterns 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 2d 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.
How it starts
The opening of the file, as written. The whole thing — 174 lines — stays where its author put it; the contents beside it link to each section on GitHub.
debug-trace-patterns
Knowledge Base
Practical debug patterns for ARM Cortex-M firmware. Tools: OpenOCD, GDB, J-Link, logic analyzer.
Pattern 1: Decode CFSR After HardFault
Given a CFSR value (e.g., from monitor mdw 0xE000ED28), decode:
CFSR = 0x00020000 → UFSR.INVSTATE (bit 17)
Cause: Attempted to execute code with Thumb bit cleared in xPSR.
Common cause: function pointer stored with bit 0 cleared (missing |1 for Thumb).
CFSR = 0x00000400 → BFSR.IMPRECISERR (bit 10)
Cause: Imprecise bus error. BFAR is not valid.
Common cause: DMA write to invalid address, async fault from write buffer.
Fix: set SCB->CCR |= SCB_CCR_BFHFNMIGN_Msk temporarily to locate source.
CFSR = 0x00008200 → BFSR.PRECISERR + BFSR.BFARVALID
Cause: Precise data bus error. BFAR = 0xE000ED38 contains fault address.
Common cause: null pointer dereference, access to unmapped memory region.
CFSR = 0x02000000 → UFSR.DIVBYZERO (bit 25)
Cause: Integer divide by zero.
Fix: enable div-by-zero trap: SCB->CCR |= SCB_CCR_DIV_0_TRP_Msk.
Pattern 2: addr2line — Fault PC to Source Line
# Convert stacked PC to source file + line number
arm-none-eabi-addr2line -e firmware.elf -f -i 0x08003A24
# Output:
# sensor_read
# /home/user/project/src/sensor.c:87
# Also inspect LR to find the caller:
arm-none-eabi-addr2line -e firmware.elf -f -i 0x080038F6
The -i flag follows inline function chains.
Pattern 3: GDB Commands for Live Fault Debugging
# Full embedded debug session
arm-none-eabi-gdb firmware.elf
(gdb) target remote :3333 # OpenOCD GDB server
(gdb) monitor reset halt
(gdb) load
# After a fault occurs:
(gdb) info registers # All CPU registers
(gdb) p/x *((uint32_t*)0xE000ED28) # CFSR
(gdb) p/x *((uint32_t*)0xE000ED2C) # HFSR
(gdb) p/x *((uint32_t*)0xE000ED34) # MMFAR
(gdb) p/x *((uint32_t*)0xE000ED38) # BFAR
(gdb) x/16xw $sp # Stack dump
(gdb) backtrace # Unwind stack (requires -g and no -O2 optimization)
# Watchpoints: halt when variable changes
(gdb) watch g_critical_var
(gdb) rwatch *(uint32_t*)0x20001000 # Hardware read watchpoint (DWT)
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.
- 2d ago First seen · 174 lines · 0 tokens per session scan A 352b85953fcc
debug-trace-patterns is a skill published in the GitHub repository HermeticOrmus/LibreEmbed-Claude-Code (44 stars, last pushed 3mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,632 tokens. 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-30.
Other skills, from other repositories
hardware-iot-bus
Low-level I2C and SPI bus peripheral control for embedded Linux boards (Orange Pi, Raspberry Pi, RISC-V).
aether-iot-query
Use this skill when the user asks about a live AetherEdge runtime: channels, points, real-time values, history, alarms, rules, models, instances, routing, SHM health, service health, or system status. Use aether CLI commands to answer — do NOT inspect source code, local database files, or config YAMLs to answer…
aether-iot
Build, integrate, diagnose, or generate applications for the AetherEdge AI-native edge kernel. Use for AetherEdge onboarding, SDK compositions, device and topology clients, read-only operations UIs, MCP integration, Domain Packs, or governed IoT commands where live-state authority and physical-device safety must be…
avr-bare-metal-embedded
Curated Knowledge API for AI Agents — 68 MCP tools, 200+ skill packs, 46K chunks, semantic search over 670K vectors, 5-layer validation pipeline. Works with Claude Code, Cursor, Cline, Windsurf.
edge-iot
Edge computing, IoT protocols, and embedded systems integration.
ha-integration-knowledge
Everything you need to know to build, test and review Home Assistant Integrations. If you're looking at an integration, you must use this as your primary reference.