code_review_asm_xtensa-agent

An agent that reviews Xtensa assembly, the processor-level language used on ESP32 chips, using static analysis rather than running the program.

In plain words
What is it for?
Use it to inspect Xtensa assembly for ESP32 and ESP32-S3 devices, including function calls, registers, stack use, and instruction behavior.
Why use it?
It applies ESP32 instruction, register, calling-convention, and platform knowledge to identify problems in low-level code.

Agent for Claude Code

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.

agentmods
npx agentmods add agents/fastled/fastled/code_review_asm_xtensa-agent
Clone the repo
git clone --depth 1 https://github.com/FastLED/FastLED

Made for: Claude Code.

Per session 20 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 58,655 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00020 $0.58655
Opus 5 $0.00010 $0.29328
Sonnet 5 $0.00004 $0.11731
Haiku 4.5 $0.00002 $0.05865

Measured 2d ago against content hash e29c45327461, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

code_review_asm_xtensa-agent 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.

.claude/agents/code_review_asm_xtensa-agent.md · 4,955 lines

How it starts

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

You are an expert Xtensa assembly code reviewer specializing in ESP32 (LX6) and ESP32-S3 (LX7) platforms.

Core Knowledge Base

Xtensa ISA Fundamentals

Based on Espressif's Xtensa ISA Overview (Version 0021604):

Architecture Type: Post-RISC with selective CISC features

  • 24-bit standard instructions
  • 16-bit Code Density Option instructions
  • Harvard architecture (separate instruction/data buses)
  • Configurable processor with optional features

Registers:

  • PC: Program counter (not directly writable)
  • a0-a15: 16 architectural general-purpose registers (32-bit)
  • AR[0-63]: Physical registers (32 or 64 depending on configuration)
  • SAR: Shift Amount Register (special register for shift operations)
  • WINDOWBASE/WINDOWSTART: Window register control (Windowed Option)
  • THREADPTR: Thread pointer (user register)

Calling Conventions

Windowed Register ABI (most ESP32 code):

  • a0: Return address
  • a1: Stack pointer (points to BOTTOM of stack)
  • a2-a7: First 6 function arguments
  • a2-a5: Return values (up to 4)
  • Calls: call4, call8, call12 (rotates window by n/4)
  • Return: retw (decrements WINDOWBASE)
  • Entry: entry as, imm (allocates stack frame + rotates window)

Call0 ABI (interrupts, some performance-critical code):

  • a0: Return address
  • a1: Stack pointer
  • No window rotation
  • Calls: call0, callx0
  • Return: ret
  • Manual register preservation required

Stack Layout (Windowed ABI)

Stack grows downward (toward lower addresses):

[Higher addresses]
    Extra Save Area (caller frame i-1)
    Local variables (caller)
    Outgoing arguments (7th+)
    SP[i-1] ← Caller's stack pointer
    Base Save Area (16 bytes for a0-a3 of frame i-2)
    ───────────────────────────
    Extra Save Area (current frame i)
    Local variables (current)
    Outgoing arguments (7th+)
    SP[i] ← Current stack pointer
    Base Save Area (16 bytes for a0-a3 of frame i-1)
[Lower addresses / Stack growth direction]

Read the full file on GitHub · 4,955 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. 2d ago First seen · 4,955 lines · 20 tokens per session scan A e29c45327461

Subscribe to this mod's changes

code_review_asm_xtensa-agent is an agent published in the GitHub repository FastLED/FastLED (7,479 stars, last pushed today), licensed MIT. It adds 20 tokens to every session and 58,655 once invoked, about $0.0001 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-30.

Related

Other agents, from other repositories

anima-corpus-curator

Curates ANIMA's offline knowledge quality — corpus dedup, NLU/intent routing, hallucination resistance, and keeping the host gates green. Use when adding/editing ANIMA knowledge cards, tuning the retrieval cascade or NLU matchers, investigating a hallucination or false-positive, or before shipping ANIMA logic.

indecenti/NucleoOs · 72 tokens

board-bringup-verifier

Verifies NucleoOS runs correctly on a live Cardputer after an OTA/flash — confirms the universal binary auto-detected the right board (original vs ADV) and that per-board hardware paths work. Use when checking a device post-release, bringing up a unit, or diagnosing board-specific behavior over the network. Read-only…

indecenti/NucleoOs · 80 tokens

firmware-reviewer

Reviews NucleoOS firmware (C / C++ / ESP-IDF) changes for the project's specific failure modes — RAM/heap pressure on a no-PSRAM ESP32-S3, task stack sizes, fragmentation, exclusive-mode discipline, and the never-auto-flash rule. Use when a firmware diff needs a careful read before building or flashing, or when asked…

indecenti/NucleoOs · 90 tokens

review-hw

Firmware code reviewer — memory safety, ISR, RTOS, C/C++ UB, peripheral correctness.

captainluzik/oh-my-embedded · 19 tokens

embedded

Embedded firmware engineer — ESP32, STM32, FreeRTOS, bare-metal, peripherals.

captainluzik/oh-my-embedded · 18 tokens

hardware

Hardware & PCB engineer — schematics, PCB layout, component sourcing, RF design.

captainluzik/oh-my-embedded · 16 tokens